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)
how to pass a list of integers to birt parameter value
knlgetter
How do I pass three integers - 1111,2222,3333 to the value of WS_FACTID?<br />
<br />
<img src='
http://4.bp.blogspot.com/_2YQMPJPq75s/TGmLk-EpwVI/AAAAAAAAAK8/5HwJjYoDPkw/s1600/birt.png'
alt='Posted Image' class='bbc_img' /><br />
<br />
I tried {1111,2222,3333} but didn't work...
Find more posts tagged with
Comments
mwilliams
Hi knlgetter,
You want that to be the default value?
knlgetter
Yes, trying to fill out the default value with a list of integers
mwilliams
Try making the parameter of type string and put "(11111,22222,33333)" as the expression. Then in your query, be sure to use an IN clause for it. I think that should work.
knlgetter
Thanks... I tried this:<br />
<br />
<img src='
http://2.bp.blogspot.com/_2YQMPJPq75s/TGqDeIkNqyI/AAAAAAAAALU/nYRHhbfZUHI/s1600/1.jpg'
alt='Posted Image' class='bbc_img' /><br />
<br />
but got an error:<br />
<img src='
http://1.bp.blogspot.com/_2YQMPJPq75s/TGqDghDSdCI/AAAAAAAAALc/VdC73Ochzrk/s1600/2.jpg'
alt='Posted Image' class='bbc_img' />
pricher
Attached is an example that shows how to script the beforeOpen method of a data set to obtain what you want. The steps are:
1. Build a query with a dummy argument (here, 000) in the IN clause;
2. Use the beforeOpen method to replace the dummy argument with the value(s) from your report parameter.
Hope this helps!
P.
knlgetter
Got it... One question though:
We don't use query within our dataset, so in our beforeOpen, what code should we use to replace the parameter value?
pricher
What are you using? A flat file?
knlgetter
We're developing BIRT reports for Rational Team Concert and we're using the Jazz datasource<br />
<img src='
http://1.bp.blogspot.com/_2YQMPJPq75s/TGqTsC8YazI/AAAAAAAAALs/WqKun7-8gMU/s1600/jazz.jpg'
alt='Posted Image' class='bbc_img' /><br />
<br />
Once connected the datasource, we select which database table we want to work on and create a dataset for it...<br />
<img src='
http://1.bp.blogspot.com/_2YQMPJPq75s/TGqTpJygAlI/AAAAAAAAALk/WIOXDIaorYM/s1600/jazz2.jpg'
alt='Posted Image' class='bbc_img' />
pricher
I am not familiar with that custom data source. It doesn't seem like the Jazz data source is set up to accept multiple values as an input parameter.
Sorry if I cannot help you further...
P.
knlgetter
No problem. Let me get with the product support and see if have something from there. Thanks, anyway...