Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
RE: [birt-report-engine-dev] Pass Java object to BIRT Viewer

Title: [birt-report-engine-dev] Pass Java object to BIRT Viewer
Please post usage question to BIRT news group on Eclipse.  This mailing list is for birt engine component development communication only.
 
For you question, you can set user session share data in AppContext before creating the engine task, and then get the share data later in beforeOpen().   Please post the question in the news group if you have follow up questions..
 
Wenfeng


From: birt-report-engine-dev-bounces@xxxxxxxxxxx on behalf of rupeshkp
Sent: Wed 7/11/2007 6:06 AM
To: birt-report-engine-dev@xxxxxxxxxxx
Subject: [birt-report-engine-dev] Pass Java object to BIRT Viewer


I am working on integrating birt reporting framework with webwork based web
application. I am trying to solve following integration scenario and got it
working as mentioned below:

Use case scenario
-------------------
1. There is a search screen that has many search parameters as input text
fields
2. The submitted request (HTTP POST) is handled by an action class and
finally the result is made available in the form of a collection (as an
attribute of action class)
3. Now I want this collection result to feed to birt reporting framework

Solution
--------
1. Action class puts the collection object into session (say with attribute
"javaBean")
2. Now it forwards the request to Birt viewer (i.e. viewerServlet) by
appending report name (.rptdesign file). The reason we put collection data
in session and not in request is because: BIRt viewer will send AJAX based
request  to fetch report data and with request we loose this data.

3. Within the report design file, I have added following event handler code
associated with dataset
beforeOpen: dataCollection =
reportContext.getHttpservletRequest().getSession().getAttribute("javaBean");
fetch: here I can traverse the dataCollection

This solution works but doesn't work out well since we are using session to
share data. Additionally this data cannot be removed from session (at
afterClose event) because one may want to perform column sorting.

Is there a better way to solve this problem ? Any pointers/code sample will
be of great help.
--
View this message in context: http://www.nabble.com/Pass-Java-object-to-BIRT-Viewer-tf4061801.html#a11539951
Sent from the Eclipse BIRT - Report Engine - Dev mailing list archive at Nabble.com.

_______________________________________________
birt-report-engine-dev mailing list
birt-report-engine-dev@xxxxxxxxxxx
https://dev.eclipse.org/mailman/listinfo/birt-report-engine-dev


Back to the top