最新消息:ww12345678 的部落格重装上线,希望大家继续支持。

AX 2012: Print SSRS Report in PDF to Disk

网络文摘 William 2381浏览 0评论

Purpose:

The purpose of this document is to illustrate how we can print an SSRS report in PDF format to disk or file-system in X++.

Business requirement:

Ability to print an SSRS report in PDF format to disk or file-system automatically.

Assumptions:

SSRS report is successfully deployed to the report server.

Development:

Please find below the job to write SSRS report in PDF to disk or file-system.

// Developed on 01 Feb 2016 by Muhammad Anas Khan
// Blog: dynamicsaxinsight.wordpress.com
// LinkedIn: pk.linkedin.com/in/muhammadanaskhan
// Description: Write SSRS report in PDF to disk
static void makPrintSSRSReportToDisk(Args _args)
{
    //Instantiate custom controller
    SRSPrintDestinationSettings printSettings;
    SrsReportRunController 	controller = new PurchPurchaseOrderController();
        
    controller.parmReportName(ssrsReportStr(PurchPurchaseOrder, Report));

    //Get print settings from contract
    printSettings = controller.parmReportContract().parmPrintSettings();

    // set print medium
    printSettings.printMediumType(SRSPrintMediumType::File);
    printSettings.fileFormat(SRSReportFileFormat::PDF);
    printSettings.overwriteFile(true);
    printSettings.fileName(@"C:TempPurchPurchaseOrder.pdf");

    // suppress the parameter dialog
    controller.parmShowDialog(false);
    controller.startOperation();
}

发表我的评论
取消评论

表情

Hi,您需要填写昵称和邮箱!

  • 昵称 (必填)
  • 邮箱 (必填)
  • 网址