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)
Errors viewing report with scripted data set
jobe
Hi,<br />
<br />
I am about to design a report using a scripted data set. When trying out some of the example reports provided that uses scripted data sets, everything seems fine. That is, I can preview the data set columns, and the report. Though, when inserting a chart to the report, in the chart editor I get this error (the data set columns can not be previewed in the chart editor, but they can be used as axis source, and the resulting chart can be previewed):<br />
<br />
<em class='bbc'>Caused by: org.eclipse.birt.data.engine.core.DataException: A BIRT exception occurred: There are errors evaluating script "__bm_OPEN()": ReferenceError: "SimpleClass" is not defined. (<inline>#2).. See next exception for more information. There are errors evaluating script "__bm_OPEN()": ReferenceError: "SimpleClass" is not defined. (<inline>#2).</em><br />
<br />
This is with the script<br />
<pre class='_prettyXprint _lang-auto _linenums:0'>importPackages(Packages.SimpleClass);
MyClass = new SimpleClass();</pre>
<br />
If instead using the script<br />
<pre class='_prettyXprint _lang-auto _linenums:0'>MyClass = new Packages.SimpleClass();</pre>
the message looks like:<br />
<br />
<em class='bbc'>Caused by: org.eclipse.birt.data.engine.core.DataException: A BIRT exception occurred: There are errors evaluating script "__bm_OPEN()": TypeError: [JavaPackage SimpleClass] is not a function, it is org.mozilla.javascript.NativeJavaPackage. (<inline>#1).. See next exception for more information. There are errors evaluating script "__bm_OPEN()": TypeError: [JavaPackage SimpleClass] is not a function, it is org.mozilla.javascript.NativeJavaPackage. (<inline>#1). </em><br />
<br />
I should also mention that this message is the same that appears if I try to view it in an RCP application which I would like to, the report viewer shows up but I get the error message. (I use the deprecated method display, since I don't know what to use instead). But it does not show up when clicking the view report button in eclipse, then it works fine.<br />
<br />
So, the script seems to work since the data can be extracted and previewed, but it seems to not work since the report can not be viewed except from inside eclipse. What can be the reason, and how do I solve it? I am using jre 6, eclipse 3.4.0, birt 2.3.1 and rhino 1.6.7. I would really appreciate some help!
Find more posts tagged with
Comments
jobe
Hi again,<br />
<br />
A small update: I have now tried the report examples on different computers and also the "view live example" for the "Sample BIRT Scripted Data Source Example" at DevShare, but the error occurs all the times.<br />
<br />
<em class='bbc'>errors evaluating script ...</em><br />
<br />
Does it work for anyone? I would be glad to get it working!
mwilliams
Hi jobe,
That is currently happening for everyone with the demo server. The problem is being worked on and should be fixed sometime soon. You can get it to work by creating a new java project and using the provided simpleClass.java file and report design in that project.
Hope this helps.
jobe
Hi Michael,
Unfortunately that doesn't help, I get the same error on my computer, so I guess I have to wait until a solution with the demo server appears, and try to do the same trick on my machine if possible.
I have also switched to java 1.5, but it doesn't help,so it would be interesting to see what the problem is when it is solved!
/ jobe
mwilliams
jobe,
I was able to get it to work that way before I posted my last response. Another way for you to be able to get it to work is by going to Window:Show View:Other:Report and Chart Design:Report Examples and click OK. Then down by the property editor, you'll see the Report Examples window. You can navigate to the report in that window and access the report there.