× The internal search function is temporarily non-functional. The current search engine is no longer viable and we are researching alternatives.
As a stop gap measure, we are using Google's custom search engine service.
If you know of an easy to use, open source, search engine ... please contact support@midrange.com.



I am offering an option with our software to create a PDF instead of a hard copy using OVRPRTF.
Got it working with both interactive and batch reports. I have all this coded in the CL.
This is running with WINGS and OA over the web. So I force it to use a pre-defined user id for
the PDF process.

IF COND(&WCPDF *EQ 'Y') THEN(DO) <== yes PDF
<CALL cl TO GET HANDLE, DELETE PDF IF IT EXISTS, CONSTRUCT WEB AND QNTC PATHS>
(STEP A)
OVRPRTF FILE(ROWRECP) TOFILE(*FILE) DEVTYPE(*AFPDS) +
PAGESIZE(&PGSZ 8.5 *UOM) LPI(8) CPI(10) +
FRONTMGN(&OFFV &OFFH) OVRFLW(&OVFL) +
DRAWER(&WCRRD) PAGRTT(0) UOM(*INCH) +
OUTQ(&OUTQ) COPIES(&ROWCPY) HOLD(&HOLD) +
TOSTMF(&WCPDFQ) WSCST(*PDF) <===
ENDDO
CALL PGM(ROW280) PARM(&PCTL)

IF COND(&WCPDF *EQ 'Y') THEN(DO) (STEP B)

CALL PGM(ROW299S) PARM(&WCPDFQ &WCPDFW) <=== WEB WINGS OA APP
CALL PGM(QSYS/QWTSETP) PARM(&CHANDLE)
CALL PGM(QSYS/QSYRLSPH) PARM(&NHANDLE)
CALL PGM(QSYS/QSYRLSPH) PARM(&CHANDLE)
CHGJOB SWS(00000000)
ENDDO

But having some difficulty with any application that does not end when you request the print.
An example, you are presented with a receipt number to reprint. It reprints the receipt, but takes
you back to the receipt number entry to possibly enter another receipt. If I put step A and the OVRPRTF
in the CL, it works the first time fine. But the second time, it appears to ‘lose’ the handles and bomb.

I left the OVRPRTF in the CL program, put calls before and after pieces in the RPG that OPEN
and CLOSE the print file. If I display the job, I can see the OVRPRTF
and it is correct. If I put the program in debug, I can see the handles and paths and
they look OK, but the PDF is not created. Looked on the web and cannot find anything specific to this.


C CALL 'ROW283PDFC' <== DO STEP A (get handles and paths, remove old PDF)
C parm pdfw
C parm pdfq
C parm chandle
C parm nhandle
C endif
C OPEN ROW281P

PRINT RECEIPT

C CLOSE ROW281P
C if wcpdf='Y' or wcpdf='R' <=== DO STEP B (Display PDF and do housekeeping)
C CALL 'ROWPDF2C'
C parm pdfw
C parm pdfq
C parm chandle
C parm nhandle
C endif

Tom Deskevich
INFOCON
814-472-6066
Fax 814-472-5019

As an Amazon Associate we earn from qualifying purchases.

This thread ...


Follow On AppleNews
Return to Archive home page | Return to MIDRANGE.COM home page

This mailing list archive is Copyright 1997-2024 by midrange.com and David Gibbs as a compilation work. Use of the archive is restricted to research of a business or technical nature. Any other uses are prohibited. Full details are available on our policy page. If you have questions about this, please contact [javascript protected email address].

Operating expenses for this site are earned using the Amazon Associate program and Google Adsense.