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)
Problems in BIRT 2.6
smgomes
Hi,
recently i upgrade BIRT to version 2.6 and i'm getting problems with ScriptDataSet.
At my RCP Application i use this code to pass a Collection to BIRT:
birtEngine.getEngineConfig().setProperty(tableName, tempCollection);
In report in DataSet Open Method i had this code:
iterator_artigos = artigos.iterator();
in the Fetch Method i had this:
if( !iterator_artigos.hasNext() ) return false;
artigos = iterator_artigos.next();
(code)
When i try to show the report in my application i get this error:
WARNING: A BIRT exception occurred: Error evaluating Javascript expression. Script engine error: ReferenceError: "artigos" is not defined. (#1)
Script source: , line: 0, text:
__bm_OPEN(). See next exception for more information.
Error evaluating Javascript expression. Script engine error: ReferenceError: "artigos" is not defined. (#1)
Script source: , line: 0, text:
__bm_OPEN()
In minor version i don't get this error, so what's the difference now in version 2.6 ?
Please help me, i really need to solve this problem quickly.
Thanks.
Find more posts tagged with
Comments
mwilliams
Hi smgomes,
Can you reproduce this issue with a simple scripted dataSet and attach the report in here? Thanks!
smgomes
<blockquote class='ipsBlockquote' data-author="'mwilliams'" data-cid="66512" data-time="1279300476" data-date="16 July 2010 - 10:14 AM"><p>
Hi smgomes,<br />
<br />
Can you reproduce this issue with a simple scripted dataSet and attach the report in here? Thanks!<br /></p></blockquote>
<br />
<br />
Hi mwilliams, <br />
<br />
here is my rptdesign. The problem is at the Open Method's Dataset, when i call the report at my RCP Applicattion to render i receive the error:<br />
<br />
WARNING: A BIRT exception occurred: Error evaluating Javascript expression. Script engine error: ReferenceError: "artigos" is not defined. (#1)<br />
Script source: , line: 0, text:<br />
__bm_OPEN(). See next exception for more information.<br />
Error evaluating Javascript expression. Script engine error: ReferenceError: "artigos" is not defined. (#1)<br />
Script source: , line: 0, text:<br />
__bm_OPEN()<br />
<br />
but in minor releases of BIRT i don't get this error.<br />
<br />
Thanks for your help.
smgomes
Hi mwilliams,
i found a soluction for my problem... at my Java code i replace:
birtEngine.getEngineConfig().setProperty(tableName, tempCollection);
for this:
birtEngine.getEngineConfig().addScriptableJavaObject(tableName, collection);
tableName is "artigos"
collection is a Java Collection with all information
at the render of the report i don't get any error
but the method addScriptableJavaObject is deprecated any suggestion?
Thanks.
mwilliams
smgomes,
Try passing it through like this:
birtEngine.getAppContext().put("artigos", collectionOjbect);
smgomes
<blockquote class='ipsBlockquote' data-author="'mwilliams'" data-cid="66988" data-time="1280850156" data-date="03 August 2010 - 08:42 AM"><p>
smgomes,<br />
<br />
Try passing it through like this:<br />
<br />
birtEngine.getAppContext().put("artigos", collectionOjbect);<br /></p></blockquote>
<br />
Thanks! It works
mwilliams
Great to hear! Good luck!