Print Page | Close Window

Group Main Report and Sub report together

Printed From: Crystal Reports Book
Category: Crystal Reports 9 through 2020
Forum Name: Technical Questions
Forum Discription: Formulas, charting data, Crystal syntax, etc.
URL: http://www.crystalreportsbook.com/forum/forum_posts.asp?TID=23002
Printed Date: 25 Apr 2024 at 3:53am


Topic: Group Main Report and Sub report together
Posted By: Tonyak74
Subject: Group Main Report and Sub report together
Date Posted: 25 Apr 2022 at 9:54am
I am working on a report that contains a sub report.
On the Main report, I have a page break by Facility (group) Group Footer 1a. All of my running totals for this report are in the group footer.
I added a sub report to Group Footer 1b.
The issue I am having is that the main report starts a new page for each facility, after that page break the sub report runs for all facilities.
Example
Page 1 (Main report) = Facility A
Page 2 (Sub report) = Facility A, Facility B and Facility C
Page 3 (Main report) = Facility B
Page 4 (Sub report) = Facility A, Facility B and Facility C etc....

I would like the sub report to page and break with the main report.
Page 1 (Main report) = Facility A
Page 2 (Sub report) = Facility A
Page 3 (Main report) = Facility B
Page 4 (Sub report) = Facility B   etc...

Is this possible?



Replies:
Posted By: lockwelle
Date Posted: 26 Apr 2022 at 6:52am
I am going to say "Yes"

Add a parameter to the subreport that is the facility, and then apply a filter in the subreport for the facility.

HTH


Posted By: Tonyak74
Date Posted: 26 Apr 2022 at 8:03am
I do have a parameter on the sub report for the facility.
In my database I have 25+ facilities.
I am running the report for 3 of those facilities.
The data on the Main report and the data on the sub report are both filtering correctly.
The issue is that the Main report gives a page break after each facility. After each page break the sub reports shows, but is showing for all 3 facilities after each facility from the main report.


Posted By: Tonyak74
Date Posted: 26 Apr 2022 at 11:21am
Hi lockwelle,
Thank you for your assistance. I was finally able to figure it out..
I was linking the sub report using the parameter from the main report to the same parameter on the sub report.
I changed the linking to link to the field on the main report instead of the parameter.
Hope that makes sense.
Thanks Again!



Print Page | Close Window