Home
Analytics
Maximo - Birt Parameter using Stored Procedures
jcostilla
Hello, I have the following stord procedure with 3 parameters:
maximoDataSet = MXReportDataSetProvider.create(this.getDataSource().getName(), this.getName());
maximoDataSet.open();
var sqlText = new String();
sqlText = "{call MAXIMO.RPT_ATENTION_TIME('" + params["startdate"] + "','" + params["finishdate"] + "','" + params["service"] + "')}";
maximoDataSet.setQuery(sqlText);
The I uploaded to Maximo, in the LOOKUP field it list all the services it has, it should show me a report depending on the parameters and service, there are about 10 services(undertood as areas, locations, etc.)
The problem is when I select a service in maximo the field starts with an = sign. To avoid this I put the following code lines :
var where = params["where"];
var sqlText = new String();
if(params["servicio"].value) {
params["servicio"] = params["servicio"].replace("=" , "").toUpperCase();
params["where"] = " and " + MXReportSqlFormat.createParamWhereClause("T.CLASSIFICATIONID", params["servicio"]);
}
That way, If I select in the report service parameter A45, the input field will show =A45, using the following code lines would delete or replace to = to NULL or empty and will show in the field A45 instead of =A45, that way the report will run perfect.
That works fine when I don't use store procedure, How can I solve this when using a Store Procedure parameter?
I use Birt and Maximo 7.
Thanks!
Find more posts tagged with
Comments
mwilliams
Why doesn't this work when passing the value to a stored procedure? Because you need the '=' sign that you replaced in the other method?