Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

2 reports in 1 - subreport on new page 1

Status
Not open for further replies.

johnhugh

Technical User
Mar 24, 2010
702
SG
Hi, I'm using Crystal 10.

I want to print an item label report on a new page after having printed an item receipt report.

I've tried using a subreport placing it into the page footer and only showing it on the last page.
But for page footers there is no option 'new page before'

Also tried entering it in the report footer but then I have to somehow hide the headers from the original report as they are shown on the new page for my subreport as well.

is there a better way of handling this?
 
Put the sub in the report footer. If you format the RF to new page before, you can use the following formula to suppress the page header:

onlastrecord

This will work in all cases except if there is one detail record on the last page.

If the subreport always only takes one page, you can use this suppression formula on the page header:

pagenumber = totalpagecount

There is another more foolproof, but more complex method, if neither of these works for you.

-LB
 
Thank you lbass,

I will however have only 1 record on the last page and my subreport can also be morwe than 1 page.

So I probably need something that counts the pages of my main report.
I would then supress the header starting after my main report is finished?
Is this what you mean by a 'more complex method'?
 
Create two formulas:

//{@false} to be placed in the main report report header:
whileprintingrecords;
booleanvar flag := false;

//{@true} to be placed in the section (report footer) containing the subreport:
whileprintingrecords;
booleanvar flag := true;

Then in the section expert->page header->suppress->x+2, enter:

whileprintingrecords;
booleanvar flag;
flag = true //note no colon

-LB
 
Thank you lbass.
That worked beautifully.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top