Discussions
Categories
Choose a Product
THRUST SERVICES
CORE APPS
CE PRODUCTS
...
Quick Links
POPULAR
HELPFUL TIPS
Groups
My Links
FOR SIGNED IN MEMBERS:
Back to website
Home
Designing Analytics Reports
Exception sql script Report
Migrateduser
<p>Hi,</p><p> </p><p>Could you please any help on understanding the exception which is attached for reference.</p><p> </p><p>Report developed using Scripted Data set Please find the script as below.</p><p> </p><p><span class='bbc_underline'>open trigger:</span></p><p> </p><p>maximoIncident = MXReportDataSetProvider.create(this.getDataSource().getName(), this.getName());<br />
maximoIncident.open();<br />
<br />
var sqlText = "select asset.assetnum, asset.description as asset_description, longdescription.ldtext, "<br />
+ " asset.siteid, asset.status, asset.parent, asset.mainthierchy, asset.assetuid, asset.islinear, "<br />
+ " asset_parent.description as parent_description, asset.assettype, asset.priority, asset.serialnum, "<br />
+ " asset.location, locations.description as location_description, asset.calnum, asset.shiftnum, "<br />
+ " asset.failurecode, asset.conditioncode, asset.groupname "<br />
+ " from maximo.asset "<br />
+ " left outer join maximo.asset maximo.asset_parent on asset.parent = asset_parent.assetnum "<br />
+ " left outer join maximo.locations "<br />
+ " on locations.location = asset.location "<br />
+ " and locations.siteid = asset.siteid "<br />
+ " left outer join maximo.longdescription on longdescription.ldownertable = 'ASSET' "<br />
+ " and longdescription.ldownercol = 'DESCRIPTION' "<br />
+ " and asset.assetuid = longdescription.ldkey "<br />
+ " where " + params["where"]<br />
+ " order by asset.assetnum "<br />
;<br />
<br />
maximoDataSet.setQuery(sqlText);</p><p> </p><p> </p><p><span class='bbc_underline'>Fetch trigger:</span></p><p> </p><p>if (!maximoIncident.fetch())<br />
return (false);<br />
<br />
row["assetnum"] = maximoIncident.getString("assetnum");<br />
row["description"] = maximoIncident.getString("asset_description");<br />
row["ldtext"] = maximoIncident.getString("ldtext");<br />
row["siteid"] = maximoIncident.getString("siteid");<br />
row["status"] = maximoIncident.getString("status");<br />
row["mainthierchy"] = maximoIncident.getBooleanString("mainthierchy");<br />
row["parent"] = maximoIncident.getString("parent");<br />
row["parent_description"] = maximoIncident.getString("parent_description");<br />
row["assettype"] = maximoIncident.getString("assettype");<br />
row["priority"] = maximoIncident.getString("priority");<br />
row["serialnum"] = maximoIncident.getString("serialnum");<br />
row["location"] = maximoIncident.getString("location");<br />
row["location_description"] = maximoIncident.getString("location_description");<br />
row["calnum"] = maximoIncident.getString("calnum");<br />
row["shiftnum"] = maximoIncident.getString("shiftnum");<br />
row["failurecode"] = maximoDataSet.getString("failurecode");<br />
row["conditioncode"] = maximoIncident.getString("conditioncode");<br />
row["groupname"] = maximoIncident.getString("groupname");<br />
row["assetuid"] = maximoIncident.getInteger("assetuid");<br />
row["islinear"] = maximoIncident.getInteger("islinear");<br />
return (true);</p><p> </p><p><span class='bbc_underline'>Initialize trigger :</span></p><p> </p><p>importPackage(Packages.com.ibm.tivoli.maximo.report.script);<br />
<br />
mxReportScriptContext = MXReportScriptContext.initialize(reportContext);</p><p> </p><p><span class='bbc_underline'>after factory :</span></p><p> </p><p>MXReportScriptContext.close();</p><p> </p><p>Hope I will get support to understand it beter, if above topic is already kindly let me know.</p><p> </p>
Find more posts tagged with
Comments
There are no comments yet