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)
Adding a parameter to the select where clause
jcollins
I have a parameter called SITEID that I would like to include in the following select statement
" select description faildescr from failureremark where WONUM = " + row["WONUM"]
Any help with this would be much apprieciated!
Find more posts tagged with
Comments
bhanley
Have a look at the onPrepare scripting event for the Data Set. You can modify the query there by manipulating "this.queryText". The easiest way to do what you are looking to do is to do an in-line string replace substituting your parameter value for a token in your source query.<br />
<br />
Check this out for a working sample:<br />
<br />
<a class='bbc_url' href='
http://www.birt-exchange.org/devshare/designing-birt-reports/806-dynamic-query-modification/#description'>Dynamic
Query Modification - Designs & Code - BIRT Exchange</a><br />
<br />
Good Luck!
jcollins
Thanks for the fast response bhanley!! The code you referenced helped me fix the issue! Awesome!!!
Code looks like this now:
" select description faildescr from failureremark where WONUM = " + row["WONUM"]
+ " and siteid = '" + params["siteId"] + "' " ;