Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
SET PRINTER TO NAME and REPORT FORM TO PRINTER
Message
From
19/11/1997 10:51:38
 
General information
Forum:
Visual FoxPro
Category:
Troubleshooting
Miscellaneous
Thread ID:
00057169
Message ID:
00061138
Views:
31
>>>>>I've a problem when I change the printer where I want to output the report, the report is always printed on the default printer.
>>>>>
>>>>>I've tried with this code :
>>>>>
>>>>>SET PRINTER TO NAME GETPRINTER()
>>>>>REPORT FORM myReport TO PRINTER
>>>>>
>>>>>My printers are on a Novel network or are device like Fax Driver
>>>>>
>>>>>It's a VFP 5.0 bug or I'm doing an error ?
>>>>>
>>>>>Thanks in advance,
>>>>
>>>>I had this problem too. The .frx saves the default printer information and codes. This is one of the shortcomings for foxpro (IMO). In any case, here is a solution. This solution only works if the same printer drivers and codes are used. Generally, all HPLJ's are the same, so it should work in *most* offices.
>>>>
>>>>
>>>>USE myreport.frx
>>>>REPL expr WITH '', tag WITH '', tag2 WITH ''
>>>> if the report is landscape, also do this:
>>>>REPL expr WITH 'ORIENTATION = 1'
>>>>
>>>>This removes the printer codes from the report and so output will be directed to the printer specified by SET PRINTER TO NAME MyDefaultPrinter.
>>>>
>>>>The other, simpler alternative is to use REPO FORM myReport TO PRIN PROM NOCO. This will allow VFP to override the printer codes specified by the report.
>>>>
>>>>I'll bet that there are other, more elegant solutions, but these are the easiest to implement.
>>>
>
>Hi Matt,
>excuse me if I return on this problem, but I've some question to do:
>
>It's ok if I empty the expr, tag and tag2 memo field by command window or I've to do this each time before I want to print the report ?
>I've some problem using that code in the application, and if I clear the field by command window I can put my reports in the exe.
>I've tried and no problem result, but I don't know if application in some case can write the report. Have you anything to say about this ?
>
>When I was clearing the field in application, the report output was put on my form and to the printer. What's happen ?
>
>Thanks for your previous help
Make sure you are using the NOCONSOLE clause.
Previous
Reply
Map
View

Click here to load this message in the networking platform