Unable to use single select input control with Japser report
Posted on March 27, 2016 at 11:32pm
Hi,
I am new to Jasper reports. I am trying to create report which accepts input value from user and displays reports based on the value that is selected.
For this purpose I created single select input control.
Can anyone suggest what will be the best way to achieve this?
Joined: Mar 17 2016 - 1:32am
Last seen: 6 years 11 months ago
Posted on March 28, 2016 at 12:43am
Did you define a query for single select input control?
For example if your main query is SELECT * FROM table WHERE column_name=$P{parameter}, single select query must match the parameter value passed in main query.
Joined: Aug 5 2011 - 12:27am
Last seen: 6 years 11 months ago
Posted on March 28, 2016 at 3:33am
Joined: Apr 24 2010 - 4:31pm
Last seen: 3 years 9 months ago
Posted on March 28, 2016 at 4:08am
Hi,
My report query is : select * from instance where (CUSTNAME = $customer)
The Input control parameter name is customer.
But still I am not able to achieve the desired result.
Joined: Mar 17 2016 - 1:32am
Last seen: 6 years 11 months ago
Posted on March 28, 2016 at 9:46am
The correct use of parameters in query is $P{param_name} so change your query to the following:
select * from instance where (CUSTNAME = $P{customer})
Joined: Dec 6 2015 - 1:46pm
Last seen: 5 years 11 months ago