Print Page | Close Window

How to have subreport data show after main report

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=22823
Printed Date: 25 Apr 2024 at 5:59am


Topic: How to have subreport data show after main report
Posted By: Michele
Subject: How to have subreport data show after main report
Date Posted: 23 Sep 2019 at 9:12am
I have a main crystal report (2008) with data in details a with page header:
Page Header: id last first mi date1 date2
details a:     id last first mi date1 date2

I added details b to insert the subreport:
details b:    <subreport name> ...has similar data/titles; uses param from main report

When I preview my report, I'm seeing one person (row) per page, and I cancel the preview after it gets to 1000 pages.
Before I added the subreport I had maybe 8 pages of data, with the full page filling up with rows, with maybe a total of 50 per page I'm guessing.

I'm trying to figure out how to get the main report data to show on it's 8 pages or so, and then in the following page (or after the end of main data), show the subreport data. Subreport data is only a few rows total.

I'm not really sure how to do groups. I tried adding a group to my main report, and order by id, but couldn't figure out how to get a group2 with the details b data. I'm not sure if that would fix it or not. Right now my report shows

page header
group header 1 (hidden)
group header 2 (not sure how to move it so it has detailsb)
details a <data>
details b <subreport>
group footer 2
group footer 1

I tried googling the issue but can't find a solution or similar problem.

-------------
Accept that which is good



Replies:
Posted By: DBlank
Date Posted: 27 Sep 2019 at 10:03am
putting a sub report on a detail section means that the entire sub report is going to run (and display) the entire sub report for every row of data you have in your data set. so if you had say 10,000 rows of sales your subreport is trying to run 10,000 times.


Posted By: kevlray
Date Posted: 30 Sep 2019 at 7:11am
If you want to have the sub-report show after the main report data, then I believe you should have the sub-report in the report footer section.



Print Page | Close Window