I want to print for example the delivery note on a printer that is automaticaly selected based on the location on the sales header. In my situation, an employee prints the document in different warehouses (the printer selection does not work in this case).
Problem: The function findprinter (cu1) is called before the document is printed, so the location on the document can not be used. How can I influence the printer after the selection screen of the report
0
Comments
That way you can set a default printer for a user and a specific report.
You could enter a new line to that table with the username, the printer you want and the report ID, before printing the report, so when the report tries to print to find the specific printer.
After the report is printed, you can delete that temporary line in the printer selection table.
I haven't tried it. If you encounter a problem, post me to try it.
Arhontis
https://forum.mibuso.com/search
But it is not a final solution, because I want to select the printer after I started the report (for example after the first dataitem).
For my opinion it is not possible to select a Printer after a Report was started
But try the following: Add in the Location a new field with Table Relation to the Printer Selection.
If a report is started, then either the Codeunit 1 is used or a function in the Posted Documents is running.
Determine all Location Codes existing in the Document and fill a temporary table. Subsequently, run over this temporary table and convert the PrinterSelection in the Codeunit 1 before the User and Report is selected.
Merry X-mas
Peter