#1 2016-06-02 18:40:02

maximo
Member
Registered: 2016-06-02

How to Run IBM Maximo reports on reportserver

Is there a tutorial ,examples,documentation, or procedure on how to take a maximo BIRT rptdesign file and import it to reportserver and then execute it?

We are evaluating reporting tools and would like to do a proof of concept by importing a IBM Maximo person.rptdesign into reporserver .

1. How do we handle the paramaters defined in the person.rptdesign

2. How do we handle the datasource and datasets?


This is what we have done but are getting errors :
1. We created oracle jdbc datasource and verified its working. We are able to run a simple non maximo report against the maximo person table using this jdbc.

2. We inserted a new birt report using reportserver and then specified the person.rptdesign

3. We added the paramaters via report management within the reportserver administration app.

4. we execute the person.rptdesign

5. we get the following error:



Person Detail
       
The following items have errors:

ReportDesign (id = 1):
+ There are errors evaluating script "importPackage(Packages.com.ibm.tivoli.maximo.report.script);

mxReportScriptContext = MXReportScriptContext.initialize(reportContext);

//mxReportScriptContext.setDefaultLogLevel("DEBUG");
//mxReportScriptContext.setDefaultLogFile("C:/temp/person_details.log");

//scriptLogger = mxReportScriptContext.getReportScriptLogger();

":
ReferenceError: "MXReportScriptContext" is not defined. (/report/method[@name="initialize"]#3)

ReportDesign (id = 1):
+ There are errors evaluating script "maximoDataSet = MXReportDataSetProvider.create(this.getDataSource().getName(), this.getName());
maximoDataSet.open();

var where = params["where"];

if(params["personid"].value) {
where += " and " + MXReportSqlFormat.createParamWhereClause("person.personid", params["personid"]);
}

var sqlText = new String();

// Add query to sqlText variable.
sqlText = "select person.personid, person.displayname, person.status, person.location, "
+ " maxuser.userid, maxuser.loginid "
+ " from person left outer join "
+ " maxuser on maxuser.personid = person.personid "
// Include the Maximo where clause
+ " where " + where
;

maximoDataSet.setQuery(sqlText);":
Fail to execute script in function __bm_OPEN(). Source:
------
" + maximoDataSet = MXReportDataSetProvider.create(this.getDataSource().getName(), this.getName());
maximoDataSet.open();

var where = params["where"];

if(params["personid"].value) {
where += " and " + MXReportSqlFormat.createParamWhereClause("person.personid", params["personid"]);
}

var sqlText = new String();

// Add query to sqlText variable.
sqlText = "select person.personid, person.displayname, person.status, person.location, "
+ " maxuser.userid, maxuser.loginid "
+ " from person left outer join "
+ " maxuser on maxuser.personid = person.personid "
// Include the Maximo where clause
+ " where " + where
;

maximoDataSet.setQuery(sqlText); + "
-----
A BIRT exception occurred. See next exception for more information.
ReferenceError: "MXReportDataSetProvider" is not defined. (/report/data-sets/script-data-set[@id="5"]/method[@name="open"]#1).
+ There are errors evaluating script "if (!maximoDataSet.fetch())
return (false);

// Add a line for each output column
// The specific get method should match the data type of the output column.
row["personid"] = maximoDataSet.getString("personid");
row["displayname"] = maximoDataSet.getString("displayname");
row["status"] = maximoDataSet.getString("status");
row["location"] = maximoDataSet.getString("location");
row["userid"] = maximoDataSet.getString("userid");
row["loginid"] = maximoDataSet.getString("loginid");

mxdsPersonid = maximoDataSet.getString("personid");

return (true);":
Fail to execute script in function __bm_FETCH(). Source:
------
" + if (!maximoDataSet.fetch())
return (false);

// Add a line for each output column
// The specific get method should match the data type of the output column.
row["personid"] = maximoDataSet.getString("personid");
row["displayname"] = maximoDataSet.getString("displayname");
row["status"] = maximoDataSet.getString("status");
row["location"] = maximoDataSet.getString("location");
row["userid"] = maximoDataSet.getString("userid");
row["loginid"] = maximoDataSet.getString("loginid");

mxdsPersonid = maximoDataSet.getString("personid");

return (true); + "
-----
A BIRT exception occurred. See next exception for more information.
ReferenceError: "maximoDataSet" is not defined. (/report/data-sets/script-data-set[@id="5"]/method[@name="fetch"]#1).
+ Data Set script method "Fetch" returned null; expected a Boolean value.

Offline

#2 2016-06-02 19:39:54

Arno Mittelbach
datenwerke
Registered: 2012-02-14

Re: How to Run IBM Maximo reports on reportserver

Hi,

the steps you've outlined are the right steps to run BIRT reports in ReportServer. The problem, as far as I can make out is that the Maximo BIRT report that you are trying to run uses a Maximo specific API which is not part of the standard BIRT API and hence not part of ReportServer. In particular the package

com.ibm.tivoli.maximo.report.script

which is used by most of the code that was posted seems to be a maximo specific package.

I do not have Maximo anywhere to test, so I can't really help here. However, if you search for using Maximo with BIRT there are some sites that pop up. Basically it could suffice to find the corresponding library files and add them to the classpath.

When you create BIRT reports for Maximo, are you using the standard BIRT designer? If so, then there should be the same problem, that is, also the BIRT designer must be made aware of the maximo API. If you had to make any changes there, then this might be a good place to start looking.

Sorry, that I can't be of more help.

Best Regards,
Arno

Offline

Board footer

Powered by FluxBB