Jump to content

BIRT Developer Center Download


File Information

  • Submitted: Aug 18 2010 07:38 AM
  • Last Updated: Apr 14 2014 09:04 AM
  • File Size: 22.48KB
  • Views: 18296
  • Downloads: 35
  • Approved by: mwilliams
  • Approved on: 14 April 2014 - 09:04 AM
  • Summary: Quick tip showing how to hide a table based on the value from another dataSet. (Example Included)
  • Content Type: Designs & Code
  • BIRT Version: 2.6

Download Hide/Show Data Based on a Value from Another Data Set

- - - - -
Grid visibility data set table

I have seen several instances where someone needs to hide a table or other report element based on the value in another dataSet. One way to achieve this would be to put the element or elements that you want to show/hide based on this value into a grid that is attached to the other dataSet. You can then hide the grid if the value meets your requirement to hide the data with a simple if statement in your visibility expression.

Attached is an example created in BIRT 2.6.0 that does just this. A scripted dataSet randomly has a value of 0 or 1 in it to show this working. A grid is then tied to this dataSet. The table tied to the other dataSet is placed inside the grid. The visibility expression is set to hide the data if the scripted dataSet's value is 0 and to show if it's 1. The value from the scripted dataSet is shown at the top of the report so that you can see this working.

good logic... 

    • anshul9824 likes this

  • 997 Total Files
  • 8 Total Categories
  • 153 Total Authors
  • 31707 Total Downloads
  • Joyplot in iHub Latest File
  • Clement Wong Latest Submitter

0 user(s) are online (in the past 1 minutes)

0 members, 0 guests, 0 anonymous users