help needed on scripted datasource [message #244729] |
Mon, 25 June 2007 23:08 |
Eclipse User |
|
|
|
Originally posted by: amit.rajpurkar.pepsico.com.au
Hi,
I am new to BIRT. I need help in getting an example or tutorial on using
scripted data sources in BIRT. I am using RCP Report Designer 2.1.1
I have tried
http://www.eclipse.org/birt/phoenix/examples/scripting/scrip teddatasource/
http://wiki.eclipse.org/BIRT/FAQ/Data_Access#Q:_How_do_I_get _data_from_a_POJO_.28Plain_Old_Java_Object.29.3F
Both of them did not work
I also found one example which prints out system property names and their
values. Thats the only one which works.
BIRT doesnt seem to recognize the POJO class files, even when I keep them
in the following directory:
\birt-rcp-report-designer-2_1_1\plugins\org.eclipse.birt.rep ort.viewer_2.1.1.v20060926-0959\birt\WEB-INF\classes
Can someone help me locate some scripted data source examples, wherein we
can use a POJO or ArrayList of Bean objects and which works in BIRT 2.1.2
or 2.1.1
Thanks and Regards,
-Amit
|
|
|
|
Re: help needed on scripted datasource [message #244769 is a reply to message #244748] |
Tue, 26 June 2007 06:32 |
Eclipse User |
|
|
|
Originally posted by: amit.rajpurkar.pepsico.com.au
Hi Ali,
Thanks a lot for your response.
Since I posted the message, I was digging in the archives to search for
some solution.
The thread posted by Krishna and Jason resolved the issue.
http://www.eclipse.org/newsportal/article.php?id=20181&g roup=eclipse.birt#20181
New version of BIRT has a context parameter for "Script Library"
Refer to the web.xml file in
birt-rcp-report-designer-2_1_1\plugins\org.eclipse.birt.repo rt.viewer_2.1.1.v20060926-0959\birt\WEB-INF
<!-- Absolute directory to store all birt report script libraries (JARs).
Default to ${birt home}/scriptlib -->
<context-param>
<param-name>BIRT_VIEWER_SCRIPTLIB_DIR</param-name>
<param-value></param-value>
</context-param>
Hence as per this, we need to have a directory "scriptlib" at
birt-rcp-report-designer-2_1_1\plugins\org.eclipse.birt.repo rt.viewer_2.1.1.v20060926-0959\birt\scriptlib
This folder should contain the jar package / application files
Also sample reports declared variables within the methods, "open" and
"fetch". Instead we need to instantiate variables in "initialize" method
and use them in open and fetch methods.
Also when I ported my sample report to a web app which runs pre-designed
reports, it ran without issues.
(Even the two books on BIRT needs to be updated with this info -- I
purchased them just yesterday !!)
Thanks and Regards,
-Amit
|
|
|
Powered by
FUDForum. Page generated in 0.03401 seconds