Изменение имени файла pdf счета-фактуры в динамике d365 - PullRequest
1 голос
/ 27 мая 2020

Кто-нибудь может мне помочь, как изменить имя файла счета-фактуры? Когда я экспортирую файл pdf с экрана, он всегда сохраняет как «показать счет», а в формате pdf - файл psaprojinvoice.myprecisiondesign. Но я хочу, чтобы был номер счета. В чем может быть проблема?

class ProjInvoiceControllerSZM extends PSAProjAndContractInvoiceController
{

public static ProjInvoiceControllerSZM construct()
{
    return new ProjInvoiceControllerSZM();
}

public static void main(Args _args)
{
    SrsReportRunController   formLetterController = ProjInvoiceControllerSZM::construct();
    ProjInvoiceControllerSZM controller = formLetterController;
    srsPrintDestinationSettings srsPrintDestinationSettings;

    controller.initArgs(_args);

    Controller.parmReportName(ssrsReportStr(PSAProjInvoiceSZM, PrecisionDesign1));


    PSAProjInvoiceContract  rdpContract = new PSAProjInvoiceContract();
    SRSPrintDestinationSettings     settings;

    // Define report and report design to use
    controller.parmReportName(ssrsReportStr(PSAProjInvoiceSZM, PrecisionDesign1));
    // Use execution mode appropriate to your situation
    controller.parmExecutionMode(SysOperationExecutionMode::ScheduledBatch);
    // Suppress report dialog
    controller.parmShowDialog(false);

    // Explicitly provide all required parameters
   // rdpContract.parmReportStateDate(systemDateGet());

    controller.parmReportContract().parmRdpContract(rdpContract);

    // Change print settings as needed
    settings = controller.parmReportContract().parmPrintSettings();
    settings.printMediumType(SRSPrintMediumType::File);
    settings.fileFormat(SRSReportFileFormat::PDF);
    settings.fileName('Invoice.pdf');

    // Execute the report
   // controller.startOperation();


    formLetterController.startOperation();

}

protected void outputReport()
{
    SRSCatalogItemName  reportDesign;
    reportDesign = ssrsReportStr(PSAProjInvoiceSZM,PrecisionDesign1);
    this.parmReportName(reportDesign);
    this.parmReportContract().parmReportName(reportDesign);
    formletterReport.parmReportRun().settingDetail().parmReportFormatName(reportDesign);
    super();
}

}
...