Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Run Report
Message
From
01/03/2006 04:31:21
 
General information
Forum:
Visual FoxPro
Category:
Reports & Report designer
Title:
Miscellaneous
Thread ID:
01100074
Message ID:
01100284
Views:
15
>>>I want to run a report that has a printer set up in the page set up dialog
>>>
>>>However, I want to run the report on a different printer and the report should ignore the setting in the page set up dialog.
>>>
>>>I want to set the printer to what the user chooses and then I would print a few different reports all to the same printer that the user chose before, ignoring the printer that is set in the page set up. Sorry for being repititios, I wanted to be clear.
>>
>>VFP reports give problems if they are designed for one printer, and printed on another one. You should clear the corresponding fields in the report; the easiest way to do this is to get the XDIR download, from the downloads section.
>>
>>To select a printer, use the getprinter() function. The steps are more or less like this (quoted from my unreliable memory!):
>>
>>
>>local lcPrinter
>>lcPrinter = GetPrinter()
>>if not empty(lcPrinter) && if empty, user pressed ESC.
>>  set printer to &lcPrinter
>>  report form ...
>>endif
>>
>
>It should be SET PRINTER TO NAME and there's no reason to use macro substitution in this case.

I think there is ;
It is one or the other.
set printer to name &lcPrinter

* or 

set printer to name (lcPrinter)
***Personally I always used this one.
Doing just ;
set printer to name lcPrinter
results in 'Error accessing printer spooler'
at least with VFP6/sp5.


I did not try this with VFP9.
*****************
Srdjan Djordjevic
Limassol, Cyprus

Free Reporting Framework for VFP9 ;
www.Report-Sculptor.Com
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform