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)
Can I have a variable number of groupings?
benjones
Hello,
I have a BIRT report that is using a scripted data set. We want to give our customers the option to have nested groups in the report, up to 3 levels deep. I know how to statically add 3 groups to the report, but if the customer only wants to group 1 level deep, how do I suppress the other 2 groupings? I was thinking that since the data set is scripted, we could dynamically pass in information about how the grouping should happen...but I am lost on how to change how grouping happens via javascript on the fly. What is the best way to tackle this problem? Thanks for your help.
Find more posts tagged with
Comments
mwilliams
Does your scripted dataSet create a query to query a database with where you could dynamically change the grouping in the query based on the user's selection? Or do you need to do the grouping inside BIRT?
mwilliams
Here is a report that shows how you can use parameters to decide if a level of grouping is used within BIRT. Each group in the table has an expression that checks the parameter to see if the group should be used. If not, the expression returns "" as the grouping column. If you have more than 3 options, this would have to be changed up a little, but this would get you started. You could also dynamically show a group header and hide columns that are used in groupings. This report was made in 3.7.1. Let me know if you have questions or if I misunderstood something.