Search code examples
crystal-reportscrystal-reports-2008

Suppress section if details empty on page X - Crystal Reports


I've been working with Crystal Reports 2008 for a while now, and while I get the general gist of it, some things seem quite hard to do, especially because I don't know what tags and proper syntax is allowed within CR.

Anyway, my problem is as follows: I've been making an invoice layout, but sometimes the Details-section ends at a page, but the section containing the invoice summary (including the final price and such) is printed on the page after that. That also means the Details header is printed the next page, with nothing between the header and the summary.

Is it possible to conditionally suppress Page Header D when the Details section is null on the last page?

Trying something along the lines of

IF {Section Details} = "" AND pagenumber=TotalPageCount
THEN TRUE
ELSE FALSE

I'm sorry if I'm making no sense; there is a drastic lack of coffee around here.


Solution

  • Try just using the keyword OnLastRecord for your Page Header suppression formula. The only situation I'm not 100% sure about is when your last page only contains a single record (the last record)... it might still suppress the header in that situation, but I think it's probably OK.