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)
Hidden Parameters
TimK
I have a report with visible and hidden parameters. When the report is launched it displays the visible parameters and a run button. When the run button is clicked I would like to update the hidden parameters with values from my application then execute the report. However, try as I may, I cannot understand how to do this.
Has anybody done this before?
Find more posts tagged with
Comments
johnw
You would do this in the beforeFactory event. Select the report body, or in the Outline view, select the root of the report. Open the scripting tab, and select the beforeFactory event. In there, you would use some sort of script like:<br />
<br />
params["hiddenParameterName"].value = "My Value";<br />
<br />
or maybe its setValue("my value"), I dont remember off the top of my head, but it would be something like that. You could also set global variables and use them in the same manner, so you would do something like:<br />
<br />
reportContext.setGlobalVariable("my variable name", "my value");<br />
<br />
Then you would access that value in a data element, script, or something with:<br />
<br />
reportContext.getGlobalVariable("my value");<br />
<br />
John<br />
<br />
<blockquote class='ipsBlockquote' data-author="'TimK'" data-cid="68198" data-time="1283888910" data-date="07 September 2010 - 12:48 PM"><p>
I have a report with visible and hidden parameters. When the report is launched it displays the visible parameters and a run button. When the run button is clicked I would like to update the hidden parameters with values from my application then execute the report. However, try as I may, I cannot understand how to do this.<br />
<br />
Has anybody done this before?<br /></p></blockquote>
TimK
John - thanks for the reply. I forgot to say that I'm using the report viewer on an .aspx web page and using the JavaScript API. Does that make a difference as I though the beforeFactory when specific to the Birt Designer/report?
johnw
It shouldn't.<br />
<br />
<blockquote class='ipsBlockquote' data-author="'TimK'" data-cid="68227" data-time="1283930391" data-date="08 September 2010 - 12:19 AM"><p>
John - thanks for the reply. I forgot to say that I'm using the report viewer on an .aspx web page and using the JavaScript API. Does that make a difference as I though the beforeFactory when specific to the Birt Designer/report?<br /></p></blockquote>
TZhang
<blockquote class='ipsBlockquote' data-author="'TimK'" data-cid="68227" data-time="1283930391" data-date="08 September 2010 - 12:19 AM"><p>
John - thanks for the reply. I forgot to say that I'm using the report viewer on an .aspx web page and using the JavaScript API. Does that make a difference as I though the beforeFactory when specific to the Birt Designer/report?<br /></p></blockquote>
<br />
it is within actuate report itself how to handle params and viarables, all of these have nothing to do with JSAPI implementation neither with your .net application.