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

How can I print a lot of reports to a single file by appending? 1

Status
Not open for further replies.

cruicu

Technical User
Nov 25, 2002
24
RO
Hello all!

I have installed Visual FoxPro8. Operating System is Windows XP. The installed printer is a network printer Hitachi.
I made a program that generates reports from some tables.
(many reports that are similarly (in a cycle... do while).At every report it send a job to printer. So, when I run program it send automatic to printer over 10000 jobs.
This is not very good for printer.
I intend to print all these jobs to a file by appending and then to print this big file once.
Can somebody help me?
Thanks.
 
You can do it this way:

Print first page to file "printfile"
P* Print next page to file "tmpfile"
append "tmpfile" to "printfile"
go to P*
print "printfile"

But I dont think that this is the best solution. It just came on my mynd now.

You can try it
 
You can do it this way:

Print first page to file "printfile"
P* Print next page to file "tmpfile"
append "tmpfile" to "printfile"
go to P*
print "printfile"

But I dont think that this is the best solution. It just came on my mynd now.

You can try it
 
Thank you for idea.
I hope to print all in a file using comand: set printer to file.
But not work at me. why?
 
Actually, VFP 8.0 allows you to "chain" reports together using the NORESET option. Have you tried this?

Rick
 
Thanks Rick.
But I don't know NORESET option. I don't find this option in VFP 8.0 Beta version.
Can you say me more about that?
 
You are right it's not documented in the Help file at the REPORT command. You need to go to the Contents Tab, under:
Code:
Microsoft Visual FoxPro
  What's New in Visual FoxPro 8.0
    Interactive Development Evironment (IDE) Enhancements
      Enhancements to Visual FoxPro Designers
(Now scroll down to:)
  Report Design and Printing Enhancements
You see the new syntax for the REPORT command including NORESET and NOPAGEEJECT.

Rick

 
Thank you rgbean!
I have found the new syntax for the REPORT command including NORESET and NOPAGEEJECT.
But this option not function.
Is it possible because I use a Visual FoxPro 8.0 Beta version, downloaded from NET free? Is this version not complete?
Do you have a version of VFP which support this options?
Thanks again!
 
Thank you rgbean.
I have printed all reports in a single job successful.
I omited the "NOPAGEEJECT" last time and ...it's not work.
But now it's ok.
Have a good day!
 
cruicu

Rumors are that VFP8.0 will be available (at least RTM)in the next couple of weeks. Mike Gagnon

If you want to get the best response to a question, please check out FAQ184-2483 first.
 
Cruicu,
I just got this example from a friend who is a report guru - she wrote THE book on the VFP report writer:
Code:
REPORT FORM MyReport1 TO PRINTER PROMPT NOPAGEEJECT
REPORT FORM MyReport2 TO PRINTER NOPAGEEJECT NORESET
REPORT FORM MyReport3 TO PRINTER NORESET
You need NORESET on each report AFTER the first one.
You need NOPAGEEJECT on each report EXCEPT the last one.

If you don’t know at the time that you are running the last report, then you can close the print job by doing the following:
Code:
REPORT FORM MyReport3 NEXT 0 TO PRINTER
Thanks to Cathy Pountney!

Rick
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top