x++ - 更改发票pdf文件名动态d365
问题描述
有人可以帮我更改发票的文件名吗?当我从屏幕导出 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();
}
}
解决方案
推荐阅读
- java - 通过Hashmap迭代ArrayList以找到未使用的元素
- macos - OS/X "etc/resolver/dev" 不工作——为什么不呢?
- r - 在 ggplot2 中创建范围(走廊)图
- javascript - 我的 javascript 文件不处理 jQuery 点击事件
- java - 如何修复无法解决:support-core-utils?
- php - Laravel - 定期从数据库表中提取
- javascript - 如何停止内容跳跃?(输入js)
- visual-studio - Visual Studion 可以在断点处打印一些表达式吗?
- reactjs - 使用本机反应的 React-Apollo 处理错误
- php - PHP在没有RegEx的情况下提取字符串