tags | projects | ||
---|---|---|---|
|
|
You’ll build a service that will accept HTTP GET requests at:
http://localhost:8080/reports/PieChartReport/?format=pdf&MaxOrderID=10800
and respond with a link:Jasper Report Document in the format you specified (pdf / html / csv / xls / xlsx
)
You can customize the request with optional parameters
in the query string:
http://localhost:8080/reports/PieChartReport/?format=pdf&MaxOrderID=10800&ReportTitle=test¶m2=test¶m3=test
It is important that these parameters are supported in the SQL query string in the underlying .jrxml
Jasper template
Download the latest release from here: Releases
Download the "config" and "demo" directories from github
Folder structure should look like this:
- config --application.properties - demo --data --fonts --images --reports - jasper-reporting-service.jar
Install the FONTS on your system from demo/fonts
Run SQL from data/h2_data.sql
against your Demo-Database (in-memory H2 database is pre-configured!)
If you wish to use the pre-configured H2 database activate the "h2 console" in config/application.properties
and run the SQL script in the GUI: localhost:8080/h2
Run with command:
java -jar jasper-reporting-service.jar:
test with:
http://localhost:8080/reports/PieChartReport/?format=pdf&MaxOrderID=10800
You should get a nice looking PDF-Report looking like this: