Property NewPagePerGroup with Code

I am trying to make a report that prints posted receipts and lines. I want to group them per Vendor No. I want the user to choose on the option tab if he wants the report to make a page break between vendors (the NewPagePerGroup property). The user should also be able to filter on “Gen. Prod. Posting Group” on the “Purch. Rcpt. Line”. (That means to I have two dataItems.) I don’t want to print any receipt group headers if there are no lines in the filter (the PrintOnlyIfDetail property). Basically I want to write the properties NewPagePerGroup and PrintOnlyIfDetail with code. Have anyone done this? /Magnus

Sure. Create to Global Variables of Boolean type called: PrintDetail and NewPagePerGrp. Place them on the reports request form. To toggle the detail, go to the OnPreSection of that you are trying to control and add in this line of code: CurrReport.SHOWOUTPUT := PrintDetail; Then, on the OnPreSection of the DataItems GroupHeader put: IF CurrReport.TOTALSCAUSEDBY = YourTable.FIELDNO(YourField) THEN BEGIN CurrReport.SHOWOUTPUT := TRUE; IF NewPagePerGrp THEN CurrReport.NEWPAGE; END ELSE CurrReport.SHOWOUTPUT := FALSE; Bill Benefiel Manager of Information Systems Overhead Door Company billb@ohdindy.com (317) 842-7444 ext 117

Thank you for you reply William, but I think you missunderstood me a bit. I don’t want to simulate print detail, I want to simulate PrintOnlyIfDetail, and I want it in combination with grouping my receipts by Vendor No. If there only exist one receipt for a certain vendor and that receipt contains one line and the user sets a filter so that line won’t show, I don’t want to show the GroupHeader for that vendor.