Skip to main content
Solved

Generate "Check Form with Remittance" Report(ap641000.rpx) Programmatically


Forum|alt.badge.img+1

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. 

Schema Builder of the report - Parameters Tab

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>();
parameters["DocType"] = apInvoice.DocType;
parameters["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?
 

 

Best answer by Leonardo Justiniano

Hi @charithalakshan49 

Report implementation is low level stuff in Acumatica and the filtering you are asking to access has no evident references.

I see 2 possible options:

  • Modify the report (A copy with another ID) and add the parameters and filtering you need (I would do this one)
  • Work with result sets compatible with the entities of the report. You have the option to generate the records in code and pass them to the report.

 

 

 

View original
Did this topic help you find an answer to your question?

2 replies

Leonardo Justiniano
Jr Varsity II
Forum|alt.badge.img+5

Hi @charithalakshan49 

Report implementation is low level stuff in Acumatica and the filtering you are asking to access has no evident references.

I see 2 possible options:

  • Modify the report (A copy with another ID) and add the parameters and filtering you need (I would do this one)
  • Work with result sets compatible with the entities of the report. You have the option to generate the records in code and pass them to the report.

 

 

 


Forum|alt.badge.img+1

Hi @Leonardo Justiniano Thank you for your suggestions. 


Reply


Cookie policy

We use cookies to enhance and personalize your experience. If you accept you agree to our full cookie policy. Learn more about our cookies.

 
Cookie settings