Using "where" parameter returns results in Preview, no results in Maximo
Options
<p>I am using BIRT Report Designer 2.3.2 and Maximo 7.1. I created a report for work orders. When I run the report in Preview, or without the Maximo where clause the report runs perfectly. As soon as I add the maximo where parameter I get no results. I have attached the report. I added the where parameter (not copied) and the report runs fine in Maximo when I leave the where parameter out. Any ideas? </p>
0
Comments
-
<p>Try adding a space before the last 'and' in the main data set open script</p>
0 -
<p>I added the space and I still get no results. </p>
0 -
<p>What do you mean you added the where parameter?</p>
0 -
<p>Like</p>
<p>params["where"].replace("workorder.","wo.");</p>
<p> </p>
<p> </p>
<p>to get a log of your report and view your SQL statement, uncomment the last two lines.</p>
<p>This is in the initalize method.</p>
<p> </p>
<p>importPackage(Packages.com.ibm.tivoli.maximo.report.script);<br>
mxReportScriptContext = MXReportScriptContext.initialize(reportContext);<br>
//mxReportScriptContext.setDefaultLogLevel("DEBUG");<br>
//mxReportScriptContext.setDefaultLogFile("c:/temp/myreport.log");<br>
</p>
0 -
<p>A couple of items I noticed:</p>
<p> </p>
<p>1. The subreport dataset for WPLaborDataSet is using an incorrect where clause:</p>
<pre class="_prettyXprint">
+ "where wo.wonum = '" + inputParams["parentwo"] + "'"
</pre>
<p>But no where in the select statement is referenced the WORKORDER table or aliasing a table to "WO".</p>
<p> </p>
<p>2. The subreport datasets are not linked properly to the main dataset in the where clause. For example, the ChildWorkOrderDataSet uses the following where clause:</p>
<pre class="_prettyXprint">
+ " where parent.wonum = '" + inputparams["parentwo"] + "' "
</pre>
<p>But at no point is a parameter declared for "parentwo". The code that would probably work better is to pull the selected work order from the main dataset:</p>
<pre class="_prettyXprint">
+ "where parent.wonum = '" + rows[0]["wonum"] + "'"
</pre>
<p>3. The Fetch method on the mainDataSet uses </p>
<pre class="_prettyXprint">
row["wolongdesc"] = mainDataSet.getHtmlString("wolongdesc");
</pre>
<p>While I believe that is correct syntax for a BIRT report, I don't believe Maximo will parse that type get method. OOTB Maximo BIRT reports and the training from IBM states a long description should be treated as a normal text box:</p>
<pre class="_prettyXprint">
row["wolongdesc"] = mainDataSet.getString("wolongdesc");
</pre>0
Categories
- All Categories
- 109 Developer Announcements
- 49 Articles
- 101 General Questions
- 123 IM Services
- 40 OpenText Hackathon
- 31 Developer Tools
- 20.6K Analytics
- 4.1K AppWorks
- 8.9K Extended ECM
- 897 Cloud Fax and Notifications
- 77 Digital Asset Management
- 9.3K Documentum
- 29 eDOCS
- 123 Exstream
- 39.8K TeamSite
- 1.7K Web Experience Management