1
votes

Environment: - BIRT Designer v4.3.2

Problem: I have a dataset that runs a query to retrieve data from a SQL DB and I'm trying to execute a javascript function that exists in an external js file. When trying to view the "Output Columns" for that dataset I get the following error:

org.eclipse.birt.data.engine.core.DataException: Fail to execute script in function __bm_beforeOpen(). Source:
------
" + util.evaluateQueryTextExpressions(this); + "
-----
A BIRT exception occurred. See next exception for more information.
ReferenceError: "util" is not defined. (<inline>#1)

The javascript file which contains the function has been added to the report as a resource.

NOTE: When I actually generate the report, everything works fine as intended. However it's only in BIRT designer whenever I try to view "Output Columns" or "Preview Results" do I encounter this problem.

Assistance with resolving this problem will be greatly appreciated. Thanks!

1
I've got a similar error resulting from trying to create a "joined dataset" from two datasets. They work fine independently but no luck when combined. Seems almost like a string concatenation issue merging the two beforeOpen script blocks. - ficuscr
I wrapped the beforeOpen code in a try/catch block. Was then able to get 'column output' and at least use the joined dataset. The preview never worked but that is fine as real issue was things being so broken I didn't even get columns. - ficuscr

1 Answers

1
votes

This is a known limitation. AFAIK there is no workaround, so you just cannot use "Preview results" in your case.