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

Search hierarchy for a match (TableALLGroup) X++

  Table1 ppt;  select firstonly ppt  order ItemCode, ItemRelation, AccountCode, AccountRelation where      (ppt.ItemCode == TableGroupAll::T...