` Printed Icetips Article

Icetips Article



Par2: Conditional Page Breaks in reports
1999-12-14 -- Carl Broll
 
Assuming that you have a group break for the department, you can set or
clear PROP:PageAfter of the group footer.
For example:

    SETTARGET(Report)
    IF UserWantsDepartmentsSeparated
       ?DepartmentBreakFooter{PROP:PageAfter} = True
    ELSE
        ?DepartmentBreakFooter{PROP:PageAfter} = False
    END
    SETTARGET

Actually, if you leave the group footer's "Page after" checkbox unchecked in
the AppGen report formatter you should only need:

    SETTARGET(Report)
    IF UserWantsDepartmentsSeparated
        ?DepartmentBreakFooter{PROP:PageAfter} = True
    END
    SETTARGET

Steve Gallafant adds:
My personal preference for this code (not nearly as readable but definitely
nifty) is

Report$DepartmentBreakFooter{PROP:PageAfter} = UserWantsDepartmentsSeparated

assuming UserWantsDepartmentsSeparated will evaluate correctly for the PROP
assignment.



Printed November 21, 2024, 6:37 am
This article has been viewed/printed 35214 times.