>LOCAL lnPages, lcTemp >lnPages = 0 >WAIT WINDOW 'Preprocessing report...' nowait >* >*here code to create the listener >*then... > >ReportListener.ListenerType = -1 &&no output > >REPORT FORM Report1 Object ReportListener NOPAGEEJECT >REPORT FORM Report2 Object ReportListener NORESET >lnPages = _PAGETOTAL > >ReportListener.ListenerType = 1 &&preview > >REPORT FORM Report1 Object ReportListener NOPAGEEJECT >REPORT FORM Report2 Object ReportListener TO PRINTER PROMPT PREVIEW NORESET >>
>>LOCAL lnPages, lcTemp >>lnPages = 0 >>lcTemp = FORCEEXT(SYS(2015), '.txt') >> >>WAIT WINDOW 'Preprocessing report...' nowait >>REPORT FORM Report1 NOCONSOLE TO FILE &lcTemp NOPAGEEJECT >>REPORT FORM Report2 NOCONSOLE TO FILE &lcTemp NORESET >>lnPages = _PAGETOTAL >>ERASE (lcTemp) >>WAIT CLEAR >> >>REPORT FORM Report1 TO PRINTER PROMPT PREVIEW NOPAGEEJECT >>REPORT FORM Report2 TO PRINTER PROMPT PREVIEW NORESET >>>>