Is there any reason why you can't do each invoice separately, with a separate REPORT FORM command?
If the user wants to preview the invoice before generating the PDF, you can do the REPORT FORM ... PREVIEW as you are doing now, and let the user do the PDF from within the FoxyPreviewer window. If you don't need the preview, just issue your REPORT FORM for each invoice.
Mike
__________________________________
Mike Lewis (Edinburgh, Scotland)
As both Tore and Mike suggested the solution is to do many REPORT FORM in a loop. When you're in preview the toolbar print button will just forward the printjob as is from preview to printer or PDF output as one jib. There is no way of intercepting there on that level.
As workaround recommendation for users, I'd instruct them to use the preview the way they do to get the overall overview, then exit from the preview without printing and print invoices separately. You could support that process by offering an iterative printing of the invoice choices without preview on top of the current print functionality and that'd cover this case.
The only thing that would make this a step more comfortable would be to customize the print preview toolbar and actually suppress the print button. What you'd then perhaps want is a printjob button just acting like the close/cancel/exit button without starting the printing but h signaling to you the PDFs are wanted, then you can loop.
Foxypreviewer comes with source code, you'll find the print preview toolbar and you can change it and add whatever buttons you need.
REPORT FORM Sls_Report1 OBJECT TYPE 10 TO FILE 'Sls_Rpt1.PDF' PREVIEW
Should modified so that each call to REPORT FORM has a different pdf file name - probably using a string variable
with the invoice number in it. I'm not familiar with Foxy but I would expect it to be like this:
Code:
REPORT FORM Sls_Report1 OBJECT TYPE 10 TO FILE ("Sls_Rpt"+INVOICES.INVOICENO+".PDF") PREVIEW
This assuming your invoices table is called INVOICES and the invoice reference is in the INVOICENO field (which is a string rather than a number)
Regards
Griff
Keep [Smile]ing
There are 10 kinds of people in the world, those who understand binary and those who don't.
I'm trying to cut down on the use of shrieks (exclamation marks), I'm told they are !good for you.
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.