Requirement : The client requirement is to send the document attached to a batch number directly to printer setting which is used in a report.
when packing slip report is printing a certification document is opening, this certification document is nothing but a standard document attached through document handling to a batch. The code has written to open the document while printing the report. This works fine when the report print destination is screen but the requirement is it also get the print destination setting used in the report and print accordingly to the print management used but the report.
can any one having idea how to do this will be great help for me.
Thanks in Advance
You can try the following in your report's init() method, this send directly your report to the user default printer:
str printer; printer = '\\\\path_to_your_printer; this.DeviceName(printer); this.setTarget(printmedium::Printer);
this is in 2012. and it prints when we print a packing slip.
Rather i would say the requirement is i need to get one file may be any format stored in C drive any folder.need to print in a destination printer as set in packing slip report print destination.
with below code we can directly pick any document form outside Ax and directly send that to a printer for printing.