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 4.3.1 (Maximo 7.6) sub-query error - wrong value binded
PPB
<p>Hi All,</p>
<p> </p>
<p>I have an issue in the new 4.3.1 report designer and even in Maximo. When I use sub-query in the report the first binding is ok but then for all records the sub-data is displayed in the report.</p>
<p> </p>
<p>E.g. I have a MASTERPM report where I show all related JP sequence. When I run the report for more master PM the first record shows the proper jobplan sequences which jobplan sequences is displayed for all PM after that.</p>
<p> </p>
<p>I tried 2 solution here:</p>
<p> </p>
<p>1.</p>
<div><strong><span style="font-size:12px;">jpDataSet = MXReportDataSetProvider.create(this.getDataSource().getName(), this.getName());</span></strong></div>
<div><strong><span style="font-size:12px;">jpDataSet.open();</span></strong></div>
<div> </div>
<div><strong><span style="font-size:12px;">var sqlText = new String();</span></strong></div>
<div> </div>
<div><strong><span style="font-size:12px;">// Add query to sqlText variable.</span></strong></div>
<div><strong><span style="font-size:12px;">sqlText2 = "select masterpmseq.jpnum, jobplan.description as jpdesc, masterpmseq.interval as intval "</span></strong></div>
<div><strong><span style="font-size:12px;">+ "from masterpmseq "</span></strong></div>
<div><strong><span style="font-size:12px;">+ "inner join jobplan on jobplan.jpnum = masterpmseq.jpnum "</span></strong></div>
<div><strong><span style="font-size:12px;">+ "where "</span></strong></div>
<div><strong><span style="font-size:12px;">+ "masterpmseq.masterpmnum = ?"</span></strong></div>
<div><strong><span style="font-size:12px;">;</span></strong></div>
<div> </div>
<div><strong><span style="font-size:12px;">jpDataSet.setQuery(sqlText);</span></strong></div>
<div><strong><span style="font-size:12px;">jpDataSet.setQueryParameterValue(1, rows[0]["mpmnum"]);</span></strong></div>
<div> </div>
<div> </div>
<div> </div>
<div>2.</div>
<div>
<div><strong><span style="font-size:12px;">jpDataSet = MXReportDataSetProvider.create(this.getDataSource().getName(), this.getName());</span></strong></div>
<div><strong><span style="font-size:12px;">jpDataSet.open();</span></strong></div>
<div> </div>
<div><strong><span style="font-size:12px;">var sqlText = new String();</span></strong></div>
<div> </div>
<div><strong><span style="font-size:12px;">// Add query to sqlText variable.</span></strong></div>
<div><strong><span style="font-size:12px;">sqlText2 = "select masterpmseq.jpnum, jobplan.description as jpdesc, masterpmseq.interval as intval "</span></strong></div>
<div><strong><span style="font-size:12px;">+ "from masterpmseq "</span></strong></div>
<div><strong><span style="font-size:12px;">+ "inner join jobplan on jobplan.jpnum = masterpmseq.jpnum "</span></strong></div>
<div><strong><span style="font-size:12px;">+ "where "</span></strong></div>
<div><strong><span style="font-size:12px;">+ "masterpmseq.masterpmnum = '" + rows[0]["mpmnum"] + "'"</span></strong></div>
<div><strong><span style="font-size:12px;">;</span></strong></div>
<div> </div>
<div><strong><span style="font-size:12px;">jpDataSet.setQuery(sqlText);</span></strong></div>
</div>
<p> </p>
<p> </p>
<p>In the previous versions this worked but right now in the new version in both case in designer and Maximo as well the first sub-query result is bounded to the main record.</p>
<p> </p>
<p>Does anyone idea why?</p>
<p> </p>
<p>Kind regards</p>
<p>Peter</p>
Find more posts tagged with
Comments
Vineet Joshi
<p>Hello,</p>
<p> </p>
<p>FYI, I am using BIRT 4.3.1 and maximo 7.6</p>
<p>I am facing the same issue but in report designer only, report is working fine in Maximo. I guess this was a bug in Version 3.7.1 but was not updated until 4.3.1. </p>
<p> </p>
<p>Thanks </p>
PPB
<p>Hi Jack S,</p>
<p> </p>
<p>Thanks for your reply I had the same experience back in February so it is just faulty in the designer.</p>
<p> </p>
<p>Cheers,</p>
<p>Peter</p>
Vineet Joshi
<p>Hi PPB,</p>
<p> </p>
<p>This is not an issue. All we have to do is to make some modifications and it will work fine.</p>
<p> </p>
<p>Select maindataset --> go to advanced Properties --> set "Needs Cache for data-engine" to true.</p>
PPB
<p>Thanks a lot buddy that works!</p>