eagleeye Posted January 17, 2013 Share Posted January 17, 2013 A parameter has declared as Collection in jasper report and need to pass this parameter to MS SQL stored procedure.in MS SQL stored procedure that variable is declared as varchar(100).any idea? Link to comment Share on other sites More sharing options...
hittle Posted January 19, 2013 Share Posted January 19, 2013 You may have to write a query executer that extends the basic JdbcQueryExecuter functionality for the SQL query language. I remember in JRS 3.5.x we had implemented that but I am not sure if it is still necessary for the latest version of JRS since there seems to be better support for parameters containing a list of values (ie. the $X{} parameter replacement). Link to comment Share on other sites More sharing options...
Balder Posted June 10, 2016 Share Posted June 10, 2016 This is working for reports, but not if you want to make a topic of the report:Input control: Name: inp_abcClass: java.util.Collection Default Value: new ArrayList()String list variable (parameter)Name: var_abcClass: java.lang.StringDefault Value: $P{var_abc}.join(",",$P{inp_abc} )Then pass the var_abc to the proc.in the proc, you can use the following syntax to get the result:select * from tablewhere ','+@var_abc+',' like '%,'+TableColumn+',%'; 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