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)
Passing arrays as parameters in urls
wondermike
Hi, I've got an URL that would generate a pdf each day. I'll call it like this:<br />
<pre class='_prettyXprint _lang-auto _linenums:0'>wget "http://localhost:8080/MRL/run?__report=myreport.rptdesign&__format=pdf&__overwrite&mydate=`date -d 'now - 1 day' +"%m%%2F%d%%2F%Y"`Ð=CONF&ILOT=ILOT1" -O prod-`date -d 'now - 1 day' --iso`.pdf</pre>
The parameter <pre class='_prettyXprint _lang-auto _linenums:0'>ETH=CONF</pre> should actually be an array, which I'll access with <pre class='_prettyXprint _lang-auto _linenums:0'>ETHselected = reportContext.getParameterValue("ETH");
ETHselected[0]
ETHselected[1]
...
</pre>
<br />
In the interactive version of the report, I've got a multiselect parameter input field which will provide me the array in the above code.<br />
<br />
<strong class='bbc'>How do I have to pass that parameter in order to actually really receive an array on the BIRT side?</strong><br />
<br />
I'd like to fill the ETH array with multiple values like e.g. CONF, FINI, XYZ<br />
<br />
TIA<br />
Regards<br />
Michael
Find more posts tagged with
Comments
JasonW
Modify the url to be like:
ð=XYZð=FINIð=CONF
Get the value like:
reportContext.getParameterValue( "eth" )[0];
or
params["eth"].value[1];
Jason
wondermike
ah, perfect - that works! Thanks, Jason!
Regards
Michael
kramers
Hello,
I am a birt newbie but figured out how to pass arrays into birt from PHP through JavaBridge. I was wondering how to loop through the array to output the values into the table, similar to using the results of a database. Thanks.
JasonW
How are you passing in the array?
Jason