Separate PDF of every Invoice Separate PDF of every Invoice mstrcmtr (Programmer) (OP) 6 Sep 18 08:16 Creating PDF file of Sale invoices with the help of FoxyPreviewer.App REPORT FORM Sls_Report1 OBJECT TYPE 10 TO FILE 'Sls_Rpt1.PDF' PREVIEW Sometime user select more then 1 invoice How create or what technique use to create separate PDF of every Invoice RE: Separate PDF of every Invoice Tore Bleken (Programmer) 6 Sep 18 09:35 Run the report inside a loop. RE: Separate PDF of every Invoice Mike Lewis (Programmer) 6 Sep 18 10:13 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) Visual FoxPro articles, tips and downloads RE: Separate PDF of every Invoice Olaf Doschke (Programmer) 6 Sep 18 10:29 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. Bye, Olaf. Olaf Doschke Software Engineering https://www.doschke.name RE: Separate PDF of every Invoice GriffMG (Programmer) 6 Sep 18 14:40 Your command: CODEREPORT 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: CODEREPORT 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 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.