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

Underlayed Subreport 10 records per page

Status
Not open for further replies.

ugi2

Technical User
Nov 6, 2009
12
US
Hi,

I am using Crystal Reports 10 - I have a Main report with an underlayed Subreport in PHb - the Main report prints on the top half of the page and the underlayed Subreport prints on the bottom half of the page - I need the Details section of each report to print records 1 through 10 on the first page, records 11 through 20 on the second page, etc.

In the Details Section Expert of each report I checked "New Page After" and added the formula "if Remainder (RecordNumber, 10) = 0 then true else false" - this works on the Main report, but the Subreport still prints records 1 through 10 on every page.

I am new to Crystal Reports, so any help you can give would be greatly appreciated.

Thanks,
Brenda
 
The subreport executes in its entirety on each page, so you need to suppress records to get the desired results. The following worked when tested. Place the following formula in PH_a and suppress it:

whileprintingrecords;
shared numbervar pageno := pagenumber;

Then in the subreport->section expert->detail->suppress->x+2 enter:

whileprintingrecords;
shared numbervar pageno;
recordnumber < pageno*10 - 9 or
recordnumber > pageno*10

-LB
 
It worked! You are brilliant!

Thanks so much,
Brenda
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top