Hello,
I am using JasperServer 5.6.0 and iReport. I am trying to create a cascading input control where the first input control (organization) is multi-select. That input control seems to work properly. The problem comes in when I try to create the 2nd level input control (unit).
1st Level parameter = organization (mult-select input control)
2nd Level parameter (cascading from organization) = unit (multi-select input control)
This is the basic syntax I'm using for the query to populate the 2nd level (unit) input control.
select distinct UnitId, Name from Unit
where $X{IN,unit.unitorgid,organization}
When I execute the report on the server, I get no input controls. When I look in the jasperserver.log, it is blank. I've tried restarting my services but doesn't seem to trigger any logging. Hopefully someone can tell me what I'm doing wrong.
Thanks
2 Answers:
I've found JasperReports Server input controls is OK for very simiple querying but found it to be very limited in functionalities to be useful in actual systems.
I had a situation where users wanted to enter multiple query fields, show results from the query, and then to select checkboxes on customers whom they wanted to generate a report. They also wanted all customers report to be generated in 1 single pdf file instead of a pdf file for each customer.
What I ended up doing was create a custom jsp page to do this.
Hi there - Try looking at the sample on the JasperReports Server, /reports/samples/Cascading_multi_select_report. This is a good starting point. The cascading input controls are tricky at first. If you are not able to create, let me know.
This did help. It's a bit quirky when the top level of a cascading input control is multiselect. The trick was in the query for the top level control. Previously I used.
Select uo.unitorgid as organization from unitorg uo
However, I descovered that the "as unitorgid" had to be changed to "as unitorg" since 'unitorg' is the id of the corresponding input control/parameter. I also had to put 'unitorg' as the value/display field for the input control. Previously when the organization control was single select, I used the database field name as the value field in the input control and it seemed to work fine.
Where to find /reports/samples/Cascading_multi_select_report? I downloaded the Jasperserver and I don't see that in the reports/samples. Many thanks.
I am having trouble with my 2nd level parameter. I am hoping someone can correct my syntax.
My first parameter is single select and it works:
Any suggestions are greatly appreciated.