AndrewMozley
Programmer
I am making heavy weather of this! Using Wilhelm’s example of outputting to .pdf. I can get his example to work if I use a newly defined report layout, cc.frx. This format has been generated by the command CREATE REPORT cc.frx FROM cc (where cc is a cursor defined a few lines before)
Code:
. oPDFC.cDefaultPrinter = “pdfCreator”
SET PRINTER TO NAME (oPDFC.cdefaultprinter)
REPORT FORM cc.frx NOCONSOLE TO PRINTER
This works fine.
If however I use an existing report, testcust.frx, which happens to have been defined with its output printer as my main printer “Brother”, the above sequence is not effective.
Code:
. oPDFC.cDefaultPrinter = “pdfCreator”
SET PRINTER TO NAME (oPDFC.cdefaultprinter)
REPORT FORM testcust.frx NOCONSOLE TO PRINTER
. . . The output gets sent to the Brother printer as normal, and this is not what I want. If I look at the properties of testcust.frx I can see its printer is "Brother" and if I open it as a .dbf file I see that its ‘Expr’ memo field does indeed refer to Brother as do its Tag fields.
Is there a way that I can direct output from an existing report definition to a printer of my choice (in this case, to pdfCreator).
Thanks