user1016403
user1016403

Reputation: 12621

How to integrate jasper and gwt?

I am using gwt. How integrate jasper with gwt to generate excel report? What are the steps to integrate? Mine is a web application which has gwt, spring, hibernate and maven. Thanks.

Upvotes: 1

Views: 2274

Answers (3)

Jason Washo
Jason Washo

Reputation: 615

I use a GWT RPC to an AppEngine hosted servlet that restfully calls a JasperReports server that is also hosted on the same Google Cloud Project as the Appengine. JasperReports REST v2 makes is really easy to call a report in many formats (including Excel)

http://community.jaspersoft.com/documentation/jasperreports-server-web-services-guide/v56/rest-web-services-overview

Upvotes: 0

DonX
DonX

Reputation: 16369

Below are the steps I have used in my application.

1) Download the ireport software from here

2) Generate/design a .jrxml file based on your application requirement

3) copy that designed .jrxml file to your source resources directory

4) Add the jasper reports maven plugin to your pom.xml. Using this plugin you can compile .jrxml file to .jasper file.

5) Add the jasper report jar dependency to your application and generate the report to some directory. By reading jasper report documents you can achieve this step.

6)Provide a link to download that file in UI.

Depends on your application requirements above steps may change.

Upvotes: 3

Jama A.
Jama A.

Reputation: 16089

For integrating with gwt you just need:

Window.open("yourUrlToServlet","_blank","");

Your excel report generating logic should be in your servlet(server-side), tell the browser where to download/open the file once its generated.

Upvotes: 0

Related Questions