Printer Selection Ignored?? PDF Creation

girish.joshigirish.joshi Member Posts: 407
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?

Comments

  • SavatageSavatage Member Posts: 7,142
    Perhaps it's has to do with the Ne01. Does it happen on every computer and/or user?

    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?
  • markborgesmarkborges Member Posts: 170
    Was every printer set up individually for each user, in his/her own computer?

    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.

    :wink:
    Marcelo Borges
    D365 Business Central Solutions Architect
    BC AL/NAV C/AL Developer
    BC Repositories.com
  • girish.joshigirish.joshi Member Posts: 407
    Everyone connects to Navision using terminal services.

    I guess we could try setting up another machine to connect to the Navision database directly.
  • SavatageSavatage Member Posts: 7,142
    Let us know if that solves your problem
  • girish.joshigirish.joshi Member Posts: 407
    I connected to the database directly, and lit fixed the issue. Thanks for your help guys.

    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.
  • girish.joshigirish.joshi Member Posts: 407
    In later versions of Navision, it looks like the code in app managmetn that selects a printer already trims out the device portion of the printer name.

    so unfortunately, that didn't help.
  • ajhvdbajhvdb Member Posts: 672
    In later versions of Navision, it looks like the code in app managmetn that selects a printer already trims out the device portion of the printer name.

    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.
  • girish.joshigirish.joshi Member Posts: 407
    We managed to solve this by manually deleting the entry in printerselections.

    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.
Sign In or Register to comment.