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)
how to pass a result set to birt?
stf
Hi,all
how can i pass a result set to birt, and display it in a table?
Find more posts tagged with
Comments
mwilliams
Hi stf,
What format is the result set in? Is it in a flat file of some sort? Please explain a little more in detail. Thanks.
stf
<blockquote class='ipsBlockquote' data-author="mwilliams"><p>Hi stf,<br />
<br />
What format is the result set in? Is it in a flat file of some sort? Please explain a little more in detail. Thanks.</p></blockquote>
<br />
It's a java object generated in a service. For example:<br />
public class UserServiceImpl implements IUserService{<br />
private List<User> userList;<br />
public void searchUserList(some params from the request)<br />
{<br />
.....<br />
userList=query.getResultList();//get the result through JPA<br />
}<br />
public List<User> getUserList(){<br />
return userList;<br />
}<br />
}<br />
The service is defined in application.xml. <br />
I want to get the userList from the defined service,Not by using new Packages...UserServiceImpl. getUserList(),for the userList has data only after i transfer params to searchUserList() and call this function.
CBR
Do you use the BIRT WebViewer or do have you integrated the Report Engine API directly in your application.<br />
If you use Report Engine API you can set the ApplicationContext before executing a report. The ApplicationContext is a HashMap<String, Object><br />
where you can put any object identified by a key.<br />
In your report you can then get the HashMap with<br />
reportContext.getAppContext(); (see: <a class='bbc_url' href='
http://www.birt-exchange.org/documentation/BIRT_231/EngineJavadoc/enginescript/api/index.html'>Birt
Script API 2.3.0</a>)<br />
<br />
Do you run your services inside of Spring or EJB3?
stf
<blockquote class='ipsBlockquote' data-author="CBR"><p>Do you use the BIRT WebViewer or do have you integrated the Report Engine API directly in your application.<br />
If you use Report Engine API you can set the ApplicationContext before executing a report. The ApplicationContext is a HashMap<String, Object><br />
where you can put any object identified by a key.<br />
In your report you can then get the HashMap with<br />
reportContext.getAppContext(); (see: <a class='bbc_url' href='
http://www.birt-exchange.org/documentation/BIRT_231/EngineJavadoc/enginescript/api/index.html'>Birt
Script API 2.3.0</a>)<br />
<br />
Do you run your services inside of Spring or EJB3?</p></blockquote>
<br />
<br />
I use BIRT WebViewer,did't use Report Engine API directly.<br />
The services run inside of Spring.<br />
What i do is:<br />
1)design a report ****.rptdesign,use scripted data source,scripted data set<br />
2)in the jsp,click Submit, go to a servlet<br />
3)the servlet search satisfied records from db,and generate a List<br />
//I want to know how to pass the List to ****.rptdesign and the bind the List to the scripted data set.<br />
Is it possible to use ApplicationContext in the controller?