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)
Displaying table footer (legend or note) based on condition using Birt API java code
ravi11
<p>Hi,</p><p> </p><p> </p><p>I want to show a footer for a table content and it should be based on a condition weather the</p><p>data(e.g '$') is present in a particular page or not. I am trying to write java code to generate rptdesign for this.</p><p> </p><p>If we consider of having a value $ in a page then we should show $ - dollar as foot note in the page where $ is present as data.</p><p> </p><p>
</p><p>Page 1:</p><p>Content has '$'</p><p> </p><p>$ - dollar</p><p>
</p><p> </p><p>
</p><p>Page 2:</p><p>Content doenst have '$'</p><p> </p><p>// no footer for this page</p><p>
</p><p> </p><p>
</p><p>Page 3:</p><p>Content has '$'</p><p> </p><p>$ - dollar</p><p>
</p><p> </p><p>Thanks in advance.</p><p> </p><p> </p><p> </p>
Find more posts tagged with
Comments
kclark
<p>In the onCreate() of the date in your table you could set a persistent global variable. The in your footer check the value in a visibility script. The script for your date might look something like:</p><p> </p><p></p><pre class="_prettyXprint _linenums:0">if(this.text == "some condition") { reportContext.setPersistentGlobalVariable("showFooter", "yes");}</pre><p> </p><p>Then your code for the visibility script would be something like:</p><p> </p><p></p><pre class="_prettyXprint _linenums:0">if(reportContext.getPersistentGlobalVariable("showFooter") == "yes") { false;}else{ true;} // Reset the PGVreportContext.setPersistentGlobalVariable("showFooter", "no");</pre><p> </p><p>I haven't test it, but something like that should work. Let me know if you need an example report!
</p>
ravi11
<p>Hi,</p><p> </p><p>Thanks for your quick response. I had applied the points you have shared with me,but I guess some minor changes for the rptdesign would work fine for me.</p><p> </p><p>I am attaching the rptdesign along with this. My question is can we set a dynamic page footer in master page.</p><p> </p><p>Because in table footer is only displayed in the end of the table. My requirement is i need to display the footer on each page which comes from dataset and it need to be displayed based on a condition.</p><p> </p><p>In the attached rpt design can you do that for me. There take a value from a column VS 1 or 2 or 3 and display a footer on the value of the column value. Once again thanks for your reply.</p><p> </p><p>Thanks,</p><p>Ravi</p><p> </p><p> </p>