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 gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Closing a print job

Status
Not open for further replies.

sdocker

IS-IT--Management
Aug 12, 2010
218
GB
I have an application that prints numerous forms based on user input. For example, if the forms are named 'A' to 'J', the print job can include any or all of the forms. There was a summary form that always printed at the end, so I simply used NOPAGEEJECT in all the forms except the summary.

Unfortunately, the summary page is no longer used, so I am faced with the task of determining which form will be printed last and and not use a NOPAGEEJECT, so the print kob will close..

My question is.... Is there VFP command to close a print job?

Incidentally, this is only an issue when printing to a PDF .

Thanks,
Sam
 
All

Great suggestions.

Some comments...

Using macros help simplify the coding. I control the file names so i don't ave to worry about spaces in the names.

I never thought about putting it into a cursor, I'll look into it.

Olaf's code also looks promising and i'll study it also.

Thanks for all the help.

Sam
 
>i don't ave to worry about spaces in the names
As long as you don't exclude FRXes and need to prepend the external files with a path, which the user may choose with a space in path name, ie your app installed in C:\Program[highlight #FCE94F] [/highlight]Files\.
I'd just go about this in a very rigid way and you never go wrong. Names->name expressions. No further individual decisions. They are working faster than macro substitution, too.

I suggested my solution as having least effort to change your coding, you prefix all REPORT FORM lines with lcCommands = lcCommands+ single quote, then change how you specify lcReportname and add a final single quote. You can have very individual REPORT FORM commands all collected in this one script string.

The downside of the final EXECSCRIPT is, it works out of context of current scope, that means it doesn't know variables. The execscript created fxp can address the current datasession and workarea, though, so the NEXT 1 options are no problem and if all your REPORT FORMS look this way you can use that.

The safe option is finally using ALINES and then execute each line via macrosubstitution, if there are special cases.

Bye, Olaf.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top