Selecting parameter from another parameter that is selected by a query

0

For Jasperserver I need to be able to have two parameters for the report to be based on querys, and I need the results of the second parameter "lookup" to be based on the results of the first parameter value.  I know it sounds confusing, so here is an example.

I have multiple facilities (buildings), and in each facility there are multiple locations (departments).  I want to first select facility A from the first parameter, then have the second parameter only have locations from facility A (filtered)

Facilities Locations
A Doctor Jones
Doctor Smith
B Doctor Walker
Doctor Brown

So when I select "A" for my facility in the first parameter, I want to only see "Doctor Jones" and "Doctor Smith" in the second parameter, not all 4 doctors.

I know how to do the query based parameter from this excellent, post:

https://community.jaspersoft.com/questions/542182/selecting-parameter-va...

but I need to take it just one step further.

 

Anyone know how to do this?

 

Thanks,

Mike

 

mmceldow's picture
Joined: Jun 6 2008 - 2:15am
Last seen: 6 days 14 hours ago

I believe jasper refers to this as cascading parameters. Are you running your reports from Jasper Server or have you integrated your reports to be executed from a web-based application? I have found that cascading parameters work great when executing reports directly from Jasper Server but not when the reports are executed from within an application. Also, I use the community edition of Jasper Server, so that may make a difference.  The second parameter query will need to have the first parameter included in the query after it is selected to narrow down the list for the 2nd parameter.  

hal_1 - 1 week 17 hours ago

I am running the reports from Jasper Server, and I too use the community edition.  Thanks for your reply.  I hadn't tried including the first parameter in the second query yet, I didn't now if it would be that simple.  Sometimes even the simple things seem to be hard to accomplish easily with this software :)

Mike

mmceldow - 6 days 15 hours ago

0 Answers:

No answers yet
Feedback