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)
Show TOC (table of contents) based on parameter?
Frenkys
<div>Is there a way to make the TOC display automatically in the report?</div>
<p>It's possible show/hide TOC using a parameter (not the button in the toolbar)?</p>
<p>I use birt 3.7</p>
<p>Thanks </p>
Find more posts tagged with
Comments
micajblock
<p>Is this for OS or commercial BIRT? I do not know how to do this for OS BIRT but for commercial BIRT it is easy with a few lines of code in the report.</p>
Frenkys
<blockquote class="ipsBlockquote" data-author="mblock" data-cid="143108" data-time="1459518535">
<div>
<p>Is this for OS or commercial BIRT? I do not know how to do this for OS BIRT but for commercial BIRT it is easy with a few lines of code in the report.</p>
</div>
</blockquote>
<p> </p>
<p>It is for OS BIRT. Is these few lines of code usable for me?</p>
<p>Tahnks </p>
micajblock
<blockquote class="ipsBlockquote" data-author="Frenkys" data-cid="143113" data-time="1459527813">
<div>
<p>It is for OS BIRT. Is these few lines of code usable for me?</p>
</div>
</blockquote>
<p>Unfortunately no. Hopefully someone else might know if this is possible with OS BIRT.</p>
Clement Wong
<p>It's not pretty for OS BIRT, but you can add a HTML Report Item at the top of your report to simulate a click on the TOC. Use JavaScript DOM to target the <input> and call it's click event.</p>
<pre class="_prettyXprint">
<VALUE-OF format="HTML">if (params["Show TOC"].value)
'<SCRIPT>document.getElementsByName("toc")[0].click();</SCRIPT>'</VALUE-OF>
</pre>
<p>Attached is an example created in OS BIRT 4.5.0, and I tested it in 3.7. Works for me in Chrome and Firefox.</p>
micajblock
<p>Very cool, Clement!</p>
Frenkys
<p>Thank you all !</p>
<p>Regards</p>