>>Exactly...
>>
>>I just got into my office while looking at my other computer earlier. Yes, the OnPreviewClose() of the print report listener is where I did it. If the "lPrint" parameter was TRUE, I would use that and NOT do the dodefault(lPrint), but instead, set the flag from my original calling loop that user wanted to print, then use GetPrinter() and if chosen, do a set printer to name, then have all subsequent reports all go directly to the printer without prompting each one.
>>
>>
>
>We've tried the simpler way of using NOPAGEEJECT, but ran into 2 problems.
>
>1. 2 reports are portrait and two are landscape, that means we can not chain them together
>
>2. If the cursor has 0 records, the last statement without NOPAGEJECT does nothing.
>
>So, if there a simple way around the problems or we have to go more complicated path with Listener's code?
>
>Thanks in advance.
Hi Naomi,
Two ideas:
Run the last report with records without the NOPAGEEJECT clause.
If the last report is without a record, create a cursor with a single field on a single record, an empty report on the fly like
lcRptFile = SYS(2015)+".FRX"
CREATE CURSOR TempCur (Temp C (10))
APPEND BLANK
CREATE REPORT (JUSTSTEM(lcRptFile)) FROM TempCur
and run the empty report with the single record. This should create an empty page but eject.
Agnes
Words are given to man to enable him to conceal his true feelings.
Charles Maurice de Talleyrand-Périgord
Weeks of programming can save you hours of planning.
OffThere is no place like [::1]