Показать сообщение отдельно
Старый 21.07.2017, 10:41   #6  
Morpheus is offline
Morpheus
Участник
Аватар для Morpheus
Соотечественники
 
602 / 167 (7) ++++++
Регистрация: 30.03.2005
Адрес: Київ-København-Düsseldorf
Посмотрите, как реализован экспорт SRS отчетов в классе SRSReportServerWarmup.

X++:
public void runSampleRdpReportWithParameters()
{
    str reportFilePath;

    SrsReportDataContract contract;
    SalesInvoiceContract rdpContractClass;
    LogisticsAddressCountryRegionISOCode code = 'US';

    // Create a controller to run the report.
    SrsReportRunController controller = new SrsReportRunController();

    // set the report name and design to be run
    controller.parmReportName(ssrsReportStr(SalesInvoice, Report));

    // suppress the parameter dialog as this is to be run by the batch service
    controller.parmShowDialog(false);

    // choose to save the executed report as a pdf file
    reportFilePath = System.IO.Path::Combine(this.getTempPath(), ssrsReportStr(SalesInvoice, Report) + #FileExtensionPDF);
    this.setReportRunControllerPrintToFile(controller, reportFilePath);

    // Set any required parameter values here by first getting the report contract.
    contract = controller.parmReportContract();

    // And then fill in that contract based on the contract type (Rdl or Rdp)

    // Example of using an Rdp class specific data contract
    rdpContractClass = contract.parmRdpContract() as SalesInvoiceContract;

    // Set the required parameter
    rdpContractClass.parmCountryRegionISOCode(code);

    // run the report
    controller.runReport();
}
За это сообщение автора поблагодарили: iiipoizone (1).