Discussions
Categories
Choose a Product
THRUST SERVICES
CORE APPS
CE PRODUCTS
...
Quick Links
POPULAR
HELPFUL TIPS
Groups
My Links
FOR SIGNED IN MEMBERS:
Back to website
Home
DevShare Downloads
Hiding specific columns in report based upon the input
Migrateduser
Hello,<br />
Just a few days back, I was stuck with a need to hide column(s) in a table when there were no data for that column.<br />
A very straignt forward and obvious approach would be have a check in the java code that is trigerring the report and pass a parameter to BIRT indicating that there are no values for that column and so, BIRT would hide that column based upon that parameter's value.<br />
<br />
But many would agree to my point that going back and changing the code is not always so simple and easy because once code is touched, we can never be sure that the original functionality is retained, hence it demands fresh rounds of functionality testing and re-deploy/re-installation of the code.<br />
<br />
If the same could be achieved just by changing the designer, it would save a lot of time and effort.<br />
<br />
One way what I've used in my reports to achieve this is by writing an aggregation the table. I had to list out personal details of students in a class. I had to hide
Mobile Number
column if none of the students have a valid mobile number registered.<br />
<br />
I wrote an aggregation for counting the number of columns which have valid mobile numbers, later in the visibility tab for that cloumn, I had a check that if the number of valid mobile numbers is 0, then hide the column.<br />
<br />
There are other ways also, i.e. by concatenating the values and then checking, and so on.<br />
<br />
Hope this helps for first time user who come up with such requirements.<br />
<br />
regards<br />
<br />
Arpan
Find more posts tagged with
Comments
There are no comments yet