I have tried everything in vain to get this to work. I am using VFP6 SP5 w/ Amyuni 2.07. My app has worked fine for the past month or so, only to have this problem crop up and not all the time at that! I have also replaced the tag and tag2 fields w/ nothing as earlier post have mentioned. If I remove the items in the expr field as suggested, I get a printer driver problem. I also have tried your version of Amyuni 2.10 but has less success. My computer seems to have the probelm less frequently - however the clients computer the sucess rate is awfull.
The following is the code used:
lcSavePrinter = set('printer',2)
oPDF = createobject("cdintf.cdintf")
oPDF.driverinit("TW_PDF")
oPDF.setdefaultprinter()
oPDF.filenameoptions = 1 + 2 && noprompt + usefilename
* --
oPDF.defaultdirectory = alltrim(justpath(outfile))
oPDF.DefaultFileName = alltrim(forceext(outfile, 'pdf'))
* --
set printer to "TW_PDF"
report form (rep_name) to printer noconsole
* --
oPDF.restoredefaultprinter()
oPDF.filenameoptions = 0
oPDF.driverend()
release oPDF
set printer to name (lcSavePrinter)
PDF file being sent to printer not pdf file
> I have also replaced the tag and tag2 fields w/ nothing as earlier post have mentioned.
> If I remove the items in the expr field as suggested, I get a printer driver problem.
You don't want to remove all of the items in the expr field of the first record of the FRX file, just comment out the ones that pertain to a specific printer. There is an example of this in my reply in the "report prints to printer, not PDF; conflict with Acrobat" thread here in this forum. HTH.
> If I remove the items in the expr field as suggested, I get a printer driver problem.
You don't want to remove all of the items in the expr field of the first record of the FRX file, just comment out the ones that pertain to a specific printer. There is an example of this in my reply in the "report prints to printer, not PDF; conflict with Acrobat" thread here in this forum. HTH.
Hello,
In our VFP technical note we are using:
But I would like you to open your VFP report in Design mode and set the printer to "TW_PDF". Then close your VFP application and launch it again.
As you know, the issue you are getting maybe due to the fact that the report in VFP is printed to its own printer and not to the default printer on the system. So if you set its printer to "TW_PDF" instead of making it printer independent, this may help.
Also, please note that version 2.1 will not have any positive or negative inpact on this issue. To use version 2.1 you need to call EnablePrinter() before each printout.
Hope this helps.
In our VFP technical note we are using:
Instead of:SET PRINTER TO NAME printername
REPORT FORM authors.frx NOEJECT NOCONSOLE TO PRINTER
I a not sure if this will make any difference.set printer to "TW_PDF"
report form (rep_name) to printer noconsole
But I would like you to open your VFP report in Design mode and set the printer to "TW_PDF". Then close your VFP application and launch it again.
As you know, the issue you are getting maybe due to the fact that the report in VFP is printed to its own printer and not to the default printer on the system. So if you set its printer to "TW_PDF" instead of making it printer independent, this may help.
Also, please note that version 2.1 will not have any positive or negative inpact on this issue. To use version 2.1 you need to call EnablePrinter() before each printout.
Hope this helps.