Wednesday, December 31, 2014

SSRS Report to Save As Word in AX

// SSRS Report to Save As Word in AX

static void ReportToWord(Args _args)
{
    SrsReportRun srsReportRun;
    srsReportRun = new SrsReportRun("CustListReport.Report");
    srsReportRun.init();
    srsReportRun.reportCaption("CustListReport.Report");
    //srsReportRun.reportParameter("TruckTransDS_JournalId").value("000161_070");
    srsReportRun.showDialog(false);
    srsReportRun.printDestinationSettings().printMediumType(SRSPrintMediumType::File);
    //srsReportRun.printDestinationSettings().fileFormat(SRSReportFileFormat::HTML4_0);
    srsReportRun.printDestinationSettings().overwriteFile(true);
    srsReportRun.printDestinationSettings().fileName("C:\\InventTruckTransactionReport1.doc");

    if( srsReportRun )
    {
        srsReportRun.executeReport();
    }
}

No comments:

Post a Comment

Copy Markup charges while posting purchase invoice using X++

 Copy Markup charges while posting purchase invoice using X++ Class: Important: Code logic is just for Reference.  New class => Duplicate...