1

有人可以帮我更改发票的文件名吗?当我从屏幕导出 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();
}

}
4

0 回答 0