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)
Dynamic Groups
jgisler
Hello,<br />
<br />
We have a requirement to turn groups on and off based on input parameter values. <br />
<br />
We have achieved this by the following techniques.<br />
<br />
1. Conditionally suppress display of group header text by checking the input parameter values<br />
<br />
for example in the Visibility properties we add code like,<br />
<br />
<pre class='_prettyXprint _lang-auto _linenums:0'>
if( params["allTestsSelected"] == true ) {
true;
}
else {
false;
}
</pre>
<br />
2. In the scripted datasource we set the row field on which we group to all the same value, essentially putting all the data into the same group.<br />
<br />
The issue occurs when we attempt to suppress the bookmark in the PDF's table of contents. We use the same logic as above to suppress the bookmark and the "Table of Contents, Item Expression Field" in the Edit Group Details window.<br />
<br />
<pre class='_prettyXprint _lang-auto _linenums:0'>
if( params['allTestsSelected'] == false ) {
row["testName"] + ' / ' + row["standardName"]
}
</pre>
<br />
How can we conditionally suppress this bookmark?<br />
<br />
Thanks,<br />
<br />
Jim
Find more posts tagged with
Comments
mwilliams
Hi jgisler,
What is your BIRT version?
jgisler
We are using 2.5.1
mwilliams
If the user chooses to not group the report, try dropping the group with something like the following in the beforeFactory method of the report:
if (params["Group"].value == false){ //My parameter was a simple group or don't group parameter
reportContext.getDesignHandle().getElementByID(2315).drop(); //number is the group's id#
}
Hope this helps.