Search code examples
reportbirt

Passing parameter value to hiding element expression. BIRT


I am trying to pass a parameter value to the hiding column element (in a table) in the expression box, so that if the value it's false it will not show the column.

Ex: my parameter is an int ( 2013 or 2014 or 2015..)

I tried the following but with no succes:

if(params["pStartEI"].value > 2014)
this.getStyle().display="none"; 
else
this.getStyle().display="block";

or the following:

if(params["pStartEI"].value > 2014)
{
true;
}
false;

Please tell me if you encountered this.

Thank you.


Solution

  • Try the following

    if(params["pStartEI"].value > 2014)
    {
        true;
    }
    else
    {
        false;
    }