Hi All,
Following a previous post about redirection architecture I want to show you an example of how can you use it to open a report.
Here we need to use PXReportRequiredException, as it designed to open reports. But also we need to provide a report name and report parameters.
- Report Name is just a Screen ID that you can find in the sitemap
- Report Parameters is a Dictionary<string, string> that is basically a key-value pair. Key is a parameter name and value is a value. Parameter names are taken directly from the report.
Here is the example code to create a button for report. I get this code from Receipt Screen in Inventory Module.
public PXAction<INRegister> iNEdit; [PXUIField(DisplayName = Messages.INEditDetails, MapEnableRights = PXCacheRights.Select, MapViewRights = PXCacheRights.Select)] [PXLookupButton] public virtual void INEdit() { if (receipt.Current != null) { // create the parameter for report Dictionary<string, string> parameters = new Dictionary<string, string>(); parameters["DocType"] = receipt.Current.DocType; parameters["RefNbr"] = receipt.Current.RefNbr; parameters["PeriodTo"] = null; parameters["PeriodFrom"] = null; // using Report Required Exception to call the report throw new PXReportRequiredException(parameters, "IN611000", Messages.INEditDetails); } }
Hope it helps!
Hi Sergey,
I want to show table structure in Acumatica reports.
This table structure is saving in our database table in html string format. (using RichTextBox control)
Could you please suggest me some solution?
Thanks,
Gaurav Katiyar
Hi Gaurav, please refer to the Report Designer training guide here – https://openuni.acumatica.com/courses/reporting/s150-reporting-report-designer/
I’m not aware of the way to display HTML directly to the report.
Hi Sergey,
I want to show table structure in Acumatica reports.
This table structure is saving in our database table in html string format.
Could you please suggest me suggestion ?
Thanks,
Gaurav Katiyar
Hi Sergey,
How can i add my report into existing Action without writing a code.
i.e. Vendor want to add his report into the Action of our page.
Can he do this without package deployment ?
Thanks & Regards,
Gaurav Katiyar
Hi Gaurav, in 2020r1 there is a way to create custom actions without code.
check that one https://www.acumatica.com/blog/vlog-exploring-the-new-workflow-editor-in-acumatica-2020r1/