printer selection based on document location

drieszen
Member Posts: 12
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
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
-
First try the Printer Selection under General Ledger->Setup.
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.0 -
that already helps, i didn't think about that solution.
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).0 -
:idea:
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-mas0 -
I also thought about that, but I was curious if anyone had another solution.0
-
We had the same problems parsing parameters to the FindPrinter function in codeunit 1. We solved it by making a SingleInstance codeunit that we call before starting the report. Then you can modify FindPrinter to get the parameters from the SingleInstance codeunit. It works ok.Regards
Peter0 -
thanks!!0
Categories
- All Categories
- 73 General
- 73 Announcements
- 66.6K Microsoft Dynamics NAV
- 18.7K NAV Three Tier
- 38.4K NAV/Navision Classic Client
- 3.6K Navision Attain
- 2.4K Navision Financials
- 116 Navision DOS
- 851 Navision e-Commerce
- 1K NAV Tips & Tricks
- 772 NAV Dutch speaking only
- 617 NAV Courses, Exams & Certification
- 2K Microsoft Dynamics-Other
- 1.5K Dynamics AX
- 320 Dynamics CRM
- 111 Dynamics GP
- 10 Dynamics SL
- 1.5K Other
- 990 SQL General
- 383 SQL Performance
- 34 SQL Tips & Tricks
- 35 Design Patterns (General & Best Practices)
- 1 Architectural Patterns
- 10 Design Patterns
- 5 Implementation Patterns
- 53 3rd Party Products, Services & Events
- 1.6K General
- 1.1K General Chat
- 1.6K Website
- 83 Testing
- 1.2K Download section
- 23 How Tos section
- 252 Feedback
- 12 NAV TechDays 2013 Sessions
- 13 NAV TechDays 2012 Sessions