I am writing this post to demonstrate how to call multiple X++ report on single click in Microsoft Dynamics AX 2009/2012.
Call Multiple report on single click in X++
void clicked()
{
Args args = new args();
ReportRun reportRun;
;
args.record(PurchTable);
args.name(reportstr(Report1));
reportRun = classFactory.reportRunClass(args);
reportRun.init();
reportrun.run();
args.name(reportstr(Report2));
reportRun = classFactory.reportRunClass(args);
reportRun.init();
reportrun.run();
args.name(reportstr(Report13));
reportRun = classFactory.reportRunClass(args);
reportRun.init();
reportrun.run();
super();
}
I am writing this post to demonstrate provide rangle on Form in Microsoft Dynamics AX 2009/2012 and best practices to apply range on Form Datasource executeQuery.
public void executeQuery()
{
QueryBuildDataSource qbdRGDetail;
QueryBuildRange qbrECCNumber;
QueryBuildRange qbrNumberSequence;
;
qbdRGDetail = TableName_ds.query().dataSourceTable(tablenum(TableName));
qbdRGDetail.clearRanges() ;
qbrECCNumber = SysQuery::findOrCreateRange(qbdRGDetail, fieldnum(TableName, ECCNumber));
qbrECCNumber.value(TableName2.ECCNumber);
qbrNumberSequence = SysQuery::findOrCreateRange(qbdRGDetail, fieldnum(TableName, NumberSequence));
qbrNumberSequence.value(TableName2.NumberSequence);
super() ;
}
No comments:
Post a Comment