Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Programmatically control Group starts on new page
Message
General information
Forum:
Visual FoxPro
Category:
Reports & Report designer
Environment versions
Visual FoxPro:
VFP 9 SP1
OS:
Windows XP SP2
Miscellaneous
Thread ID:
01342804
Message ID:
01343329
Views:
22
Great and simple solution!

For some reason I think I saw it before, but didn't recall when needed.

>>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.
If it's not broken, fix it until it is.


My Blog
Previous
Reply
Map
View

Click here to load this message in the networking platform