Discussions
Categories
Groups
Community Home
Categories
INTERNAL ENABLEMENT
POPULAR
THRUST SERVICES & TOOLS
CLOUD EDITIONS
Quick Links
MY LINKS
HELPFUL TIPS
Back to website
Home
Intelligence (Analytics)
Set parameter value only at runtime
mosad
<p>Hi,</p>
<p> </p>
<p>i want to set the value of parameter only at runtime. i have a script in the beforOpen method of a dataset that changes a part of queryText. My Problem is, this script is also executed when i try to edit the dataset from the query builder editor.</p>
<p> </p>
<p>can i do something like this:</p>
<pre class="_prettyXprint _lang-js">
if (report.isRuntime() == true) {
this.queryText = this.queryText.replace("--<$>", " AND S.S_ID IN ("+params["HiddenSessions"].value+")");
}
</pre>
<p>Thanks for help!</p>
Find more posts tagged with
Comments
Clement Wong
<p>You won't be able to set a variable in the <em>initialize</em>, or <em>beforeFactory</em> events because they will be called when you preview in the Edit Data Set.</p>
<p> </p>
<p>However, you can use the <em>Edit Data Set > Property Binding > Query Text</em> to build/change the SQL statement. If you use this method, when you Preview, it will run the query that is defined in the Query section. If you run the report, it will use the Query Text property binding.</p>