AX2012SRS直接打印到文件

    Args                    Args;
    SrsReportRunController  controller;
    Common                  _record;
    SRSPrintDestinationSettings        printSettings;
    ;
    controller= new SrsReportRunController();
    controller.parmReportName("SysDataBaseLog.Report");
    Args = new Args();
    args.record(_record);
    controller.parmArgs(args);

    printSettings = controller.parmReportContract().parmPrintSettings();
    // set print medium 
    printSettings.printMediumType(SRSPrintMediumType::File); 
    printSettings.fileFormat(SRSReportFileFormat::Excel); 
    printSettings.overwriteFile(true); 
    printSettings.fileName("tempfilename.xlsx");

    // suppress the parameter dialog 
    controller.parmShowDialog(false);
    controller.parmLoadFromSysLastValue(false);
    // start operation 
    controller.startOperation(); 
原文地址:https://www.cnblogs.com/rumenren/p/5233857.html