Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Separate PDF of every Invoice

Status
Not open for further replies.

mstrcmtr

Programmer
Nov 14, 2007
103
PK
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
 
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
 
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
 
Your command:

Code:
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.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top