Problem with cascading input control


I have two input controls MySecteur and MyRayon, and I want to synchronize them. The control type is mutli select query , the query  like this :

SELECT DISTINCT  "Secteurs", "Rayons","No_nomenclature" FROM "Nomenclatures_articles"  WHERE $X{IN, "Secteurs", MySecteur} ORDER BY "No_nomenclature"

Where MySecteur is the name of the first input control.

When I execute the report, and I want to do my choice, the input control not synchronized but a small windows tell me to wait but nothing to do.

Is someboby can hep me to resolve this problem

Best regerds



fabrice.agastin's picture
Joined: Nov 8 2012 - 1:31pm
Last seen: 10 years 1 week ago

3 Answers:


I did same requirement which I explaine here which may help you.

From MySecteur and MyRayon parameters when I select values from MySecteur then values in MyRayon filtered by  MySecteur so In list i can show only those values which are under  MySecteur. Here i Consider  MySecteur at higher level than  MyRayon.

For that when i create multiselect query of  MyRayon then i add filter of MySecteur in query of input control. And use MySecteur and MyRayon parameters in Report query.

You can also use P!{} for using dynamic where condition. That is if user provide values for any parameter then it used in query and if null then where condition not consider in query. 

Hope it may helps you.Let me know if any issue.



ajinkya_c's picture
Joined: Aug 29 2012 - 6:13am
Last seen: 6 years 6 months ago

Maybe this will help you out:

For a cascading input control you need a query in your report that includes a WHERE clause and references to the parameters that you have in your report.  So, for example, you might have the following in your main report (the two parameters are country and state_list): 

     WHERE store_country = $P{country} AND $X{IN, store_state, state_list} 

     ORDER BY store_country, store_state, store_name

You will need a Single-select Query for the country parameter, which requires both a db connection and a query.  Your query might look like this: SELECT DISTINCT store_country FROM store ORDER BY store_country.  You will need a Multi-select Query for the state (state_list) since countries can have more than one state or district.  Again, you will need a db connection configured and a query.  The query for the state parameter might look like this: SELECT DISTINCT store_state FROM store WHERE store_country = $P{country} ORDER BY store_state.  When you run the report you will be prompted to select a country (single select) and the states associated with that country will load underneath.  Pick the state or states that you wish to include in your report, and then click the Ok button. 

H Mendoza's picture
Joined: Feb 20 2013 - 11:39am
Last seen: 4 years 3 months ago

How does this work if you are embedding reports in your web application using Res API? The 2nd parameter input doesn't recognize different selections for the first input.

hal_1's picture
Joined: Mar 21 2013 - 11:46am
Last seen: 2 years 9 months ago