Automatic Printer-Selection NF 2.x

My problem was that i had to print some reports on different printers with different papersizes different papers (blank papers or preprinted). I dont like to work with several reports (1 for each printer and one printform). So i solved this problem in NF 2.x like this: The Table 78 “Druckerzuordnung” (German “Printerselection”) is storing a relation between printer, user and report-id. When you start a report (not using the systemprinter) then navision reads this table and print the report on the specified printer. If you dont specify any papersize or papertray Navision uses the printer settings. Now if you call a form to edit the Table 78 before calling the report you can change the output. If you check the form 64 “Druckerauswahl” (Printerselection) you find that there is a table defined called “Drucker” (Printer) to get the installed printer. Next trick is to set “identifyers” in the printername defined in the operating system Example (XXXX = Printername): * XXXX (FAX) * XXXX (PDF) * XXXX (BlankA4) * XXXX (A4Page1) * XXXX (A4Page2) … and so on… now you can create a codeunit to preselect the printer by 1.) using table printer and setfilter(Name,’@%1’,identifyer) to find out the printer name and 2.) write it into the record of table 78 matching to user and report before 3.) running this report. For example: >>> Preselect Fax … run Report first … Preselect BlankA4 … run same Report twice … >>> Create different buttons to fax or print a report using only 1 report >>> other automation purporses