Localized reports in Acumatica

One of the recent additions to the new Acumatica 24R1 version is the ability to retrieve localized reports through REST API. This article provides a manual how specifically one can achieve it.

 

We start of creating an endpoint for reports. For this we navigate to the Web Service Endpoints (SM207060) screen. In this article we will create a new endpoint, but it also works with extended endpoints.

To create an endpoint click a “+” sign at the top toolbar. On the screen that opens, we specify the endpoint name and endpoint version and save the changes.

 

Now we need to create an entity. We can achieve it by clicking “Insert” button on the endpoint view at the left side of the screen

A pop-up window shows up, where we specify the name of an entity and the screen id, which it is going to be originated from. For this example, we will create an API endpoint for retrieving Invoice/Memo (SO643000) reports in pdf. Thus we populate the fields with the following values:

Click “OK”. Now, as we created the entity, we can manipulate parameters that are going to be specified in the HTTP request later, by selecting the “Fields” tab, if we need that. For this example the default settings are good enough, so we will leave them as they are.

Now let’s head in to Postman and test our endpoint.

 

First, we have to log into Acumatica. For this we send a POST request to this address:

{{baseUrl}}/entity/auth/login

Where baseUrl is the url to an Acumatica instance. In my case it is http://localhost/demo

In request body we specify username and password as follows:

An expected response is 204 No Content

 

Now we need to retrieve a link to a report. To do this, we send a POST request to this url:

 

{{baseUrl}}/entity/{{endpointName}}/{{endpointVersion}}/

{{entityName}}

 

Where {{endpointName}} is the name of an endpoint (in our case “Report”), {{endpointVersion}} is the version we specified for this endpoint (in our case 23.200.001), and {{entityName}} is the name of an entity we are trying to retrieve (in our case InvoiceMemo)

In headers we need to specify the following keys:

And then in the request body we specify the parameters values that we have set up at the “Fields” tab at the Web Service Endpoint screen.

We send a report and expected response is 202 Accepted. However, what we need in the response is the value of the Location header

This link specifies where we can retrieve our actual PDF report from. For this we copy the value and send a GET request to this address:

 

{{host}}/{{Location}}

 

Where {{host}} is the host of an Acumatica instance. In response we get our report .

Now let’s modify this request to retrieve a localized report.

 

For this we first have to navigate to the System Locales (SM200550) screen, create a new locale and check the “Active” checkbox.

Then we navigate to the Translation Dictionaries (SM200540) screen, search for a field and set a translation to it. Let’s take the “Unit Price” fiend and translate it and save the changes.

Now, going back to our Postman requests. In the request to get a report location, we specify yet another header called Accept-Language and assign it the value of the locale name as follows.

After that we repeat the same steps, copy the location and send a GET request to get an actual PDF report and in the end report generates with the translation we added.

 

Report designer does not work after power out or Root element is missing

 I want to share with you a solution for Report Designer that was found to fix the error that occurred after a sudden power outage. This error trace shown from the Acumatica ERP.

Follow these steps to resolve the issue:

  • Step 1: Close all Report Designer instances.
  • Step 2: On your computer, navigate to the Roaming folder located in the %AppData% directory, for example: C:\Users\%userprofile%\AppData\Roaming.
  • Step 3: Delete the config.xml file.

Passing values from the sub-report to the main report

Today, I want to tell you and demonstrate how to pass values from a subreport to the main report. We will be creating a simple report from scratch so that you can see each step and notice any potential pitfalls that you might encounter.

Description:

For example, we will create a new report named IQ000001.rpx. This will be our main report, where we will display the OrderNbr of Sales Orders pages. Additionally, for demonstration purposes, we will display the OrderQty of all SOLines in the same report and the CuryExtPrice in a separate subreport.

Implementation:

  • let's create the report IQ000001.rpx.

 

We need to add the DAC that will be used.

Also create a relationship between the tables:

Then add the parameter by which we will display the Order we want to use.

Warning: I've set the Default Value to the OrderNbr that exists in my system. Please be attentive and replace it with your own number.

And finally, let's add a filter based on our parameter. I will hardcode the parameter for the sake of simplicity in this implementation.

Once the work with the Build Schema is complete, we should add the necessary fields to the layout. We will also add SubReports to the layout, but we will implement them a bit later. Then, we can save the report.

We can see the result using the designer.

 

Report designer of Acumatica

Hello everybody.


Developing on Acumatica can involve various tasks such as customizing existing features, creating new modules or integrations, and building custom reports. Today, I want to show you how to create your own report and add a field to it using the Report Designer.

First of all, when you installing the Acumatica ERP Installer wizard, you must select the "Install Report Designer" checkbox, which is empty by default. After installation, launch the instance and Report Designer. This is what it looks like

Then you need to load the database by pressing the F3 button or click File -> Build schema. In the Enter Web Service URL to Load WSDL Document box, enter URL of your Acumatica ERP website, in Password box -> your password, and in the Login box-> your login, if you have a few companies you need to specify it after “@” like this login@company. After that press Load schema button you need to determine which field you want to add and which table it belongs with help of Inspect Element. For instance I want to add field OrderNbr of SOOrder DAC.
Search for the SOOrder table and click “>" and “OK”.

Now that we have built the scheme, we can add fields. Click Fields and drag the required field to one of the sections.

Save the report by pressing a combination of buttons “Ctrl + R”or clicking “File  -> Save To Server”. Name our report and click “OK”.

Now we need to add our report to Acumatica menu on “Site Map” form.

Add new row: choose ScreenID that hasn’t been used before. Then enter Title, URL, Workspace and Category.

Find our report and run it by clicking “RUN REPORT”.

And Voila, there’s our report.

Summary

The article explains how to create a custom report and add a field to it using the Report Designer in Acumatica. The first step is to install the Acumatica ERP Installer wizard and select the "Install Report Designer" checkbox. Then, the user needs to load the database by entering the URL of their Acumatica ERP website, their login, and password, and clicking the "Load schema" button. After that, the user can add fields by clicking "Fields" and dragging the required field to one of the sections. The report can be saved by pressing "Ctrl + R" or clicking "File -> Save To Server". Finally, the report can be added to the Acumatica menu on the "Site Map" form and run by clicking "RUN REPORT".