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

Get or set adjust tax calculated amount using TAXDOCUMENT framework (Tax calculation service) in D365FO

 //Get or adjust tax calculation using TAXDOCUMENT framework (Tax calculation service) TaxRegulation taxRegulationDetail; TmpTaxRegulation  ...