Click here to monitor SSC
SQLServerCentral is supported by Red Gate Software Ltd.
 
Log in  ::  Register  ::  Not logged in
 
 
 
        
Home       Members    Calendar    Who's On


Add to briefcase

Group and subreports Expand / Collapse
Author
Message
Posted Wednesday, June 26, 2013 10:40 AM


SSC-Enthusiastic

SSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-Enthusiastic

Group: General Forum Members
Last Login: Tuesday, December 16, 2014 8:22 AM
Points: 165, Visits: 496
Hi all,

I've been battling this issue on and off for a couple days and it seems that I'm not getting anywhere, so I'm asking for help.

I have a main report with only one group level based on column 1, sum(column2)

I have added a row inside the group - below and in this row I added a subreport that has a parameter linked to the column 1.

The problem that I'm facing is that I want to keep the group row and the row which the subreport is contained together in one page. However, when I display the report on a pdf file some of the group rows (column 1, sum(column2) ) display at the bottom of the page and then the row containing the report on the next page. I want the group row to fall to the next page if the report row data does not fit on the same page.

Any ideas, I've read that grouping in SSRS 2008 R2 has problems. I could add a page break after the row of the report but that would add too many pages since some of my group reports have only a few rows.

Also, the query for the intial column 1, sum(column2) is a very complicated query and the sum(column2) would not work as intended if I were to add the subreport query in the main report's query.


Thanks.


Post #1467774
Posted Wednesday, June 26, 2013 5:09 PM


SSCommitted

SSCommittedSSCommittedSSCommittedSSCommittedSSCommittedSSCommittedSSCommittedSSCommitted

Group: General Forum Members
Last Login: Today @ 6:17 AM
Points: 1,816, Visits: 5,913
Instead of adding a row inside the group, try this:

Start with a Table with two columns, one for your "group" value and one for the aggregate (sum):

Select both cells on the second row and Merge them (optional - just for formatting so the subreport can span the width of the table):

Add a Rectangle to the bottom cell:

Add a textbox for the group value and a textbox for the aggregate, then add the subreport:


Now, your subreport will stay on the same page as it's owner.

I guess there are other ways, but this definitely works and is quite simple.


MM


  • MMGrid Addin
  • MMNose Addin


  • Forum Etiquette: How to post Reporting Services problems
  • Forum Etiquette: How to post data/code on a forum to get the best help - by Jeff Moden
  • How to Post Performance Problems - by Gail Shaw



  •   Post Attachments 
    Step1.PNG (24 views, 902 bytes)
    Step2.PNG (22 views, 1.06 KB)
    Step3.PNG (22 views, 2.26 KB)
    Step4.PNG (24 views, 3.46 KB)
    Post #1467906
    Posted Thursday, June 27, 2013 1:35 PM


    SSC-Enthusiastic

    SSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-Enthusiastic

    Group: General Forum Members
    Last Login: Tuesday, December 16, 2014 8:22 AM
    Points: 165, Visits: 496
    Thank you for the suggestion, I tried and it works pretty good.

    Pretty clever.
    Post #1468319
    Posted Thursday, June 27, 2013 1:37 PM


    SSCommitted

    SSCommittedSSCommittedSSCommittedSSCommittedSSCommittedSSCommittedSSCommittedSSCommitted

    Group: General Forum Members
    Last Login: Today @ 6:17 AM
    Points: 1,816, Visits: 5,913
    HildaJ (6/27/2013)
    Thank you for the suggestion, I tried and it works pretty good.

    Pretty clever.


    Glad it helped, and thanks for the feedback


    MM


  • MMGrid Addin
  • MMNose Addin


  • Forum Etiquette: How to post Reporting Services problems
  • Forum Etiquette: How to post data/code on a forum to get the best help - by Jeff Moden
  • How to Post Performance Problems - by Gail Shaw

  • Post #1468322
    « Prev Topic | Next Topic »

    Add to briefcase

    Permissions Expand / Collapse