Search code examples
asp.netpaginationcrystal-reportssubreport

ASP.net: Crystal Reports - Subreport over multiple pages


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.


Solution

  • 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.