Quantcast
Channel: Microsoft Dynamics AX Forum - Recent Threads
Viewing all articles
Browse latest Browse all 175888

RE: X++ Reports in AX 2012R3

$
0
0

Hi, I am looking to save file using X++ code in PDF format but do not wants to use any ssrs object. I am trying to sue the code but its only generetign file on screen but not saving it ,,while the same cod eis working in AX 2009.

  PrintJobSettings    printJobSettings = new PrintJobSettings();

  Args                args = new Args();

  boolean             prompt = false;

  boolean             printIt = true;

  ;

   printJobSettings.setTarget(PrintMedium::File);

   printJobSettings.format(PrintFormat::PDF);

   printJobSettings.fileName(@'c:\AxFiles\myfile2.pdf');

  salesFormLetter.updatePrinterSettingsFormLetter(printJobSettings.packPrintJobSettings());

  select firstOnly custInvoiceJour

      where custInvoiceJour.salesid == 'I000225430';

  args.record(custInvoiceJour);

  args.caller(salesFormLetter);

  new MenuFunction(menuitemoutputstr(IOCLA4SalesInvoice), MenuItemType::Output).run(args);

}


Viewing all articles
Browse latest Browse all 175888

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>