Discussions
Categories
Groups
Community Home
Categories
INTERNAL ENABLEMENT
POPULAR
PUBLIC CLOUD
PRIVATE CLOUD
Quick Links
MY LINKS
HELPFUL TIPS
Back to website
Home
Intelligence (Analytics)
js user defined function in value expression
mas_h
Hi,
I'm using BIRT 2.2.
I tried to write and use javascript user defined function in a data column binding value/expression, and it runs well when I preview it using the designer. But when I run it from application as html and pdf, I got this error "org.mozilla.javascript.InterpretedFunction@7f4efec8".
What I did in the expression builder is something like this.
var data = dataSetRow["COL_A"];
if (data != null) {
var text = function_A(data);
text;
}
Any ideas? Thanks.
Find more posts tagged with
Comments
mas_h
By the way, the error "org.mozilla.javascript.InterpretedFunction@7f4efec8" is actually printed on the column that I set the expression (it does not appear at the end of the report page).
paulk
You might need an else clause.
var data = dataSetRow["COL_A"];
if (data != null) {
var text = function_A(data);
text;
}else{
null;
}
Also, try testing using Internet Explorer to see if that generates an error.