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

Disabling the flight in D365FO (CHD - Tier 1)

 INSERT INTO dbo.SYSFLIGHTING(FLIGHTNAME, ENABLED)  VALUES ('<FlightObjectName>_KillSwitch', 1)  or  INSERT INTO dbo.SYSFLIGHT...