Discussions
Categories
Groups
Community Home
Categories
INTERNAL ENABLEMENT
POPULAR
THRUST SERVICES & TOOLS
CLOUD EDITIONS
Quick Links
MY LINKS
HELPFUL TIPS
Back to website
Home
Intelligence (Analytics)
Compare report parameter value and row value in table onCreate method
ssekhar
Hi,
I want to compare report parameter value and row value in oncreate method for some filtering..
var var1 = this.getRowData().getColumnValue("computed_column");
var var2 = this.getRowData().getColumnValue("test");
var id = this.getRowData().getColumnValue("id");
if( var1 == "1" && id== params["id'].value ){
....
}
I am getting exception when I am doing like this.
Please let me know how can I do this.
Thanks,
Sekhar.
Find more posts tagged with
Comments
bhanley
What exception message are you getting? <br />
<br />
Are you just looking to dynamically toggle the visibility of a row based on cell values and parameter values? If so using the expression built into the Visibility property would be an easier and faster way to go. Have a look at this post: <a class='bbc_url' href='
http://www.birt-exchange.org/forum/designing-birt-reports/15284-visibility-property.html#post48759'>http://www.birt-exchange.org/forum/designing-birt-reports/15284-visibility-property.html#post48759</a>
;
ssekhar
Hi Brian,
Thanks for your reply. How can I create a visiblity property? Please let me know.
Thanks,
Sekhar.
bhanley
Highlight the row on the table that you want to show or hide. Them scroll through the properties at the center/bottom of the Eclipse IDE. You will see a property in the list called "Visibility". There is an expression editor there that you can add your logic to., The sample attached to the post I referenced does exactly this.
Good Luck!
ssekhar
Hi Brian,
Thanks for your reply. I tried but still getting all rows..here is my code
(BirtComp.notEqual(row["WINDOW_ID"], params["Window_id"].value) )
Please let me know whats going wrong in this.
Thanks,
Sekhar.
bhanley
What are the data types for the WINDOW ID in both the table and the parameter. I suspect the parameter is a String, is the element in the Data Set also a string? if not, try adding a "toString()" before doing your BirtComp operation.
ssekhar
both are strings.
Thanks,
Sekhar.
bhanley
Can you run the sample report I posted? That compares two strings.
Why not remove the parameter you are using from your expression and hard-code the value you want to filter on against the table value. Once that works, you will know your expression is valid, then you can substitute in your parameter value.
ssekhar
Hi Brian,
I am able to solve it. Thanks very much for your help.
Thanks,
Sekhar.