Alfasith AX

Alfasith AX
اللَّهُمَّ انْفَعْنِي بِمَا عَلَّمْتَنِي، وَعَلِّمْنِي مَا يَنْفَعُنِي، وَزِدْنِي عِلْمًا

Sunday, September 22, 2013

Job to run reports without knowing the used class names in Dynamic AX

static void PrintSSRSthroughCode(Args _args)
{
    SrsReportRun srsReportRun;
    srsReportRun = new SrsReportRun ("ReportName.PrecisionDesign1");
    srsReportRun.init();
    srsReportRun.reportCaption("ReportName.PrecisionDesign1");
    // set parameters
    srsReportRun.reportParameter("TableName").value("Parameter");
    // Dialog for failure (if)
    srsReportRun.showDialog(false);
    if( srsReportRun )
    {
             srsReportRun.executeReport();
    }
}

No comments:

Post a Comment

SQL code to upate one Legal entity banner to all the legal entity in D365

 Hi, update companyimage set  companyimage.Image  = companyimageA.Image  from  ( select Image from companyimage where dataAreaid = 'USF...