Reputation: 459
I am using Pentaho report designer 5.0 CE.
My report is having two groups, and one group contains row band with elements and values like,
Group1
Group2
Label1 - Value1
Label2 - Value2
Label3 - Value3
...
I need to show a row only if the value is not empty(without leaving blank space). I set the 'invisible-consumes-space' property to false (band level). The blank space is still there.
how could i hide a label & value (entire row) if the value is empty?
Upvotes: 1
Views: 4939
Reputation: 89
have you tried to put the label element and value element in a band. assumingly value is printed by name field.
this is your band.
-----------------
|label | name |
-----------------
select the band from structure tree and go to style tab->size&position -> visible option. then open the expression tab and paste
=IF(ISBLANK([Name]);"False"; "True")
OR
=IF(LEN([Name])<=0;"False"; "True")
I use the one below to hide all the group headers & footers when there is no data.
=IF(ISEMPTYDATA();"False"; "True")
And it works. Hope helps to you too.
Upvotes: 2
Reputation: 331
And empty string is not the same as an invisible element. Use the "visible" style instead and add your formula to the band's "visible" style setting to hide the band and all its subbands.
Upvotes: 1