Open a Report in Acumatica

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)]
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!

3 Replies to “Open a Report in Acumatica”

  1. 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

Leave a Reply

Your email address will not be published. Required fields are marked *