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)
Hide Table Group Headers when row count is 0
aparandekar
Hi,
I have multiple groups in a table and I would like to hide the group headers when the detail row count is 0.
I am unable to hide the group header even though I have the correct visibility expression.
I have attached a report for your review. The report contains only one group but I would like to know how I can do it with multiple group headers too.
Your help would be greatly appreciated.
Thanks.
Find more posts tagged with
Comments
mwilliams
Take a look at the modifications made. I added the same filter you use for the detail row to the aggregations you added to the table. Then, hid the group header based on the group total rows. Let me know if you have questions.
aparandekar
Thanks...works great ! I have another question regarding highlighting but will post it as a separate topic.
mwilliams
Sounds good! Let us know whenever you have questions!
JulianDownes
<p>When using nested groups, is it possible to hide an inner group's header or footer when certain conditions are met, and yet still include those rows amounts in an outer group's aggregations?</p><p> </p><p>Example: Running your rptdesign from this earlier post the first couple of rows display as </p><p> </p><div>AV Stores, Co.</div><p> </p><div>10110</div><div>Mar 18, 2003</div><div>Shipped</div><div>grouprowct: 1</div><div>group total rows 1</div><p><img src='
http://127.0.0.1:62454/iportal/iv/images/Expand.gif'
alt='Posted Image' class='bbc_img' /></p><div>Alpha Cognac</div><p> </p><div>10136</div><div>Jul 4, 2003</div><div>Shipped</div><div>grouprowct: 1</div><div>group total rows 2</div><div>10178</div><p> </p><p> </p><p>What if we didn't want ordernumber 10136 to be visible (for whatever reason)?</p><p>I tried changing the visibility condition from </p><p>BirtDateTime.year(row["ORDERDATE"]) >2003</p><p>to</p><p>(BirtDateTime.year(row["ORDERDATE"]) >2003) || (row["ORDERNUMBER"] = 10136)</p><p> </p><p>but this hides ALL order details regardless of their order number.</p><p> </p><p>My actual use-case is for an accounting balance sheet, where the dataset rows are transactions belonging to some sub-account/account), then I have 4 nested groups (sub-account, account, class, assetOrLiability).</p><p>I have deleted the detail row and all group header rows and just have aggregations in the 4 group's footer rows.</p><p>In most circumstances I want to display the sub-accounts group footer (and not show the account aggregation), but for some particular account numbers I need to hide the sub-account (innermost group) and only show the aggregations at the account group level.</p><p> </p><p>UPDATED</p><p> </p><p>My mistake....I accidentally used assignment not equality operator...</p><p>the expression should be </p><p>(BirtDateTime.year(row["ORDERDATE"]) >2003) || (row["ORDERNUMBER"] == 10136)</p><p>ie using == not =</p>
mwilliams
<p>In your example visibility script example, if you make it '==' instead of '=', it works as you would expect.</p>
Siva Subramanian
<p>Hi,<br>
<br>
I'm using BIRT Report Design and I'm using mulitiple aggregate function but I need to show the one aggregate group at runtime <strong>So how to hide the aggregate group based upon the report parameter</strong> So please help us.</p>
jfranken
<p>Hi Siva,</p>
<p> </p>
<p>Use the sample report posted above (HideGroupHeader.rptdesign) as an example. Select the Group Header row and look at the "Visibility" property. You'll see that "Hide Element" is checked and there is a formula in the Expression box. Replace that formula with:</p>
<p> </p>
<p>myValue == params["myParamName"].value</p>
<p> </p>
<p>where myValue is the field in the group header on which the visibility decision is based</p>
<p>and myParamName is the name of your report parameter</p>
<p> </p>
<p>Regards,</p>
<p>Jeff</p>