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
Using Parameters in Union Query
Migrateduser
<p>Good Afternoon All, </p>
<p> </p>
<p>I am new to BIRT for Maximo and I am building a query based on two tables and combining the data via an SQL UNION statement. The issue I am having is when trying to build in parameters to feed into Maximo. I have to use the same parameters (Start date, end date, siteid) in both sections of the sql statement. I have tried a few of the basic ways to build parameters. I was able to get my query to work in BIRT using two parameters in each of the where clauses:</p>
<p> </p>
<p>and transdate >= " + MXReportSqlFormat.getStartDayTimestampFunction(params["startdate"]) + " "</p>
<p>and transdate <= " + MXReportSqlFormat.getStartDayTimestampFunction(params["enddate"]) + " "</p>
<p> </p>
<p>however, when I imported into Maximo I was unable to bind those to an attribute. The report wouldn't run. I then tried the following since I had success with this in another report. </p>
<p> </p>
<div>if(params["startdate"].value) {</div>
<div> sqlText += " and matrectrans.actualdate >= " </div>
<div> + MXReportSqlFormat.getStartDayTimestampFunction(params["startdate"]);</div>
<div>}</div>
<p> </p>
<p>However this didn't work either. My next thought was to build two data sets and join them somehow but as I said, I am new to this so I would have to teach myself how to do all that.</p>
<p> </p>
<p>I am at a loss for what to do next so if you have any advice on options please let me know. I can attach my report if needed. </p>
<p> </p>
<p>I am in Maximo 7.6 and using eclipse 4.3.1</p>
Find more posts tagged with
Comments
There are no comments yet