Hi all,
I want to generate “Check form with remittance”(ap641000.rpx) Report Programmatically. But in the usual way, I was unable to do that as it has no key parameters.
I used to do report generation in the following way. But I can not apply this approach here as there are no key parameters here. Is there any alternative approach of doing this?
Dictionary<String, String> parameters = new Dictionary<String, String>();
parametersm"DocType"] = apInvoice.DocType;
parametersm"RefNbr"] = apInvoice.RefNbr;
//Report Processing
PXReportSettings settings = new PXReportSettings("MA105000");
PX.Reports.Controls.Report report = ReportLoader.CheckIfNull(nameof(ReportLoader)).LoadReport("MA105000", null);
ReportLoader.InitReportParameters(report, parameters, settings, false);
PX.Reports.Data.ReportNode reportNode = ReportDataBinder.CheckIfNull(nameof(ReportDataBinder)).ProcessReportDataBinding(report);
byte/] data = PX.Reports.Mail.Message.GenerateReport(reportNode, RenderType.FilterPdf).First();
string filename = "Test Report";
PX.SM.FileInfo file = new PX.SM.FileInfo(filename, null, data);
Additionally, there are few filters as below. But how can we pass values there?