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 strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Page numbers 1

Status
Not open for further replies.

keo216

Technical User
Nov 26, 2002
102
US
I am using CR8.5
I have a main report with one sub-report in report footer (RFh).
Both main and sub-reports are multi-page.
It starts a new page before starting to print the sub-report.

On page header (PHa) of main report I have field{page N of M}. I want it to show only the total pages in main report.
But it calculates the total pages to be displayed (M) as the total pages in main report AND sub-report.

How do I get it to only show pages in main report and be suppressed when sub-report is displayed?

Any suggestions?
thanks
keo

kowen@rrwa.net
 
I am assuming your subreport (section RFh) starts on a new page. If so, in RFg section format check the "reset page number after" box.
To keep the Page N of M from printing in the sub report section you can use two formulas:

// {@PrintSubRptInit}
WhilePrintingRecords;
StringVar SubRpt:="N";

// {@PrintSubRpt}
WhilePrintingRecords;
StringVar SubRpt:="Y";

Place {@PrintSubRptInit} in your report header.
Place {PrintSubRpt} in the section just above the report footer section that contains your subreport (RFg).

Conditionally suppress "page N of M" with the following code:
WhilePrintingRecords;
StringVar SubRpt;
SubRpt = "Y"

MrBill
 
We had earlier run into an issue wherein we had Page N Of M in a Sub Report which was placed in the Report Footer. The Page N of M always showed Page 1 Of 1.

Any Thoughts? This issue still persists.

-Engi
 
I don't know why the subreport would always show 1 of 1. Maybe it has something to do with the way the report retrieves the pages of the subreport. I would try removing the "Page N of M" from the subreport and print it in the pageheader of the main report. I haven't tested this but it might be worth a try.
MrBill
 
Both out PageHeader and Page Footer are Sub Reports. Do you think it will still work?

Please advice

-Engi
 
Don't know. You could try it. Also you could have your page N of M in you main report page header and remove it from the subreport that is in your page header. All I can say is give it a try. I think putting the page N of M in your main report page header (not in subreport) would be your best bet.
MrBill
 
After finally getting back to this problem, it is solved.

MrBillSC was correct.

I want 'Page N of M' to print in both the main report and the subreport. With 'Page N of M' being in Section PHa of main report and the subreport being in section RFh I went to the next previous section which would print (RFg) and told it to 'reset page nuber after'. Now both the main report show 'Page N of M' correctly as will the subreport.
Thanks for the help.

kowen@rrwa.net
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top