views:

92

answers:

3

I have an app that executes and displays reports from SSRS retrieved through URL Access (http://msdn.microsoft.com/en-us/library/ms153586.aspx) Unfortunately, one of these reports is HUGE, resulting in a lot of generated HTML, causing the WebClient to timeout during the call, or the browser to choke on the amount of HTML coming back.

Is there a way to specify what page of data I want to view, as well as know how many pages there are in the result?

Thanks

EDIT

Did a little more searching, and found that there is a rc:Section parameter that can be passed on the URL. It returns that page number. The problem now is, how do I know how many pages there are?

http://stackoverflow.com/questions/2540177/jump-to-specific-page-in-reporting-services

+3  A: 

It depends on how you are specifically displaying the report. Are you building the report URL dynamically and then serving up the page? If so, you can add a couple of hidden parameters for paging and which page of the report you wish to display and customize the resulting URL. It's a bit of work on your part because you'll need to do some manual work but it will give you total control over the end result.

Update

SSRS has an expression for determining the total number of pages in a report:

=Globals!TotalPages

Unfortunately, this can only be used in the header/footer of a report however it is only available after the report has been rendered. You can see a good exploration of this global variable here. The article is for SSRS2005 but it still applies to 2008/R2. If you only need to display the page number in the header/footer then this should work for you.

Alison
Yeah, they pick some parameters, I build the url, fetch it, and serve it up to the client. The problem is some are way too large, > 20MB! And thus, need to implement paging somehow, and was hoping it could easily be added to the URL
Chad
That's good news. If you're building the URL then you ultimately have total control. You cam update your stored procedure to accept the paging parameters and you'll pretty much be done.
Alison
@Alison, I have a way to change pages (`rc:Section`), but not a way to know how many pages there are, any ideas?
Chad
@Alison, I guess I could put it in the header/footer, then read it through my page to determine the total number... but I would prefer to be able to query that from the url
Chad
+1  A: 

The number of pages in your result depends on the InteractiveSize/PageSize of the report. This won't affect how much data is returned, though. The only way I can see,off the top of my head, is passing a parameter to the query identifying which pages from the result set you want returned. The user might need to select the pages to view from a parameter list.

MikeTWebb
@Chad...yeah, that's the idea. You can create a dynamic Drop Down parameter that loads a list of page ranges based on the other parameter selections. The user can then select the page range. You can then pass this as a parameter to the query. I think Alison and I are one a similar idea
MikeTWebb
@MikeTWebb, I have a way to change pages (`rc:Section`), but not a way to know how many pages there are, any ideas?
Chad
@Chad....yeah, once the user selects the set of parameters that defines your query, you can run the query doing a count(*) and get the count of records back. Then you can decide how to split that number up. If you get a count of 5000...you can create a list for the ranges drop down that has entries like "1...1000", "1001...2000", etc. In Oracle you can use a the built rownum property to retrieve the (n...m) set of records. Not sure exactly how to do that in SQL but I'm sure it's possible
MikeTWebb
@MikeTWebb, I can do that, I know how to do paging in the proc. I was referring to the fact I found a way to select a specific page through the SSRS url with `rc:Section`, I just couldn't find a way to determine through SSRS, how many pages there are total in the report. Though, it knows so there should be a way
Chad
@Chad...gotcha...I'm not sure how to do that either. Drop a comment if you get that one figured out. I'd be interested.
MikeTWebb
A: 

While I kinda agree with paginating through the entity body by using query parameters, I am not so sure that you need to do this. 20mb worth of data is not a lot, and WebClient should be able to handle this without any problems.

Can you show the code where you are downloading the data? Maybe you are doing something that is inefficient and can be fixed easily.

If that doesnt work, then I would like you to create a system.net tracelog for your application that shows the timeout. From that log, we can see if the timeout is due to the read timeout on the socket, or some other reason. That will then determine future course of action.

feroze
Try throwing a 20mb table at IE...it doesn't like it.
Chad