3

I have a stored procedure that I can call from Management Studio and it returns 56 rows consistently. However, when I execute the query under from inside of ssrs 2008, I get back 61 rows. The stored procedure uses cursors and has some print statement inside of it.

Thanks,

mikemurf22
  • 1,851
  • 2
  • 21
  • 32

3 Answers3

3

I had a similar problem when I had an a stored procedure return warnings messages. It caused problems returning inconsistent results just in my SSRS dataset/report. I set ansi-warnings to off and my problem went away. You may want to comment out your print statements and try that.

Thanks, Steve

Steve Goedker
  • 353
  • 1
  • 2
  • 7
0

I would do two things.

  1. Check that the SSRS report is not using cached data - it often does.
  2. If that doesn't help... within your SP write to a table in the DB the params coming in and the data being output. That should point you in the correct direction.
BIDeveloper
  • 2,628
  • 4
  • 36
  • 51
0

In SSRS, I was trying to pass null as the value of a parameter to a stored procedure. It seemed that no matter what I tried SSRS was using 'null' which did not work with @Parameter is null inside the stored procedure.

I created a report parameter, called @Rs_null, with a default value of (null). I could then use that.

(Creating a report variable was no good since I could not pass that a stored procedure parameter.)

See also How to use stored proc with null parameters in SSRS?

Roy Latham
  • 343
  • 5
  • 8