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:
01146595
Views:
51
Note that in my example, I used the RANGE clause on the REPORT FORM command. That tells VFP to only print the pages within the range you specify.

>Barbara thanks for your help, but your code send to the printer by each tray a "REPORT FORM"???
>Example:
>Tray1
>Report form Report.frx to printer
>and then
>Tray2
>Report form Report.frx to printer
>???
>
>
>because if it is so i have the same problem...is only one "REPORT FORM" with many page and then a few page go to the tray 2 and a few page go to the tray 3.... only in ONE "REPORT FORM Report.frx "
>
>
>is this possible?
>
>
>
>>>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