Printer selection does not work

Hi all,

I am new here and have a question about printing from Navision. I do no know if this is the right forum to ask, so if not: forgive me :slight_smile: Here is the problem:

Though I have set different printers for some reports, these reports are now always printed on the default printer of the machine from which the job is printed. Before it worked fine.

If found some posts on an old forum that this has to do with Windows renumbering the networkports.
One printer is now called “\WS-94\HP LaserJet 1100 (MS),Ne03:” but I believe this was “Ne01”…

Does anyone know how to solve this?

Thanks so much.

J. van der Molen
Student administration,
Applicationmanager and Webmaster
Northgo College, Noordwijk - the Netherlands
wwww.northgo-college.nl

Please provide the following information:

Are you a developer with a dev license ?

What Navision version are we talking about ?

Hi

I have had the same issue in the past and solved the issue by changing a function in codeunit 1, I think it was the function FindPrinter.

I am sure you can find the code on the old website, if not let me know and I will see if I can find it.

Regards

Claus

Dear Thomas,

I pm you to explain our sitiuation (somewhat confidential).

We have a developers licence. I am not the developer, but am able to program to some extend: edit reports, forms, codeunits, etc.

The thread I refer to had an answer, by you, but I do not know how to proceed.

Here is a bit of code in CU 1:

FindPrinter(ReportID : Integer) : Text[250]
CLEAR(PrinterSelection);
LogReportsUsed(ReportID);
IF NOT PrinterSelection.GET(USERID,ReportID) THEN
IF NOT PrinterSelection.GET(’’,ReportID) THEN
IF NOT PrinterSelection.GET(USERID,0) THEN
IF PrinterSelection.GET(’’,0) THEN;

EXIT(PrinterSelection.“Printer Name”);

What do I change here?

Thanks.

Further information:
If have discoverd the problem only occurs with reports that print automaticly (i.e. using the reportqueue) without interference from the standard Windows print dialog screen.

Printing reports for which I have defined a specific printer that show the dialog pick the correct printer…

After a little more research and a bit of programming my problem is now solved. It turned out that in some code that was too deeply hidden for me a wrong reportname was used. It was in the C/AL code of the ShorCutKey in a menu item :slight_smile:

Thanks everyone for thinking and replying!