This formula in the Header:
WhilePrintingRecords; Global numberVar inc := 0;
Conditional Suppression in the Header Section:
If onlastrecord or{PO_25CRWPurchaseOrderHeader.PurchaseOrderNumber}<> next({PO_25CRWPurchaseOrderHeader.PurchaseOrderNumber}) then true else false
This works perfectly when I have two or more rows of Detail. However, when there is only one row of detail, it suppresses the Header in error. Any suggestions would be appreciated.
uncheck the suppress button and write your formula… in case of null or single record the function which you are writing won’t work as there is no next or previous records…
First off, you don’t need the whole “If” statement because the condition already evaluates to True or False. Here’s what I would do:
onlastrecord or (
not OnFirstRecord and
{PO_25CRWPurchaseOrderHeader.PurchaseOrderNumber}<> next({PO_25CRWPurchaseOrderHeader.PurchaseOrderNumber}) and
{PO_25CRWPurchaseOrderHeader.PurchaseOrderNumber} = previous({PO_25CRWPurchaseOrderHeader.PurchaseOrderNumber}) )
This makes sure that you’re not on the first record and that you have at least one previous record with the same purchase order before suppressing.