×
INTELLIGENT WORK FORUMS
FOR COMPUTER PROFESSIONALS

Log In

Come Join Us!

Are you a
Computer / IT professional?
Join Tek-Tips Forums!
  • Talk With Other Members
  • Be Notified Of Responses
    To Your Posts
  • Keyword Search
  • One-Click Access To Your
    Favorite Forums
  • Automated Signatures
    On Your Posts
  • Best Of All, It's Free!
  • Students Click Here

*Tek-Tips's functionality depends on members receiving e-mail. By joining you are opting in to receive e-mail.

Posting Guidelines

Promoting, selling, recruiting, coursework and thesis posting is forbidden.

Students Click Here

Jobs

Separate PDF of every Invoice

Separate PDF of every Invoice

Separate PDF of every Invoice

(OP)
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

Run the report inside a loop.

RE: 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

RE: Separate PDF of every Invoice

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

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 Smileing

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.

Red Flag This Post

Please let us know here why this post is inappropriate. Reasons such as off-topic, duplicates, flames, illegal, vulgar, or students posting their homework.

Red Flag Submitted

Thank you for helping keep Tek-Tips Forums free from inappropriate posts.
The Tek-Tips staff will check this out and take appropriate action.

Reply To This Thread

Posting in the Tek-Tips forums is a member-only feature.

Click Here to join Tek-Tips and talk with other members!

Close Box

Join Tek-Tips® Today!

Join your peers on the Internet's largest technical computer professional community.
It's easy to join and it's free.

Here's Why Members Love Tek-Tips Forums:

Register now while it's still free!

Already a member? Close this window and log in.

Join Us             Close