Discussions
Categories
Groups
Community Home
Categories
INTERNAL ENABLEMENT
POPULAR
PUBLIC CLOUD
PRIVATE CLOUD
Quick Links
MY LINKS
HELPFUL TIPS
Back to website
Home
Intelligence (Analytics)
BIRT subreport listing WO based on WO parent
GGUERRA
<p>Hi, I need help figuring out how to list workorders from MAXIMO, just by entering in the parameter workorder.wonum ,"the WO parent". This is the script from de maindataset and de subdataset.</p>
<p> </p>
<p>MAINDATASET</p>
<p>mainDataSet = MXReportDataSetProvider.create(this.getDataSource().getName(), this.getName()); mainDataSet.open();</p>
<p>var sqlText = new String();</p>
<p>sqlText = "select workorder.description, workorder.wonum nro_ot, workorder.location from workorder" </p>
<p>+ " where " + params["where"] </p>
<p>;</p>
<p>mainDataSet.setQuery(sqlText);</p>
<p> </p>
<p>SUBDATASET</p>
<p>subDataSet = MXReportDataSetProvider.create(this.getDataSource().getName(), this.getName()); subDataSet.open();</p>
<p>var sqlText = new String();</p>
<p>sqlText = "select workorder.description, workorder.wonum subot, workorderlocation, workorder.assetnum, workorder.parent " + " from workorder" + " where workorder.parent = ' "+ rows[0]["nro_ot"] + " ' " </p>
<p>//+ " where " + params["where"] </p>
<p>;</p>
<p>subDataSet.setQuery(sqlText);</p>
<p> </p>
<p>I can't see to make the report run the list of WO, it only shows the parent WO.</p>
Find more posts tagged with
Comments
wwilliams
<p>looks like you have a space on each side of <span style="color:rgb(40,40,40);font-family:'Source Sans Pro', sans-serif;">' "+ rows[0]["nro_ot"] + " ' " try</span></p>
<p><span style="color:rgb(40,40,40);font-family:'Source Sans Pro', sans-serif;">"select workorder.description, workorder.wonum subot, workorderlocation, workorder.assetnum, workorder.parent from workorder where workorder.parent = '"+ rows[0]["nro_ot"] + "' " </span></p>
<p> </p>
<p> </p>
<p><span style="color:rgb(40,40,40);font-family:'Source Sans Pro', sans-serif;">Also look at this post</span></p>
<p><span style="color:rgb(40,40,40);font-family:'Source Sans Pro', sans-serif;"><a data-ipb='nomediaparse' href='
http://developer.actuate.com/community/forum/index.php?/topic/29723-subreport-query-fails-to-run-after-first-non-null-row-returned-for-maximo-75/?p=118178'>http://developer.actuate.com/community/forum/index.php?/topic/29723-subreport-query-fails-to-run-after-first-non-null-row-returned-for-maximo-75/?p=118178</a></span></p>
;
GGUERRA
<p>Thank you. I've just started to work with BIRT and I see I need to know a little bit of SQL.</p>