katherine.vierra Posted November 14, 2014 Share Posted November 14, 2014 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 Unitwhere $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 Link to comment Share on other sites More sharing options...
hozawa Posted November 16, 2014 Share Posted November 16, 2014 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. Link to comment Share on other sites More sharing options...
H Mendoza Posted November 17, 2014 Share Posted November 17, 2014 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. Link to comment Share on other sites More sharing options...
katherine.vierra Posted November 17, 2014 Author Share Posted November 17, 2014 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. Link to comment Share on other sites More sharing options...
ktalarico Posted November 18, 2014 Share Posted November 18, 2014 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. Link to comment Share on other sites More sharing options...
ktalarico Posted November 18, 2014 Share Posted November 18, 2014 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:<parameter name="QUESTIONNAIRE NAME" class="java.lang.String"><property name="parameter_type" value="select"/><property name="query" value="select distinct sd.display_name as displayName from srv_survey_definition sd where sd.active = true order by sd.display_name"/><parameterDescription><![CDATA[]]></parameterDescription><defaultValueExpression><![CDATA[]]></defaultValueExpression></parameter>My second parameter is multi-select and it should reference first parameter. It is not retrieving any results: <parameter name="DISPLAY NAME" class="java.util.List" isForPrompting="false"><property name="parameter_type" value="multiselect"/><property name="query" value="select distinct display_name from srv_survey_definition where split_part(survey_name,'_OUTDATED',1) IN (select survey_name from srv_survey_definition sd where and sd.display_name = $P{QUESTIONNAIRE NAME})"/><defaultValueExpression><![CDATA[java.util.Arrays.asList(new String(" "))]]></defaultValueExpression></parameter>Any suggestions are greatly appreciated. Link to comment Share on other sites More sharing options...
H Mendoza Posted November 18, 2014 Share Posted November 18, 2014 Use the search feature to find it. The file is there. Link to comment Share on other sites More sharing options...
jrodrigues_1 Posted May 4, 2017 Share Posted May 4, 2017 Hi. I can't find this sample either. It been almost two years since the last activity on this thread, so maybe it is not included in Jasper Server anymore. However, I'm struggling with the same OP's problem. Does anyone have this sample? Thanks! Link to comment Share on other sites More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now