Hi, Is it possible to directly select a printer driver within a report, like there was in the ‘blue’ navision (genPRINTERNAME)? If not, do you know of any workaround, maybe with the Codeunit 1? Thanks Gunter
Hi Gunter, If you want to Run a Specific Report on a Specific Printer, you can User General Ledger ,Printer Selections.There you can specify the Printer Driver.Suppose if you want to Use PDF Driver for some Reports you can specify the Driver there,then automatically system will use that Printer Driver. Mohan
Yes that’s true. But You can’t use C/AL to change the destination inside the report. Then it’s to late. The last chance to change the destination of a report in C/AL is in codeunit 310 wher You can add Your own code to redirect the output to a specifik printer. //Lars
Depending on what You need, PAPERSOURCE maby is what you are looking for;
Copied from Navision Help. Use this function to return the paper source used for the current page or a specified page, and to set a new paper source. CurrReport.PAPERSOURCE(PaperBinNo [, PhysicalPage]) PaperBinNo: tray number PhysicalPage: page number Comments The PAPERSOURCE function has two parameters: the tray number, which is mandatory, and the page number, which is optional. If the printer does not support the tray number, the function call will be ignored, and the printer will continue using the previously selected tray. The tray numbers that correspond to the options for the PaperSourceFirstPage and PaperSourceOtherPages properties are as follows: 1 Upper or Only One Feed 2 Lower Feed 3 Middle Feed 4 Manual Feed 5 Envelope Feed 6 Envelope Manual Feed 7 Automatic Feed 8 Tractor Feed 9 Small-format Feed 10 Large-format Feed 11 Large-capacity Feed 14 Cassette Feed 15 Automatically Select 256 Printer Specific Feed 1 257 Printer Specific Feed 2 258 Printer Specific Feed 3 259 Printer Specific Feed 4 260 Printer Specific Feed 5 261 Printer Specific Feed 6 262 Printer Specific Feed 7 263 Printer Specific Feed 8 If the printer supports other tray numbers, you can enter these too. If you do not specify a page number, the tray change will apply to the current page. The new tray will also apply to subsequent pages until the next tray change occurs. When you do specify a page number, the tray change will take place when the specified page is printed. Subsequent pages will also use this tray until the next tray change. The tray change can be placed anywhere on a page and still apply to the whole page. If you specify more than one paper tray selection for a page, the printer uses the last selection.
Thans so far, Just for explanation - the intention was: Some reports should have a check box in the request/option-form to select, wether the reports should be printed or faxed (by Tobit Faxware). If ‘print’ is selected, it should be printed out as usual. If ‘faxed’ is selected, firstly some control-codes should be made visible and then the printer selection should be changed to the FAX-printer. The other possibility would be to copy the report and select the printer for the second one in the usual way. But I wanted to avoid maintaining duplicated reports. Gunter