Unable to use single select input control with Japser report

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?

reenaacharya35's picture
Joined: Mar 17 2016 - 1:32am
Last seen: 6 years 11 months ago

4 Answers:

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.

follower's picture
Joined: Aug 5 2011 - 12:27am
Last seen: 6 years 11 months ago

Create a parameter and use that in your sql statement. Refer to the following page for information on parameter.
http://community.jaspersoft.com/documentation/tibco-jaspersoft-studio-us...

hozawa's picture
170143
Joined: Apr 24 2010 - 4:31pm
Last seen: 3 years 9 months ago

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.

reenaacharya35's picture
Joined: Mar 17 2016 - 1:32am
Last seen: 6 years 11 months ago

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})

javier.ggi90's picture
Joined: Dec 6 2015 - 1:46pm
Last seen: 5 years 11 months ago
Feedback