Hi All:
I have the following program, based heavily on code supplied by Tamar Granor (thanks!), that produces a cross tab report. Since I don't know ahead of time how many columns there are going to be, it produces a separate report for each page, printing the correct columns based on the nPage variable.
The problem is that if I set the outputtype to 0, the user gets a separate report preview for each page, which is a pain if the report has, say 53 pages!
I've heard that there is a way to chain reports with a report listener, but I don't have the foggiest where to begin.
Can you help me?
Thanks,
Yossi
Here's the code:
SELECT IngRptAll
oListener = NEWOBJECT("EffectsListener",HOME(2) + "\Solution\Europa\DynamicFormatting.prg")
IF tlPrint
oListener.OUTPUTTYPE = 0
ELSE
oListener.OUTPUTTYPE = 1
ENDIF
FOR nPage = 1 TO nPages
REPORT FORM IngRptNew4 OBJECT oListener
ENDFOR
SET REPORTBEHAVIOR &nOldReportBehavior