Print Page | Close Window

Fire Subreports in a new Page

Printed From: Crystal Reports Book
Category: Crystal Reports 9 through 2020
Forum Name: Report Design
Forum Discription: The best way to design a report and problems you have encountered
URL: http://www.crystalreportsbook.com/forum/forum_posts.asp?TID=123
Printed Date: 19 May 2024 at 10:53am


Topic: Fire Subreports in a new Page
Posted By: abhi81
Subject: Fire Subreports in a new Page
Date Posted: 15 Jan 2007 at 8:32am
Hello,
I have a report with 2 page header and 2 details section 1 for the details and 1 for the subtotal and tax information which comes after the end of order details.
I want to create a linked subreport and fire it in a new page after the order details & subtotal,tax info have been rendered on the report details sections.
 
I have created a linked subreport but am not sure where i should be placing(which section) it and how to have it fire in a blank new page after the order details thing.
 
I also need the page header and page footer from the main report in the subreport.



Replies:
Posted By: BrianBischof
Date Posted: 15 Jan 2007 at 11:10am
How about creating a third Details section and putting the subreport there? Set the property New Page Before so that it forces a page break before printing.

For the page header in the sub-report, you have to fake it by creating a dummy group and putting the header/footer info there. Set it to print on each page.


-------------
Please support the forum! Tell others by linking to it on your blog or website:<a href="http://www.crystalreportsbook.com/forum/">Crystal Reports Forum</a>


Posted By: abhi81
Date Posted: 15 Jan 2007 at 11:43am
I was able to create the page header and page footer in the subreport using the technique mentioned .
 
However when i create a new details section and put the sub report there what happens is that it pushes itselef in between all the details record,i.e., 1 line of order detail and then 1 page of sub report and so on.
 
One thing i wanted to mention is that of the 2 details sections i have suppress formula define on the scond one,i.e. for the order details as
 
if onlastrecord then
 false
else
 true
 
I have done this to make the subtotal and tax information visible only after the order details has been printed.


Posted By: BrianBischof
Date Posted: 15 Jan 2007 at 12:04pm
Ah yes, of course it would be inserted in with the other detail sections. My mistake. You could put the subreport in the report footer to make sure it ends up printing after all the detail records. If for some reason that conflicts with other fields in your report footer, you can create a fake group that goes around the detail a and b sections and put the subreport in the group footer section. 

-------------
Please support the forum! Tell others by linking to it on your blog or website:<a href="http://www.crystalreportsbook.com/forum/">Crystal Reports Forum</a>


Posted By: abhi81
Date Posted: 15 Jan 2007 at 2:02pm
Thanks brian,
It is working as desired now.



Print Page | Close Window