Skip to main content

Execute Report

This topic describes how to execute a JDE report (UBE) using the execute report web service.

The following are required:

  • Your application must have obtained a session ID. If not, review the User Sessions topic before continuing with this section.
  • The report you are calling has already been defined using the Cantara Console. See Managing Reports, for more details.

You can execute a report by calling the service listed below with a payload that follows the Report Request definition (at a minimum the payload requires a report name, and parameter). If the execution is successful, Cantara returns a response that follows the Report Response definition. If there is a failure, Cantara returns an error. See the Error Messages topic for more information.

Info

In your payload you can have parameters and criteria parametersParameters map to a UBE's processing options and data selection. Criteria parameters map to a UBE's report interconnects.

Each report execution requires one or more parameters based on their definition on the Cantara server (see Managing Reports). Although there multiple parameters defined for reports, only the ones marked as Required need to be included in the payload.

To information about obtaining the definition for a report see Obtaining Request Definitions.

Service Definition: Execute Report

Endpoint: http://hostname:port/cantara/service/report/environment

Request-Method: POST

Note:

Environment refers to the Cantara Access Server environment you are trying to login to. For example, E1DEV. You would have previously configured this when you set up your environments. See the Managing Environments topic for more information.

You can obtain a list of configured environments by using the console to Search for an Environment.

Example Executing a Report - PurchaseOrder

In this example we will call the Purchase Order print UBE (R43500).

Before building our payload we need to view the required parameters and criteria parameters for the purchase order print UBE. By looking at the reports definition in the Cantara console we can see that one of the criteria parameters is the StatusCodeNext and one of the parameters is the Documentorderinvoice.

With this information we can now call the report service.

Endpoint: http://hostname:port/cantara/serivce/report/E1DEV

Request-Method: POST

Content-Type: application/json

Request Payload

JS
 {
  "Parameter": [
    {
      "value": "12345",
      "name": "Documentorderinvoice"
    }
  ],
  "CriteriaParameter": [
    {
      "CriteriaLiteral": [
        "999"
      ],
      "name": "StatusCodeNext"
    }
  ],
  "name": "PurchaseOrder"
}

Request Response

JS
{
  "Message": {
    "value": "Transaction Successful",
    "type": 0
  },
  "name": "PurchaseOrder",
  "jobId": 152,
  "reportName": "R43500",
  "reportVersion": "XJDE0001"
}
JavaScript errors detected

Please note, these errors can depend on your browser setup.

If this problem persists, please contact our support.