Maximo Integration

 View Only
Expand all | Collapse all

BIRT Integration i.e. invoking reports from outside Maximo without RMI perhaps REST?

  • 1.  BIRT Integration i.e. invoking reports from outside Maximo without RMI perhaps REST?

    Posted Thu February 10, 2022 02:13 PM
    Hi,r

    My customer currently invokes the reporting service to run any BIRT report in their Maximo 7.6.1.2 system from a related web application which is outside Maximo/Websphere.
    They would like to generate the reports without resorting to RMI.
    Is it possible, and if so is there a link or hint on how to accomplish this using perhaps REST or some other interface?

    ------------------------------
    jeffk 2BC7
    interloc solutions
    grand rapids MI
    ------------------------------


  • 2.  RE: BIRT Integration i.e. invoking reports from outside Maximo without RMI perhaps REST?

    Posted Fri February 11, 2022 09:18 AM

    The REST API supports generating a PDF of the report. Your request would look something like:
    /maximo/oslc/os/mxapiwodetail?action=genreport&reportname=woprint.rptdesign&lean=1&oslc.where=wonum="1022"



    ------------------------------
    Steven Shull
    ------------------------------



  • 3.  RE: BIRT Integration i.e. invoking reports from outside Maximo without RMI perhaps REST?

    Posted Wed March 02, 2022 09:16 AM
    @Steven Shull:

    That is great information. One issue I am seeing, we are authenticating with the "maxadmin" user and just trying to list the reports. When we do so, we get the same two default reports as provided in the REST API manual. Is there something we need to set in the UI to get all reports showing up? It seems like we might be missing some key part. 


    /maxrest/oslc/os/mxapiwodetail?action=listreports
    ​[
    {
    "reportname": "woprint.rptdesign",
    "description": "Work Order Details",
    "genreport": "http:\/\/10.20.1.195\/maxrest\/oslc\/os\/MXAPIWODETAIL?action=genreport&reportname=woprint.rptdesign"
    },
    {
    "reportname": "wotrack.rptdesign",
    "description": "Work Order List",
    "genreport": "http:\/\/10.20.1.195\/maxrest\/oslc\/os\/MXAPIWODETAIL?action=genreport&reportname=wotrack.rptdesign"
    }
    ]


    ------------------------------
    Kevin Benore
    ------------------------------



  • 4.  RE: BIRT Integration i.e. invoking reports from outside Maximo without RMI perhaps REST?

    Posted Wed March 02, 2022 09:31 AM
    Reports can be associated to object structures like they are with applications. In your example you're using MXAPIWODETAIL and that only has two reports out of the box. If you duplicate the report in Report Administration and associate the app as the object structure that will make that report available (assuming your user has security for the report). I would suggest when you duplicate it that you leave the Report Folder as the original report folder (such as WOTRACK) so that way any updates are reflected automatically on the object structure. Something like the screenshot below.

    We also support adding attachments in the response (attachments=true query parameter) as well as providing parameters for the report. To provide parameters  you have to know what the name of the parameters are in Maximo, so it's not a good generic solution, but if you know what they are it is possible as well.



    ------------------------------
    Steven Shull
    ------------------------------



  • 5.  RE: BIRT Integration i.e. invoking reports from outside Maximo without RMI perhaps REST?

    Posted Thu March 03, 2022 10:14 AM
    Stephen,

    After doing what you suggested above (see 1.jpg), I got some invalid bindings in the Preview section of the report for some of the parameters (see 2.jpg).
    Any thoughts?

    Also, when passing report params to the rest api, would we do it like this:
    /maxrest/oslc/os/MXAPIWODETAIL?action=genreport&reportname=reportname.rptdesign&Report Param 1=Y&application=WOTRACK3&Report Param 3=12345678

    ------------------------------
    Ken Munyeria
    ------------------------------



  • 6.  RE: BIRT Integration i.e. invoking reports from outside Maximo without RMI perhaps REST?

    Posted Thu March 03, 2022 11:37 AM
    The binding error on preview is to be expected. These aren't supported to be run from the UI so if any of the parameters are bound to an attribute it will show that error. 

    The report parameters are based on the Parameter Names defined in report administration. For example, I duplicated the wotrack_costanalysis.rptdesign and the query parameters are status, worktype, woclass, costesttype, site, etc. The query parameters should be those names exactly. Even if a report parameter is defined with a default, defaults only apply to UI and must be provided in the request. 

    We discard the where & appname parameters so don't bother providing them. You should build the where utilizing the oslc.where parameter and the oslc.where is currently required because we evaluate report limits and such based on it. 

    Example request: /maximo/oslc/os/mxapiwodetail?action=genreport&reportname=wotrack_costanalysis.rptdesign&lean=1&oslc.where=wonum="1022"&status=COMP&woclass=WORKORDER&site=BEDFORD&startdate=2022-03-01&enddate=2022-03-04&costesttype=Y&worktype=PM

    ------------------------------
    Steven Shull
    ------------------------------



  • 7.  RE: BIRT Integration i.e. invoking reports from outside Maximo without RMI perhaps REST?

    Posted Thu March 03, 2022 03:30 PM
    Thanks Steven.

    Clarification:
    So they are not supposed to be run from the UI - does that mean we need 2 copies of the report, one for UI and one for API?

    Also, what about if they are in cloned apps - will upgrades that mess with object structures NOT upgrade them if needed?
    If so, how do we handle this for reports that are on cloned apps?


    ------------------------------
    Ken Munyeria
    ------------------------------



  • 8.  RE: BIRT Integration i.e. invoking reports from outside Maximo without RMI perhaps REST?

    Posted Thu March 03, 2022 04:09 PM

    Sorry for the confusion. I'm going to step back to see if this helps or confuses you more.

    Maximo reports have an application field (APPNAME) which ties to the app where the report will be exposed. This is typically an App in the traditional sense, but can also be used for object structures that have been configured for object structure security.

    There is a second field is Report Folder (REPORTFOLDER). In most scenarios, this matches the application field because the report is unique to that app but it does not have to be.

    When you have an existing report (woprint.rptdesign for example) that you are trying to expose in a new application you have two choices. You can re-use the same report folder or you can make the report folder unique. When you re-use the same report folder, the existing report is immediately available and any update to the report on either app (IE WOTRACK or MXAPIWODETAIL) will be used for both. If the report folder is unique, the user must import the report and maintain it for each app (IE 2+ imports) each time there is a change.

    My recommendation which I outlined above was to re-use the same reportfolder if these are the same report. Think of it like files on a file system. You can make a dozen copies of the file that you try to keep in sync each time you make a change or you can maintain one file and just know where to go to find it each time.

    The UI explanation was when your app is an object structure, the report preview can't handle parameter bindings in the UI. The simplest way to think about it is object structures require the integration framework. But as done out of the box and as I showed in my examples, you can re-use the same reports that already exist in Maximo including ones that have parameters.



    ------------------------------
    Steven Shull
    ------------------------------



  • 9.  RE: BIRT Integration i.e. invoking reports from outside Maximo without RMI perhaps REST?

    Posted Fri March 04, 2022 02:00 PM

    Steven:

    Ken and I almost have it totally working. Thanks for the assistance thus far. We are able to make calls and generate PDF reports. However, when we veer off the default and try to request XLS or XLSX, it doesn't like it.

    URL: /maxrest/oslc/os/MXAPIWODETAIL?action=genreport&reportname=Safety.rptdesign&reportformat=XLS&FY=2022

    RESPONSE:
    BMXAA5480E - The report Safety.rptdesign of the MXAPIWODETAIL application failed to run. Unsupportted report output format requested: XLS

    Is there an additional setting that is needed in Maximo?



    ------------------------------
    Kevin Benore
    ------------------------------



  • 10.  RE: BIRT Integration i.e. invoking reports from outside Maximo without RMI perhaps REST?

    Posted Mon March 07, 2022 07:50 AM
    Try all lowercase (IE xls instead of XLS). It's a case sensitive parameter.

    ------------------------------
    Steven Shull
    ------------------------------