Welcome To The Home Of The Visual FoxPro Experts  
home. signup. forum. archives. search. google. articles. downloads. faq. members. weblogs. file info. rss.
 From: Barbara Peisch
  Where is Barbara Peisch?
 Oceanside
 California - United States
 Barbara Peisch
 To: Cheryl B
  Where is Cheryl B?
 Xenia
 Ohio - United States
 Cheryl B
 Tags
Subject: RE: Printer Selected from To PRINTER PROMPT
Thread ID: 104575 Message ID: 104581 # Views: 2 # Ratings: 0
Version: Visual FoxPro 6 Category: Reports and Printers
Date: Thursday, August 17, 2006 9:18:35 PM         
   


> Greetings, All!
>
> I have a group of 3 reports that are printed in a loop so that the reports come out "collated" on the printer as such:
>
> Group 1
> Title
> Body
> Appendix
> Group 2
> Title
> Body
> Appendix
>
> I am using the REPORT FORM (report) TO PRINTER PROMPT and would like to capture whatever printer the user selects the first time. Once I have a captured printer, I would not issue the PROMPT on the REPORT command; instead, I would SET PRINTER NAME TO (printername).
>
> Problem is, I don't know how to capture that printer name. Any suggestions? GETPRINTER() doesn't allow for inputting a range of pages, neither does SYS(1037).
>
> I've tried using the REPORTFORMPROMPT screen that I got (I think) from UniversalThread. Problem with that is the interface uses RANGE , to print a range of pages, and that doesn't work (at least in version 6) when a WHILE or FOR portion is also chosen.
>
> Can this capture be done either through VFP or a Windows Call?
>
> Thanks!
>
> P.S. Congrats on 5 years, Eric! Sorry I missed the celebration last May!
>
> Cheryl B


The reason GETPRINTER() and SYS(1037) don't offer a range of pages is because you call them independent of any report you may run, so they have no context for knowing anything about pages. I ran into a similar problem and posted my solution as part of the file XFRXSamples.prg at www.peisch.com/downloads.html. Although I used XFRX in this solution, there are generic solutions included as well. The solution does require VFP 9 however, but maybe you can upgrade.

If you unzip the file, look at the PrintOptions.scx. It shows three different ways of achieving the results you want with varying drawbacks. The XFRXPreviewContainer.doc file explains what these are.

-BP
www.peisch.com

ENTIRE THREAD

Printer Selected from To PRINTER PROMPT Posted by Cheryl B @ 8/17/2006 7:39:46 PM
RE: Printer Selected from To PRINTER PROMPT Posted by Barbara Peisch @ 8/17/2006 9:18:35 PM
RE: Printer Selected from To PRINTER PROMPT Posted by Eric den Doop @ 8/17/2006 10:15:48 PM