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)
Grouping by Parameters
Bordihn
<p>Hi,</p>
<p> </p>
<p>I would like to group different parameter in a report, meaning that the user can select a parameter and gets a sorted report by this groups as a result.</p>
<p> </p>
<p>For example: I have 8 rows in a report and want 3 of them to offer the possibilty for grouping/sorting. So I created a report and added 3 TableGroups for this 3 rows (datapoints) which results as expected in a report with static groups (TableGroup 1 first sorted, Table Group 2 second sorted...). I also added 3 Report parameters (Boolean, Check Box), so that the user can choose which group sorting he wishes.</p>
<p> </p>
<p>This dynamic groups, which the user can choose by selecting parameters, don´t work actually and I found nothing similar in the forum. So, anyone any ideas?</p>
<p> </p>
<p>Thanks in advance and best regards.</p>
Find more posts tagged with
Comments
micajblock
<p>Check out this DevShare</p>
<p> </p>
<p><a data-ipb='nomediaparse' href='
http://developer.actuate.com/community/forum/index.php?/files/file/1-dynamic-grouping-example/'>http://developer.actuate.com/community/forum/index.php?/files/file/1-dynamic-grouping-example/</a></p>
;
Clement Wong
<p>You can create a dynamic group based on a parameter.</p>
<p> </p>
<p>First, create a new column binding on the table for your groups. In the attached example, we'll either group by country or state.</p>
<pre class="_prettyXprint">
if (params["pColumnGroup"].value == "Country")
row["COUNTRY"];
else
row["STATE"];</pre>
<p>Then, you can Edit Group and change the Group On column to the newly created column.</p>
<p> </p>
<p>The attached design demonstrates a dynamic grouping between country and state.</p>
<p> </p>
<p>Another similar technique illustrated by Michael Williams changes the dynamic group directly in the Group On column as an expression. See it here @ <a data-ipb='nomediaparse' href='
https://www.eclipse.org/forums/index.php/t/452359/'>https://www.eclipse.org/forums/index.php/t/452359/</a></p>
;
<p> </p>
<p> </p>
<p>A more advanced technique would be to use the Design Engine API in the <em>beforeFactory </em>event to dynamically group and construct the table based on the group.</p>
Bordihn
<p>Hi Clement,</p>
<p> </p>
<p>your solution worked pretty well, so I prefer this way instead of mblock´s example (less changes). But it´s good to know that there are different working solutions for this problem.</p>
<p> </p>
<p>Thanks a lot for your help and best regards.</p>
Clement Wong
<p>Good to hear. With BIRT, there are many ways and techniques to solve a problem/requirement!</p>