Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Printing in several trays for the same report
Message
General information
Forum:
Visual FoxPro
Category:
Reports & Report designer
Miscellaneous
Thread ID:
01145833
Message ID:
01146236
Views:
19
>Hi
>Using ONLY one "report form" command how cant i print several page using tray 1 and 2.
>
>Example:
>
>report form demo.frx to printer
>
>Result:
>
>Page 1 = Tray1
>Page 2 = Tray2
>Page 3 = Tray1
>Page 4 = Tray2
>.....
>I Made it using a "Report form" for every Tray, but it make the CPU work slow. I think if i send only one file it will be more fast.
>
>Thank for all..

You didn't say which version of VFP you're using. If you're using version 9, then download the SetPrintProps.zip file from www.peisch.com/downloads.html. That has a program that allows you to change trays programmatically. It also has a form that demonstrates how to use the program. You would want to print the report with a RANGE clause, printing one page at a time, like so:
SET PROCEDURE TO setprinterproperties
loSetPrinterProperties = CREATEOBJECT('SetPrintProperties')

* Set the printer to the manual tray
loSetPrinterProperties.SetProperty(DM_DEFAULTSOURCE, DMBIN_MANUAL)
IF loSetPrinterProperties.lError
   MESSAGEBOX("Error setting Manual: "+loSetPrinterProperties.cError)
ELSE
   REPORT FORM MyReport TO PRINTER RANGE 1,1
ENDIF 

* Set the printer to the upper tray
loSetPrinterProperties.SetProperty(DM_DEFAULTSOURCE, DMBIN_UPPER)
IF loSetPrinterProperties.lError
   MESSAGEBOX("Error setting Upper: "+loSetPrinterProperties.cError)
ELSE
   REPORT FORM MyReport TO PRINTER RANGE 2,2
ENDIF 

* Set the printer to the lower tray
loSetPrinterProperties.SetProperty(DM_DEFAULTSOURCE, DMBIN_LOWER)
IF loSetPrinterProperties.lError
   MESSAGEBOX("Error setting Lower: "+loSetPrinterProperties.cError)
ELSE
   REPORT FORM MyReport TO PRINTER RANGE 3,3
ENDIF 
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform