1

can someone help me how to change the file name of a invoice ? WHen I export a pdf file from screen it always saves as 'show invoice' and in pdf its psaprojinvoice.myprecisiondesign. But I want that there is Invoice num. Where might be the problem here?

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();
}

}
Tweene
  • 257
  • 4
  • 16
  • Similar question in the Dynamics 365 Finance Forum: https://community.dynamics.com/365/financeandoperations/f/dynamics-365-for-finance-and-operations-forum/390634/change-pdf-file-name-for-invoice – FH-Inway May 29 '20 at 09:34
  • Not only similar but actually it's my question. But still I did not archive anything here. – Tweene Jun 10 '20 at 10:51

0 Answers0