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)
Calling a package from Report design
mdu_gprabh
Hi,
I am trying to call an java package(Test.java (to print "hello")) from an reportdesign through an event, Detail Row - Oncreate();
I am facing problem in importing the Test.java package and to call this package through report design. It is showing me as scripting error but not the exact error.
Attached the sample report design which reports two fields from the database and a java class to print "hello".
Thanks in Advance,
G.Prabu
Find more posts tagged with
Comments
aweaver
Use the following import.<br />
<br />
<pre class='_prettyXprint _lang-auto _linenums:0'>importPackage( Packages.com.company.AppLogic );
</pre>
<br />
See <a class='bbc_url' href='
http://wiki.eclipse.org/index.php/BIRT/FAQ/Scripting#Accessing_Java_Classes'>BIRT/FAQ/Scripting
- Eclipsepedia</a> for additional information.
basti
Hi,<br />
<br />
same problem here. I tried the importPackage from the wiki and also tried the SimpleClass example from <a class='bbc_url' href='
http://www.eclipse.org/birt/phoenix/examples/scripting/scripteddatasource/'>BIRT
Example Reports</a><br />
The SimpleClass example is doing it in a kind of another way, but either way doesn't work for me. With the importPackage I get an error as soon es I try to create a new Object.<br />
<pre class='_prettyXprint _lang-auto _linenums:0'>
ReportDesign (id = 1):
+ There are errors evaluating script "importPackage( Packages.com.my.company.project );
favoritesClass = new SimpleClass( );
</pre>
<br />
I did put the SimpleClass.class in the WEB-INF/classes dir under /com/my/company/project/ dir.<br />
<br />
I'm now using 2.5. Before that I tried the importPackage with the 2.3 but neither works for me.<br />
<br />
Thanks,<br />
Basti