views:

326

answers:

1

I have a Crystal Report that has a header and a subreport with the height locked at a exact amount so the subreport will display a maximum of 20 rows on the page.

However, this limitation has restricted the use of the system, and the users now require an unlimited number of rows in the subreport.

I wish to keep the same layout as the report currently is, however the first 20 rows of the subreport will be on Page1, the next 20 rows (21-40) will be on Page 2, and so on.

How would I modify the logic in the Crystal Report to allow this kind of functionality?

Thanks.

A: 

I don't have Crystal Reports handy, but off the top of my head you can try adding a formula to the subreport's detail New Page After, by doing something like this:

RecordNumber Mod 20 = 0

For every 20th record, the subreport should page break after the detail.

LittleBobbyTables
It was actually "RecordNumber", and testing directly on the subreport, however, when i reimport the subreport back into my main report, the change isn't replicated. I checked the properties of the subreport object, and enabled the "can grow" checkbox. When the report is rerun, rows 21-40 are at the top of second page, overwriting the header which should be the same as the first page.Previously, I added a series of blank rows at the end of the subreport's footer to "fill-in" and remaining rows, these are also on the second page.How do I fix the subreport to stay within its area?
laughing chocolates
Two questions -- is your header information in the page header or detail section? and is your subreport in the detail section, or somewhere else? I tested a report with the header information in Page Header, and the subreport in the details, and it displayed as expected; the subreport stayed at the bottom of the report, and showed 20 records per page.
LittleBobbyTables
laughing chocolates
Yeah, short of redesigning your report, and not really knowing your data structures, I can't think of any way to have your subreport span multiple pages while still keeping the header and details above and below intact. I'd be happy to put a bounty on this if you want to get more visibility.
LittleBobbyTables
It might be best if I redesign the report. I thought that through the magic wizardry of Crystal Reports there must be some way. Thanks, I'll keep you posted.
laughing chocolates