Maximo List Archive

This is an archive of the Maximo Yahoo Community. The content of this pages may be a sometimes obsolete so please check post dates.
Thanks to the community owner Christopher Wanko for providing the content.



Blank page (White sheet) on maximo run report (BIRT)

From: Tommy H Sumarsono (2012-04-20 02:56)

Dear BIRT Experts,
I created a custom report for workorder tracking application. The report can be perfectly previewed in BIRT, but when I run the report from maximo, it only displays white page (Blank) and no error.
Here's my BIRT specification:
Eclipse Version: 3.4.2
Build id: M20090211-1700
BIRT VERSION 2.3.2
here's the script for each method in the report, I hope this help:
--Report Scripting outline--
>> INITIALIZE
importPackage(Packages.com.ibm.tivoli.maximo.report.script);
mxReportScriptContext = MXReportScriptContext.initialize(reportContext);
mxReportScriptContext.setDefaultLogLevel("DEBUG");
mxReportScriptContext.setDefaultLogFile("C:/temp/test_wo_summary.log");
paramStartDate=MXReportSqlFormat.getStartDayTimestampFunction(params["startdate"]);
paramEndDate= MXReportSqlFormat.getEndDayTimestampFunction(params["enddate"]);
>> BEFOREFACTORY
if ( (reportContext.getParameterValue("usepagebreaks") == "false")|| reportContext.getOutputFormat() == "pdf" ) {
// Give each table in the report a name, and add the names to the list below, e.g. ["mainTable", "childTable1"]
var tableListing = ["mainTable"];
for each(var tableName in tableListing) {
var table = reportContext.getReportRunnable().designHandle.getDesignHandle().findElement(tableName)
if (table != null)
{
table.setProperty("pageBreakInterval", 0);
}
}
}
>> AFTERFACTORY
MXReportScriptContext.close();
--Dataset Scripting--
>> OPEN
var sqlText = new String();
// WAPPR
sqlText = "select worktype,location,assetnum,wopm4,wonum,'Wappr' as types from workorder"
+ " WHERE status = 'WAPPR' and historyflag=0"
+ " and wopm4 in ('EBO','EEC','EMH','ETU','OSS','OPS','OPP','OHS','OCP')"
+ " and istask = 0 and worktype = 'CI'"
+ " and reportdate >= " + paramStartDate
+ " and reportdate <= " + paramEndDate
+ " and custwojp5 in ('S1', 'S2')"
+ " union"
//APPR
+ " select worktype,location,assetnum,wopm4,wonum,'Appr' as types from workorder"
+ " WHERE status = 'APPR' and historyflag=0"
+ " and wopm4 in ('EBO','EEC','EMH','ETU','OSS','OPS','OPP','OHS','OCP')"
+ " and istask = 0 and worktype = 'CI'"
+ " and reportdate >= " + paramStartDate
+ " and reportdate <= " + paramEndDate
+ " and custwojp5 in ('S1', 'S2')"
+ " union"
//INPRG
+ " select worktype,location,assetnum,wopm4,wonum,'Inprg' as types from workorder"
+ " WHERE status = 'INPRG' and historyflag=0"
+ " and wopm4 in ('EBO','EEC','EMH','ETU','OSS','OPS','OPP','OHS','OCP')"
+ " and istask = 0 and worktype = 'CI'"
+ " and reportdate >= " + paramStartDate
+ " and reportdate <= " + paramEndDate
+ " and custwojp5 in ('S1', 'S2')"
+ " union"
//DONE
+ " select worktype,location,assetnum,wopm4,wonum,'Done' as types from workorder"
+ " WHERE status = 'DONE' and historyflag=0"
+ " and wopm4 in ('EBO','EEC','EMH','ETU','OSS','OPS','OPP','OHS','OCP')"
+ " and istask = 0 and worktype = 'CI'"
+ " and reportdate >= " + paramStartDate
+ " and reportdate <= " + paramEndDate
+ " and custwojp5 in ('S1', 'S2')"
+ " union"
//RECORDED
+ " select worktype,location,assetnum,wopm4,wonum,'Recorded' as types from workorder"
+ " WHERE status = 'RECORDED' and historyflag=0"
+ " and wopm4 in ('EBO','EEC','EMH','ETU','OSS','OPS','OPP','OHS','OCP')"
+ " and istask = 0 and worktype = 'CI'"
+ " and reportdate >= " + paramStartDate
+ " and reportdate <= " + paramEndDate
+ " and custwojp5 in ('S1', 'S2')"
+ " union"
//CLOSE
+ " select worktype,location,assetnum,wopm4,wonum,'Close' as types from workorder"
+ " WHERE status = 'CLOSE' and historyflag=1"
+ " and wopm4 in ('EBO','EEC','EMH','ETU','OSS','OPS','OPP','OHS','OCP')"
+ " and istask = 0 and worktype = 'CI'"
+ " and reportdate >= " + paramStartDate
+ " and reportdate <= " + paramEndDate
+ " and custwojp5 in ('S1', 'S2')"
+ " union"
//CAN
+ " select worktype,location,assetnum,wopm4,wonum,'Can' as types from workorder"
+ " WHERE status = 'CAN' and historyflag=1"
+ " and wopm4 in ('EBO','EEC','EMH','ETU','OSS','OPS','OPP','OHS','OCP')"
+ " and istask = 0 and worktype = 'CI'"
+ " and reportdate >= " + paramStartDate
+ " and reportdate <= " + paramEndDate
+ " and custwojp5 in ('S1', 'S2')"
+ " union"
//WMATL
+ " select worktype,location,assetnum,wopm4,wonum,'Wmatl' as types from workorder"
+ " WHERE status = 'WMATL' and historyflag=0"
+ " and wopm4 in ('EBO','EEC','EMH','ETU','OSS','OPS','OPP','OHS','OCP')"
+ " and istask = 0 and worktype = 'CI'"
+ " and reportdate >= " + paramStartDate
+ " and reportdate <= " + paramEndDate
+ " and custwojp5 in ('S1', 'S2')"
+ " union"
//RE-ROLL
+ " select worktype,location,assetnum,wopm4,wonum,'Re-Roll' as types from workorder"
+ " WHERE wopm4 in ('EBO','EEC','EMH','ETU','OSS','OPS','OPP','OHS','OCP')"
+ " and istask = 0 and worktype = 'CI'"
+ " and reportdate >= " + paramStartDate
+ " and reportdate <= " + paramEndDate
+ " and wocounter > 0"
+ " and custwojp5 in ('S1', 'S2')";
CIDataSet.setQuery(sqlText);
>> FETCH
if (!CIDataSet.fetch())
return (false);
// Add a line for each output column
// The specific get method should match the data type of the output column.
// worktype,assetnum,wopm4
row["worktype"] = CIDataSet.getString("worktype");
row["assetnum"] = CIDataSet.getString("assetnum");
row["wopm4"] = CIDataSet.getString("wopm4");
row["wonum"] = CIDataSet.getString("wonum");
row["types"] = CIDataSet.getString("types");
row["location"] = CIDataSet.getString("location");
return (true);
>> BEFOREOPEN
CIDataSet = MXReportDataSetProvider.create(this.getDataSource().getName(), this.getName());
CIDataSet.open();
I use 3 dataset with Data Cubes for each of them. Each dataset use same scripting like what above mentioned.
I would greatly appreciate if somebody here can help me to solve this matter. Please let me know if you'd like to know further regarding my report.
Thank you in advance.
Best Regards,
Tommy