Jump to content
Changes to the Jaspersoft community edition download ×

How to Map dropdown (select single query) input control to Jasper report parameter in Jaspersoft Server


parthibanmca87

Recommended Posts

I created an input control (single select query), I loaded data to the input control using a select query like the below.

select id,country from countries

My input control has country values displayed for example.

USA,CANADA,EUROPE,.....

once the user choose a particular country then I have to pass the "id" of that selected country to parameter used in the report.

I tried with different ways like the name of the report parameter exactly mapped with name of input control but nothing works.

Kindly provide me the steps to accomplish this since I am struggling for the past two days.

 

 

Link to comment
Share on other sites

  • Replies 3
  • Created
  • Last Reply

Top Posters In This Topic

Top Posters In This Topic

Hi,

Create a parameter with the exact same id with the input control by right clicking 'parameters' and 'create parameter' in outline window.  In input control, value column has to be set 'id' and visible column has to be set 'country'.

After that, you should add the parameter to your query in dataset. For example,

select * from Sales where countryid = $P{parameterName} 

Link to comment
Share on other sites

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