Jump to content
Changes to the Jaspersoft community edition download ×

Drill-Down Reporting in JRViewer

2005 IR Help

Recommended Posts

By: alanHardwick - alan314

Drill-Down Reporting in JRViewer

2004-09-27 01:09

Does anyone know how to implement Drill-Down reporting within the JRViewer (or if its possible).


e.g. If I have a report with Countries say

Country 1

Country 2

Country 3


if the user clicks on Country 1 I want to display all the cities within this country. Is this possible within the same instance of the JRViewer or do I have to create another JRViewer instance (i.e. window).


The hyperlink examples in the JR zip file only have examples for links to different sections of the same report and the Ultimate Guide doesnt really explain how to do drill-down either, am stuck.


Any help appreciated.





By: xpert - jcox00

RE: Drill-Down Reporting in JRViewer

2004-11-22 11:11

I'm trying to do the same thing. What I did was go into the source and make the JRViewer within JasperViewer protected instead of private. I know. I know. I'm not supposed to do that. Shoot me, ok. I extended JRViewer and set the JRViewer within JasperViewer to my new extension. The problem I'm having now is that even with my new extension of JRViewer, I can't get gotoHyperLink() working. I've changed the MouseListener for links within the viewer, but for some reason the code in the listener is never being called. What's the deal?





By: alanHardwick - alan314

RE: Drill-Down Reporting in JRViewer

2004-11-23 03:48

You need to implement the JRHyperlinkListener interface to get your implementation of the gotoHyperLink() working...





By: dobrick - dobrick

RE: Drill-Down Reporting in JRViewer

2005-03-23 06:43

hello alan,

did you get any information on how to drill down?

i want to drilldown to a different report and want to pass the content of the field where the user points to in the url.

is that possible?

thank you for any help or dokumentation.

best regards






By: alanHardwick - alan314

RE: Drill-Down Reporting in JRViewer

2005-03-28 00:06

Sorry ralf, I never got round to implementing this so no further information, I expect to do so in the next 4-5 months but this will be too late for you.

Likewise if you figure out how, then any assistance will be appreciated.






By: kdrumm - kdrumm

RE: Drill-Down Reporting in JRViewer

2006-02-16 11:33

I implemented this by creating another instance of JRViewer for each "drilldown" operation. My main listens for the hyperlink event, retrieves the necessary information, in this case the CountyID, and uses this to generate the next report. I actually do this with one jrxml and one datasource by making each id a subset of its parent. For example, County 1 would have id 10. All city ids within this county would be 1001, 1002, 1003... All areas within the first city would be 100101, 100102, etc. That way, when a county id is passed in, the query can filter it's results to all ids that start with 10 (for County 1). So really, I don't have county ids, city ids, and area ids. I just have item ids, and based on there length, I can tell what they are. length=2 - county, length=4 - city, and so forth. This allows for a generic hierarchy scheme with unlimited "levels".





By: Denny Valliant - xenden

RE: Drill-Down Reporting in JRViewer

2006-02-16 11:49

Wouldn't this scheme only have 99 "levels" per level?



Link to comment
Share on other sites

  • Replies 0
  • Created
  • Last Reply

Top Posters In This Topic

Popular Days

Top Posters In This Topic

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