简体   繁体   中英

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.

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.

Right click on the report page header you want to conditionally suppress. Section Expert -> page Header -> Check the checkbox for Suppress and click on the formula button on right side against suppress in same section expert screen and in the formula..just write Onlastrecord AND NOT Onfirstrecord

Done !! This way, even if one record is there, the page header will show else it will get suppressed if no more rows are present on next page in the corresponding details section. you can have report footer or any summary following the details without any ugly page header and lines showing.

Apply the same Suppress formula to Report Footer Section also if you don't want report footer on the last page.

Thanks to Abhilash in this SAP Forum

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM