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)
Setting a parameter based on data set
drogina
I have a parameter that is being set by a data set query.<br />
The query returns one value and the parameter is hidden so that the report will just load with the release parameter being determined by the database. The base report loads fine with all the correct data, but if I try to pass the release parameter value into a drilldown report, it returns a null value. It also doesn't work if I try to reference the parameter value/display text in a report label.<br />
<br />
It's like the parameter only gets set once, but doesn't hold its value.<br />
<br />
Thanks in advance.<br />
<br />
ReleaseSelection data set query<br />
<pre class='_prettyXprint _lang-auto _linenums:0'>
select ID, NAME
from `RELEASE`
where IS_ACTIVE = true
AND PROJECT_ID = 1
AND IS_DEFAULT = 1;
</pre>
<br />
ReleaseParam config<br />
<pre class='_prettyXprint _lang-auto _linenums:0'>
<scalar-parameter name="ReleaseParam" id="39">
<property name="hidden">true</property>
<property name="valueType">dynamic</property>
<property name="isRequired">false</property>
<property name="dataSetName">ReleaseSelection</property>
<expression name="valueExpr" type="javascript">dataSetRow["ID"]</expression>
<expression name="labelExpr" type="javascript">dataSetRow["NAME"]</expression>
<property name="dataType">integer</property>
<property name="distinct">true</property>
<list-property name="selectionList"/>
<property name="paramType">simple</property>
<property name="controlType">list-box</property>
<property name="mustMatch">true</property>
<property name="fixedOrder">true</property>
<structure name="format">
<property name="category">Unformatted</property>
</structure>
</scalar-parameter>
</pre>
<br />
Dynamic text using ReleaseParam, returns "null data last updated on..."<br />
<pre class='_prettyXprint _lang-auto _linenums:0'>
params["ReleaseParam"].displayText + " data last updated on " + Formatter.format(row["import_date"], "MM/dd/yyyy hh:mm a")
</pre>
Find more posts tagged with
Comments
mwilliams
Can you attach your report? Or send it to me in email?