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 toggle row visibility for a birt table report with group
birtbeginner
<p>Dear all</p><p>I have a birt table report with group. I want to hide the detail rows and toggle by group. But don't know how to achieve it.</p><p>Here's what I want to do:</p><p>For example:</p><p>for a birt report that group by year when not toggled it looks like the following:</p><p>1999</p><p> order1</p><p> order2</p><p> order3</p><p> order4</p><p>2000</p><p> order5</p><p> order6</p><p> order7</p><p> order8</p><p> order9</p><p> order10</p><p>2001</p><p> order11</p><p> order12</p><p> order13</p><p>The output after the toggle I want will be like:</p><p> </p><p>-1999</p><p> order1</p><p> order2</p><p> order3</p><p> order4</p><p>+2000</p><p>+2001</p><p>When I click on the plus sign (as for year 1999) it will show me the detail info and the + will become -</p><p>while details for other year (2000, 2001) will still be hiding.</p><p> </p><p>Anyone has any idea?</p><p>Thank you!</p><p> </p>
Find more posts tagged with
Comments
mwilliams
<p>Take a look at this example:</p><p> </p><p><a data-ipb='nomediaparse' href='
http://developer.actuate.com/community/forum/index.php?/files/file/426-expandablecollapsible-groups-by-drill-through/'>http://developer.actuate.com/community/forum/index.php?/files/file/426-expandablecollapsible-groups-by-drill-through/</a></p><p> </p><p>If
you're not using the paginated viewer and are using a single page, you could do a client-side JavaScript solution. Let me know.</p>
birtbeginner
<p>Thank you so much! Michael</p><p>I has been trying to use a clent-side javascript but it doesn't work for me. I've explained this in another post.</p><p>But here's what I did again:</p><p>I got the code in below by googling. The only difference I made is to change the bottom script part from [OrderNumber] to my column name [state_name], the orininal one works fine but after the change it didn't work at all. The only difference would be my datatype is string while the original one is Integer</p><p>I did some debugging and found out that the hidetable() function never got called.</p><p>Any idea on that?</p><p>Thank you!</p><p>Maggie</p><p> </p><p> </p><p> </p><p> </p><p> </p><p> </p><p> </p><p><form></p><p><script></p><p>function hidetable(form, ord, rwcnt){</p><p> </p><p>//alert( document.getElementById(ord).style.display );</p><p> </p><p> </p><p>var hide = false;</p><p>var btnstr = "mybutton"+ord;</p><p> </p><p>if( document.getElementById(ord).style.display == 'block' || document.getElementById(ord).style.display == ""){</p><p>document.getElementById(ord).style.display = 'none';</p><p>document.getElementById(btnstr).value = "+";</p><p>//form.btnstr.value = "+";</p><p>hide = true;</p><p>}else{</p><p>document.getElementById(ord).style.display = 'block';</p><p>document.getElementById(btnstr).value = "-";</p><p>//form.btnstr.value = "-";</p><p>hide = false;</p><p>}</p><p>for( i=0; i< rwcnt; i++ ){</p><p>var drow = ord+""+i;</p><p>if( document.getElementById(drow)){</p><p>if( hide ){</p><p>document.getElementById(drow).style.display = 'none';</p><p>}else{</p><p>document.getElementById(drow).style.display = 'block';</p><p>}</p><p>}</p><p>}</p><p> </p><p> </p><p> </p><p>}</p><p> </p><p></script></p><p> </p><p><INPUT Type="BUTTON" name=<VALUE-OF>"mybutton"+row["ORDERNUMBER"]</VALUE-OF> Value="-" onClick='hidetable( this.form, <VALUE-OF>row["ORDERNUMBER"]</VALUE-OF>, <VALUE-OF>row["Aggregation"]</VALUE-OF> )'></INPUT> <VALUE-OF>row["ORDERNUMBER"]</VALUE-OF></p><p><script></p><p>hidetable( this.form, <VALUE-OF>row["ORDERNUMBER"]</VALUE-OF>, <VALUE-OF>row["Aggregation"]</VALUE-OF> );</p><p></script></p><p> </p><p></form></p><p> </p><p> </p><p> </p><p> </p><p> </p><p> </p><p> </p><p> </p><p> </p><blockquote class="ipsBlockquote" data-author="mwilliams" data-cid="128400" data-time="1402001713"><div><p>Take a look at this example:</p><p> </p><p><a data-ipb='nomediaparse' href='
http://developer.actuate.com/community/forum/index.php?/files/file/426-expandablecollapsible-groups-by-drill-through/'>http://developer.actuate.com/community/forum/index.php?/files/file/426-expandablecollapsible-groups-by-drill-through/</a></p><p> </p><p>If
you're not using the paginated viewer and are using a single page, you could do a client-side JavaScript solution. Let me know.</p></div></blockquote>
mwilliams
<p>Sorry for the delay. I just responded to the other post. Have you solved this issue?</p>