JasperReports and GWT integration suggestions

270 views
Skip to first unread message

Dave

unread,
Aug 31, 2007, 12:15:12 AM8/31/07
to Google Web Toolkit
We have been integrating JasperReports with GWT via Window.open().
Some reports take longer than we would like and we have seen proxy
servers give up on the export servlet that is streaming PDF, Excel or
RTF.

The param screen that launches the report is a pure GWT screen. What
I'd like to do is transition our reports so that the server generates
them on the server side (yes I know we have to find a way to scale it)
and then streams the rendered report to the user. This is a data entry
app and reports can be 100s of pages. The user community for this app
is small enough that we can probably handle the temp storage.

On the GWT side I'd like to show a progress bar or "user expectiation
management" type of GUI until the report is ready. I guess the key is
how to make the server-side report generation asynchronous. The
reports are currently generated inside of an EJB session bean.

Maybe some suggestions on clever uses of Incremental Command and Timer

Has anyone else built something like this?

Dave

Jason Essington

unread,
Sep 4, 2007, 11:08:36 AM9/4/07
to Google-We...@googlegroups.com
Depending upon how long these reports take to build, there are
several approaches you could use ...

I simply use a form post to send the parameters, and target the new
window.

but if your problem is the time it takes to generate the report, you
could send the parameters via RPC, then use a timer to send
additional rpcs at particular intervals, updating some UI each time
to let the user know that the report is still being generated. when
the report is finally done, this rpc could return a hash that could
be used with the window.open method to fetch the newly generated
report. this way, it could even take hours (wouldn't that be
horrible) to generate a report and the browser would open it when it
becomes available.

-jason

Dave

unread,
Sep 4, 2007, 7:48:12 PM9/4/07
to Google Web Toolkit
This is pretty much what I have implemented using the regular RPC
semantics. The timer is a possibility since it might be 10 mins (yes I
know) before some of the very nastiest reports come back. Right now we
are putting this workaround in to avoid proxy server timeouts (and
reposts of the URL to our server) while we get the DBA and report
writers to tune their stuff.


Reply all
Reply to author
Forward
0 new messages