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)
How to develop multiple value parameter in BIRT designer
connie
Hi,
I need to create multiple value parameter, BIRT allow that when creating report parameter but can't pass into the data set's parameter, I try using filter, but only work on a simple query with one table like
select fund_id, fund_name from fund.
When I add into the other query with joint tables like below, then return no data.
select FUND.FUND_ID,FUND.FUND_NAME,CATEGORY.CATEGORY_DESC,STRATEGY.STRATEGY_DESC,FOF_ALLOC_RETURN.RETURN_VAL,FOF_ALLOC_RETURN.BMV
from FUND, CATEGORY, STRATEGY, FOF_ALLOC_RETURN
where FOF_ALLOC_RETURN.FUND_ID<>FOF_ALLOC_RETURN.PORTFOLIO_ID
and FOF_ALLOC_RETURN.RETURN_DATE=TIMESTAMP '2009-01-31 00:00:00.000'
and FOF_ALLOC_RETURN.RETURN_VAL is not null
and FOF_ALLOC_RETURN.BMV <> 0
and FUND.FUND_ID=FOF_ALLOC_RETURN.FUND_ID
and STRATEGY.STRATEGY_ID=FUND.STRATEGY_ID
and STRATEGY.CATEGORY_ID=CATEGORY.CATEGORY_ID
Can anyone help? Thanks a lot.
Find more posts tagged with
Comments
mwilliams
There's an example for using multivalue parameters in this devShare post:
http://www.birt-exchange.org/org/devshare/designing-birt-reports/1346-eclipsecon-2011-hands-on-tips-from-the-birt-forums-examples/
Let me know if you have questions.
connie
<blockquote class='ipsBlockquote' data-author="'mwilliams'" data-cid="75269" data-time="1301508421" data-date="30 March 2011 - 11:07 AM"><p>
There's an example for using multivalue parameters in this devShare post: <a class='bbc_url' href='
http://www.birt-exchange.org/org/devshare/designing-birt-reports/1346-eclipsecon-2011-hands-on-tips-from-the-birt-forums-examples/'>http://www.birt-exchange.org/org/devshare/designing-birt-reports/1346-eclipsecon-2011-hands-on-tips-from-the-birt-forums-examples/</a><br
/>
<br />
Let me know if you have questions.<br /></p></blockquote>
<br />
<br />
Thank you for your reply. My BIRT is 2.5.2 so I am not able to open your file. But I find a way now using filter, and it work.
mwilliams
If a filter works, then great. It will be slower than limiting your query with it though. If it works quickly enough for you, then no worries. If it runs too slowly, all you have to do is do a join on the multi-select parameter in your beforeOpen method of your dataSet, joining it with ',' and then add the (' to the front of the string and ') to the end of the new string and then add your where statement to your query like:
this.queryText = this.queryText + " where blah IN " + variableYouStoredModifiedParameterIn
connie
Thanks. I am actually creating the report on designer directly , not writing the code.
I come across another issue. I create the group and aggregation on the table, but unable to sort it on the aggregation item. is it a bug in 2.5.2?
I need to sort the aggregation item DESC and show the firt 20 as ranking like Top 20 ranking. but I try the rank function or top n, none of them work properly. what should I do? I need the report look like
1 fund1 50%
2 fund2 40%
3 fund3 30% .....
Thanks for all your help.
mwilliams
I think sorting by aggregation is a known issue of older versions. Not sure if it's been fixed yet. I'll have to take a look. As far as the multiple parameter deal, that is with the designer that I was talking about. There are just several scripting methods where you can do a little more on top of what just the designer does.
connie
Thanks, if you know which version it fix this sorting aggregation, let me know.
I have to try using joint data set to do the aggregation within the data set in my case.
But then I run into another issue, after join the datasets, I can do the 'distinct' in the join, so I try to use 'surpress duplicate' in row property, but it is not working? do you know a way to remove the duplicate row? or is it a way to modify the result set from the joint? Thanks a lot.
mwilliams
"suppress duplicates" doesn't work in your table when you use a joint dataSet? Can you reproduce this with the sample database and attach the report?
mwilliams
As far as the sorting goes, I just tried with 2.6.2 to sort by an aggregation I created in my table and it does not work. I get an error. Please file a bug for this at
http://www.birt-exchange.org/org/resources/bug-reporting/
and post the bug info in here for future reference. Thanks!