Reputation: 657
I am designing a BIRT report and want to display or hide a text in the BIRT report.
In the property editor, under "Visibility", I have checked the "Hide Element" checkbox and selected the "For All Outputs" radio button.
I am passing the value 1 to the column HIDE. The column HIDE is set as a String in the column mapping. If the value of HIDE is 1, I want to display it else, I want to hide it.
In the expression, I have added the below script
function check(value)
{
if(value=="1")
{
return false;
}
else
{
return true;
}
}
check(row["HIDE"])
But the text is always getting hidden and I am not able to find out why. I binded the data the column is returning and I am able to see the value 1 being displayed in the report. Not sure why it is not working in the Expression builder for hiding.
Upvotes: 0
Views: 2462
Reputation: 20112
Look at my answer to this question for a picture. For the compare funtion you select Not Equal to
and in the function field you just enter "1"
. You can leave the field for the value to display blank.
Upvotes: 1