Jump to content
Changes to the Jaspersoft community edition download ×

Drill down report under Jasper?


emilly

Recommended Posts

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?

Link to comment
Share on other sites

  • Replies 6
  • Created
  • Last Reply

Top Posters In This Topic

Top Posters In This Topic

Hi Emilly,

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!!!

Thanks,

Rajesh Sirsikar

Link to comment
Share on other sites

Rajesh looks like second way is the ideal way for drill down reports. Few questions on this :-

1) Is Jasperserver a webserver like tomcat or something else ?

2)Do i need community or commercial edition of server for this ?

3)How sub report will fetch the address data based on userId passed from main report. One way is writing query on sub report

template. But is there a way that my java application pass on the data to subreport based on userId(like i did it for main report)?

Link to comment
Share on other sites

1) Yes. Jasperserver is a webserver. It is teh central repository of jaspersoft. here you can Cretae Datasources, Dashboards, Schedule Reports, Create Control Inputs and lots more.

 

2) You can achieve your requirement using Community edition itself.

 

3) In Jasperserver, drill down means connecting your one report to another report or webpage or document which will open in a seperate page. So you can create a connection directly to your web page and provide the parameter as Userid.

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×
×
  • Create New...