I'm gettign some erratic behavior when creating PDFs.
On some occassions, when running a report, the report prints to the printer other than what's specified on the Printer Selection table for that report.
It doesn't happen all the time, which is the weirdest part.
The details:
I'm working with the AVF PDF Pro Add on. It generates PDF's by changing a users entry in the Printer Selection table to the its own Printer Driver before actually printing.
The PDF Driver it uses is: PDF-XChange 3.0,Ne01:
The Automation we use is: 'PDF-XChange V3.x Type Library'.CPXCControl
Navison Version: 3.7 SQL
Ususally this works fine, but every now and then, instead of printing the PDF-XChange printer, it will print the users Default Windows printer.
I went through the code with the debugger, and at the time when erroneous entry appears in the default windows printer queue, the users Printer Selection for that report is a totally different printer.
Any ideas/experience with this?
0
Comments
It used to be a problem way back when even a download was made available
http://www.mibuso.com/dlinfo.asp?FileID=25.
When printing in an NT-environment Navision makes use of the ne-number in the printer name. Unfortunately the ne-number is dynamic so it changes when a new printer is added. NT resorts the list and adds new sequential numbers to the printers. Since Navision stores the full printer name with the ne number this is not such a brilliant solution.
Does every computer have the same printers installed?
http://www.BiloBeauty.com
http://www.autismspeaks.org
Probably you're using different printer names on the workstations. If you can't help having different printer names (for the PDF drivers), you have to set a fixed place for each user, or select the printer everytime they switch their workstations.
Pretty much related to Savatage's answer.
D365 Business Central Solutions Architect
BC AL/NAV C/AL Developer
BC Repositories.com
I guess we could try setting up another machine to connect to the Navision database directly.
http://www.BiloBeauty.com
http://www.autismspeaks.org
But in the end, they still want to do it through term services.
I still haven't tried using the codeunit, but I'll give it a shot, and see what happens.
Again, thanks guys.
so unfortunately, that didn't help.
You're correct the "ne01" is truncated from the printername. This way the printername in the printerselection is identical to the real printername and Navision can find the printer.
We are doing the same and have no problems like the one you have. When you debug...do you have the same problem?..or only the users. Navision will use the default when it can't find the one in the printerselection. So maybe the systemprinters are not always available? Policies? I'm guessing as you can read.
The routine, which automatically creates an entry in the table, recreated the entry with the 'correct' device name.
Still not really sure why this worked; but it did. If someone else comes against it, at least they can try it.