Solved

Ssrs footer problems with multiple page batch reporting

Posted on 2014-04-11
4
1,338 Views
Last Modified: 2014-05-12
I have a report with a header a footer and a sub report in the body.  The sub report has keeptogether false because it can span more than one page.  In print preview I will see the header and footer are missing most of the information (usually obtained from reportitems.)

The reportitems points at a table in the body of the report that gets data from the dataset.  The problem appears to be that the row which has the subreport and spans two pages only seems to bring the reportitems with it that are part of the same row, that means rows above (and frankly below) which can fit on one page are written on the first page and the second page is unable to access those report items which are now considered blank by the report.  How can I give the header and footer access to report items that may be on a different page from the one they are currently rendering?
0
Comment
Question by:UnderSeven
  • 2
4 Comments
 
LVL 27

Expert Comment

by:planocz
Comment Utility
You have to keep the sub-report together. To test your sub-report you need to run it as a standlone report. Once the subreport is running correctly, then you can import it into your Main Report with the correct parameters that you need between them.
0
 

Author Comment

by:UnderSeven
Comment Utility
The problem is items on the header and footer, not in the sub report.  It runs fine.
0
 
LVL 22

Accepted Solution

by:
Nico Bontenbal earned 500 total points
Comment Utility
Can you upload your report (or an adapted report that has the same behavior) here?

One thing you could try is add a field with =Globals!TotalPages as expression. This forces SSRS to render the entire report first. This sometimes helps in situations like this.
If it works you can set the text color to white so the value is not displayed.

You say the data comes from a dataset. Can you get to the data directly with the First, Last, Sum and Lookup functions. You can specify a dataset in those functions.

Another option might be to use custom code to store and retrieve the value. See this article for a starting point:
http://technet.microsoft.com/en-us/library/ms155798(v=sql.100).aspx
Then you can try to adapt the information in this article for your scenario:
http://blogs.msdn.com/b/robertbruckner/archive/2008/07/20/using-group-variables-in-reporting-services-2008-for-custom-aggregation.aspx
It explains how you can send values to custom code and then retrieve those values with another function. You might need to combine this technique with the TotalPages global.

But it is difficult to answer your question with only a global description of the report.
0
 

Author Closing Comment

by:UnderSeven
Comment Utility
I used a work around where as I cleared the lines, but some of these are very valuable to know.  Rather than uploading the report and messing with this any longer, I'm going to stick with the information you gave which was very helpful.  Thank you.
0

Featured Post

Highfive Gives IT Their Time Back

Highfive is so simple that setting up every meeting room takes just minutes and every employee will be able to start or join a call from any room with ease. Never be called into a meeting just to get it started again. This is how video conferencing should work!

Join & Write a Comment

A long time ago (May 2011), I have written an article showing you how to create a DLL using Visual Studio 2005 to be hosted in SQL Server 2005. That was valid at that time and it is still valid if you are still using these versions. You can still re…
Today, still in the boom of Apple, PC's and products, nearly 50% of the computer users use Windows as graphical operating systems. If you are among those users who love windows, but are grappling to keep the system's hard drive optimized, then you s…
Access reports are powerful and flexible. Learn how to create a query and then a grouped report using the wizard. Modify the report design after the wizard is done to make it look better. There will be another video to explain how to put the final p…
This tutorial demonstrates a quick way of adding group price to multiple Magento products.

772 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

11 Experts available now in Live!

Get 1:1 Help Now