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!

Printer Icon on Print Preview looping

tkee

Programmer
Feb 6, 2004
59
US
I have a report with a header, footer and detail band that works fine to print or to preview. However, when someone clicks on the printer icon for Print Preview it starts counting down to print numerous pages. I have stopped it at a few hundred. If I set step on and go through the code it will print to a pdf using that icon correctly - just one page with multiple detail lines. However if it is clicked on in the code it keeps preparing numerous pages. If I choose a number of pages instead of All, it will print just those pages, but it will vary in length. Is there some setting I have missed? Do I need to keep looking at my report? I have tried it several ways and recompiled. Would there be a better way to print to pdf for multiple users not knowing what drivers they have installed?
 
Could you post your REPORT FORM commands, whether you use VFP9, and if so whether you print with reportbehavior 80 or 90.
You might be using the 90 mode with the reportpreview.app/reportoutput.app in the IDE - running source code, and missing to provide them with the exe, so it falls back to legacy printing.

or Print Preview it starts counting down to print numerous pages.
Print preview counts up, esepciall with very long reports when preparing the preview.
You say it does so, even though in the end it's just one page. Makes me wonder whether you're having code that's specific to the report phase of preview pass and printing pass.

Anyway, you have to tell more about the details.
 
Are you using external preview like foxypreviewer or native print dialog ?
When report is run , do you insert records in report events and maybe in the wrong cursor ?
 
Are you using external preview like foxypreviewer or native print dialog ?
When report is run , do you insert records in report events and maybe in the wrong cursor ?
I use the native print dialog. I have rewritten the code for the report so that a simple cursor holds the data for the detail band. I select that cursor before running the report.
 
Could you post your REPORT FORM commands, whether you use VFP9, and if so whether you print with reportbehavior 80 or 90.
You might be using the 90 mode with the reportpreview.app/reportoutput.app in the IDE - running source code, and missing to provide them with the exe, so it falls back to legacy printing.


Print preview counts up, esepciall with very long reports when preparing the preview.
You say it does so, even though in the end it's just one page. Makes me wonder whether you're having code that's specific to the report phase of preview pass and printing pass.

Anyway, you have to tell more about the details.
I use VFP9. I select the cursor with data for my detail band before running the command REPORT FORM reportname PREVIEW. I do not specify reportbehavior, so I assume it is using 90. I also tried changing it to 80 mode and had the same result. The report has a title, detail and summary band.
 
Another note - this worked previously. I wonder whether Windows updates may have had an effect.
 
You don't do use the PROMPT clause, which would allow choosing pages to print. Nor do you use a FOR clause, which would limit what records to print.

I don't see how you would get the behavior you describe. So I think I'd still need to see more details about what this is about.
 
You don't do use the PROMPT clause, which would allow choosing pages to print. Nor do you use a FOR clause, which would limit what records to print.

I don't see how you would get the behavior you describe. So I think I'd still need to see more details about what this is about.
 

Part and Inventory Search

Sponsor

Back
Top