Print report in AX.

Hi,
Below code helps You to print a report,
void clicked()
{
Args args;
ReportRun reportRun;

CustConfirmJour custConfirmJour;

RecordSortedList list = new RecordSortedList(55);

SELECT firstonly custConfirmJour order by ConfirmID desc where custConfirmJour.SalesId == salesTable.SalesId ;

list.ins(custConfirmJour);

args = new Args(ReportStr(SalesConfirm));
args.designName(“Standard”);

reportRun = new ReportRun(args);

reportRun.args().caller(null);
reportRun.args().parmEnum(1);
reportRun.args().parmEnumType(920);
reportRun.args().object(List);
reportRun.args().name(“KeepSettings”);

reportRun.printJobSettings().setTarget(PrintMedium::Printer);
reportRun.run();
}

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s