reenaacharya35 Posted March 28, 2016 Share Posted March 28, 2016 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? Link to comment Share on other sites More sharing options...
follower Posted March 28, 2016 Share Posted March 28, 2016 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. Link to comment Share on other sites More sharing options...
hozawa Posted March 28, 2016 Share Posted March 28, 2016 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-user-guide/v62/using-parameters-queries Link to comment Share on other sites More sharing options...
reenaacharya35 Posted March 28, 2016 Author Share Posted March 28, 2016 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. Link to comment Share on other sites More sharing options...
javier.ggi90 Posted March 28, 2016 Share Posted March 28, 2016 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}) 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