Report dataset of query type Stored Procedure does not return all available rows
I have created an SSRS report using a shared data set. The dataset's "Query type:" is set to "Stored Procedure", and the "Select or enter stored procedure name:" contains a valid stored procedure name. The dataset's "Data Source:" is set to a valid shared data source, which points to a valid SQL server instance and database. The dataset has three parameters that match the 3 parameters defined for the stored procedure: these are of Data Types "Date/Time", Text, and Integer, respectively. If I call the stored procedure from a query window within SQL Server Management Studio, using a particular set of parameters (i.e. a date, a Business Unit of type text, and an Item number of type integer), the query returns 51 rows. When I run my report in Visual Studio, using the same values for those parameters, I receive only 36 rows. I've exhausted my limited debugging skills, and would welcome suggestions on how to resolve this.
June 27th, 2011 7:50pm

Hi Tim, Are yo grouping in the report? Is the report template a Matrix? Please let us know.
Free Windows Admin Tool Kit Click here and download it now
June 27th, 2011 8:13pm

The report has one data region, a table. There are no groups defined.
June 27th, 2011 8:17pm

Stop the presses! I just noticed that the report viewer in Visual Studio is indicating that there is another page; said page has the remaining detail records. So, obviously, I've somehow introduced some mechanism by which a page break is being generated. As soon as I figure out what that is, I'll post it... stay tuned!
Free Windows Admin Tool Kit Click here and download it now
June 27th, 2011 8:24pm

Okay, the problem was with me, the developer, and not that stated in the thread title. The stored procedure was returning all of the rows I expected; however, it was inserting a page break so that some of the rows were on the second page, and that was not expected. I had not run into this previously because my reports to-date had always had some sort of grouping defined, along with the KeepTogether property set to "True" for said groups. Since this report had no such groups with KeepTogether = True, the default pagination was apparently occurring; i.e. since InteractiveSize seems to default to the default Page Size of Width 8.5" by Length 11", when the number of rows rendered equated to 11" in total height, a page break was inserted. By changing the Interactive Length to 0", as desribed under "Understanding Rendering Behaviors" in SQL 2008 Books Online, I eliminated the soft page breaks inserted by the HTML renderer.
June 28th, 2011 9:22am

This topic is archived. No further replies will be accepted.

Other recent topics Other recent topics