I am beginner in jasper reports. I have creates simple reports to start with where i am using spring with jasper report. Here i did pass
the datasource(as JRBeanCollectionDataSource) under parameter map to jasper template where i am displaying user records. Work great.
Now on click off addess under main report, i want to display deatiled address report(kind of drill down report) . What i want is
pass the userdId from main report to my web application(hosted on tomcat) which fetches the address data and pass it on to
drill down address report template(something i did it for main report).
But i did not get any example related to it.Any help here ?
Some links suggest :-
1) I need to download JasperReport server. Is it mandatory ?
2) Some half baked examples make use of query from report template. What if i need to pass the data from java based on id passed
from main report?
There are two ways to achieve what you are intending to do.
1) using Sub Reports : Here you can create two reports.
a) A main report where you will fetch User Records.
b) A Sub Report where you will fetch Address Data with a parameter "User Id"
c) Connect Main Report with Sub Report with this parameter and you will have your desired output. For more info on how to create sub report please refer http://www.rajeshsirsikar.com/329/
2) Using JasperServer.
a) Create Two Reports as explained in the Previous example.
b) Publish both Reports in Jasperserver.
c) Cretae a Hyperlink to Userid Field in the main report with Parameter as Userid and link it to Sub Report.
Hopefully this helps!!!