none
SSRS 2008 R2 - Nested Groups and Page Headers

    Question

  • Client is using SSRS 2008 R2.

    We have created a relatively simple report for this client; the report has nested groups and uses 4 expressions to repeat group headings on each page as necessary.

    Here's the issue: when rendered in pdf or print layout, if the last item in the first group spills over to a second (or third or fourth...) page, the expressions to repeat group headings incorrectly prints the group headings for the next group.

    I've spent the better part of two days trolling the web, reading about pagination, page headers, renderers, etc., and I'm still clueless.  The closest thing I found was related to hidden columns and fields, but I've torn the report apart and rebuilt it and can't find any hidden items.

    Here's one of the expressions; this text box (which is NOT hidden) is in the first group container (the one that contains all the other groups):

    =Code.SetMajorCode(Fields![Major_Code].Value)

    This expression is then referenced in another expression in the page header as follows:

    =Code.MajorCode

    I'm stumped.  Any help would be most appreciated.  Thanks.

    Friday, January 10, 2014 3:56 AM

Answers

All replies

  • Hello,

    The issue due to have 2 different rules in pagination: Physical pagination and Logical pagination.

    In SQL Server Reporting Services (SSRS), Physical pagination is controlled by the PageSize properties, and the Logical pagination is controlled by the InteractiveSize properties. Physical pagination is used to the print control and the TIFF and PDF rendering extensions. Logical pagination is used to the HTML and GDI rendering extensions.

    If we are just specify the same size to PageSize and InteractiveSize, we will get more pages in PDF or other physical formats due to the Margin properties of Report are only applied in the physical pagination.
    Reference: http://blogs.msdn.com/b/sqlforum/archive/2011/02/28/faq-how-do-i-get-the-same-page-number-in-web-page-and-pdf.aspx

    According to your description, did you want to repeat headers in each page?   We can according to set the properties to get the same effect. Please refer to the following article below:
    http://social.technet.microsoft.com/wiki/contents/articles/19398.ssrs-how-to-repeat-headers-on-each-page.aspx

    Regards,
    Alisa Tang


    Alisa Tang
    TechNet Community Support

    Monday, January 13, 2014 5:46 AM
  • I've read many, many blogs, forums, support sites and technet pages - all to no avail.  I understand about physical and logical pagination (although I didn't before I started trying to fix this issue).

    Margins are set to 0.5in for top, bottom, right and left.  Page size is 8.5x11.0; interactive size is 7.5x10.0.  I even tried setting the interactive size to 7.45x9.95 - still no dice.

    The second website provided in your answer doesn't work for nested groups - the data simply does not print on any page but the first page of the group.

    To answer your question, yes, I want to repeat headers on each page.  Neither solution you proposed has worked for me.

    Any other suggestions would be greatly appreciated.

    Thanks.

    Monday, January 13, 2014 8:46 PM
  • Hello,

    Please try to change the body size to resolve the issue. You can refer to the following equalities:
    Body Width <= Page Width - (Left Margin + Right Margin)
    Body Height <= Page Width - (Top Margin + Bottom Margin)

    There is an article about The "Every Other Page Is Blank" Feature, you can refer to it.
    http://blogs.msdn.com/b/chrisbal/archive/2006/08/10/694892.aspx

    Hope this helps.

    Regards,
    Alisa Tang


    Alisa Tang
    TechNet Community Support

    Tuesday, January 14, 2014 1:58 AM