Technical Questions
 Crystal Reports Forum : Crystal Reports 9 through 2022 : Technical Questions
Message Icon Topic: Subreport into Report Header Post Reply Post New Topic
Author Message
thummel1
Senior Member
Senior Member
Avatar

Joined: 27 Apr 2012
Location: United States
Online Status: Offline
Posts: 140
Quote thummel1 Replybullet Topic: Subreport into Report Header
    Posted: 03 Aug 2016 at 3:11am
Hi, I have CR2011. My customer would like to see the running totals for Group 1 (There are 3 groups) in the report header, versus scrolling through 18 pages to get totals for the 9 results they need. My thoughts were to create a separate report with just this information(subreport), and bring in the entire subreport to the report header of my main report.

Is this possible? I've created subreports that bring in data to a group in my main report, but never in a report header. Is this possible? Guidance, steps are greatly appreciated!
"Press any key to continue. Where's the 'Any' Key?" ~Homer Simpson
IP IP Logged
kevlray
Admin Group
Admin Group
Avatar

Joined: 29 Oct 2009
Online Status: Offline
Posts: 1587
Quote kevlray Replybullet Posted: 03 Aug 2016 at 3:58am
It quite possible, in fact I have done a number of times to do something similar to what you are suggesting.  Now if the sub-report is longer that your page, I have seen some odd things happen.  Normally I just pass values from the sub-report to the main report when it is in the report header.
IP IP Logged
thummel1
Senior Member
Senior Member
Avatar

Joined: 27 Apr 2012
Location: United States
Online Status: Offline
Posts: 140
Quote thummel1 Replybullet Posted: 03 Aug 2016 at 4:27am
That's good news. The data from the sub report will fit easily in the header, it would only be 9 lines long.

How would I get this started? Do I create a shared variable for each metric in the subreport (there are 6). Then I'd assume my join would be on group 1 of the main report to group 1 of sub report? Thank you, sub reports are not my strong suit.
"Press any key to continue. Where's the 'Any' Key?" ~Homer Simpson
IP IP Logged
kevlray
Admin Group
Admin Group
Avatar

Joined: 29 Oct 2009
Online Status: Offline
Posts: 1587
Quote kevlray Replybullet Posted: 03 Aug 2016 at 7:19am
The big question is passing the correct parameter(s) to a sub-report or reports that would be in a report header.  Since they are outside of the groups.  Also yes you would be creating a shared variable for each metric in the sub-report (in a formula).  Likewise you would need the same shared variables defined (in a formula) in the main report (in a section after where the sub-report is placed).  Hopefully this will get you started.
IP IP Logged
Gogogin
Newbie
Newbie
Avatar

Joined: 02 Aug 2016
Location: United States
Online Status: Offline
Posts: 2
Quote Gogogin Replybullet Posted: 08 Aug 2016 at 3:14am
what I usually do in this situation is save a second copy of the current report. Suppress or eliminate everything that is unnecessary from the second (sub) report. Then insert it as a sub in the first report. Set your subreport links to reference the same parameters as the first report and voila! The numbers should appear in the page header.
IP IP Logged
Post Reply Post New Topic
Printable version Printable version

Forum Jump
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot delete your posts in this forum
You cannot edit your posts in this forum
You cannot create polls in this forum
You cannot vote in polls in this forum



This page was generated in 0.016 seconds.