>>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,
thanks for your reply, but if I have unsertstood, you're saying that the only way to print my report on my fax driver (that is different from my default printer, an HPLJ too) it's to do a REPORT FORM myReport TO PRINTER PROMPT ?
My problem is to make a form like "Choose printer" with a combo to choose the printer a some commandbutton (Print, Preview, Close) and putting this in a VCX, so other developer can customize this form easily. Any suggestion ? I've to use Common Dialog ActiveX ?
Thanks,