Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Wanet Telecoms Ltd on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Acrobat Writer problems 1

Status
Not open for further replies.

michlm

Programmer
Sep 3, 2000
44
US
I have created a form in VFP 6.0 where the user can send a report to either preview, print or create a PDF.

I'm having a problem getting the form to print to the regular printer. If the user selects preview and then tries to print the report to the printer from the preview toolbar, a box pops up asking the user what the name of the PDF file should be or if the user just selects to print the report directly to the printer, the same box pops up. I've saved the default FoxPro printer to a property in the form and I set the printer to the default upon opening the form. I've also set the printer to the default before the preview command. No matter what I do, it wants to default to the Acrobat Writer. Has anyone seen this before?

Any suggestions? I don't know what else to do since I actually direct the printer name to be the default before I preview or print and it still goes to Acrobat Writer.

Thanks in advance.

Michelle
 
I had this problem briefly. I don't know why this worked, but I used parentheses to set the printer:

SET PRINTER TO NAME (MyDefaultPrinter)

For some reason this worked where quotation marks didn't. I didn't do much other testing. The quotation marks didn't work the first time I implemented the code, so I switched to parentheses and it's worked fine since.

Good Luck,
Steve
 
Thanks for the answers but actually I had already read the west-wind article which didn't really help my problem and I was already setting my printer with:

SET PRINTER TO NAME (MyDefaultPrinter)

But, I did figure out the problem and will post it so others might also benefit from it if they run into the same problem.

Sometimes (for reasons unknown to me), specific printer information becomes hardcoded into the .frx file of the report. If you are having difficulty with controlling where a report is printed, do the following:(WARNING - if you are doing this, do it very carefully and back up your files before you do it if you don't know what you are doing).

USE reportname.frx
BROWSE

On the first record of the table, find the fields named Tag1 and Tag2. They should both be memo fields. Delete the information in both of these fields (on the first line ONLY). Close the table.

These are the fields where the printer name becomes hard coded. Once I cleaned out these two fields, I haven't had a problem.

Hopefully, that helps others having similar problems. Be careful hacking the file though if you've never done it before.

Michelle



 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top