>I'd like to give the user an option to print a report with each group on a new page or not. It there a way to control this programmatically?
>
>Thanks,
>Larry Morelli
Create two data groups on the report. The first one should have an expression of EVALUATE(lcBreak) and set it to start on a new page. This doesn't have any fields in the data group header or footer .. it's sole purpose is to create a page break.
The second data group should have an expression that is the trigger for your data group such as CustomerID. You put the normal group header and footer stuff in these bands.
In the program that calls the report, ask the user if they want to print on separate pages. If so, set the variable lcBreak to "CustomerID" and every time CustomerID changes, the group triggers and starts a new page. If the user doesn't want a page break, set the variable lcBreak to '.t.' which will never change throughout the life of the report, thus, no page breaks are triggered for it.