aperez_6 Posted December 24, 2018 Share Posted December 24, 2018 Hi,I have a problem with a parameter String ( I usually pass values such as: "1234,8756,4212" ), and I use this parameter in the main dataset query:select * from table where field1 in ( $P!{p_param} )The before statement works when I pass the p_param with values. But when the p_param hasn't values doesn't work the jasper report.How could I put the solution? Thanks in advanced. Link to comment Share on other sites More sharing options...
hozawa Posted December 24, 2018 Share Posted December 24, 2018 Check "IN and NOTIN Clauses" section in Jaspersoft Studio documentation. Have you tried using $X{IN, field1, p_param}https://community.jaspersoft.com/documentation/tibco-jaspersoft-studio-user-guide/v71/using-parameters-queries-0 Link to comment Share on other sites More sharing options...
aperez_6 Posted December 27, 2018 Author Share Posted December 27, 2018 Thanks Hozawa, I had tried this specificacion but this didn't work too. I think that the problem is with the type definition of the parameter and I don't find manner to use correctly.Because the parameter is a String and it contains X values that I have to use in the query such as collection of numeric values. If I use the $X{IN, field1, p_param} the error in the dataset is: Caused by: java.sql.SQLException: Token SQL92 not supported in position: 556Also I've tried: $X{IN, TO_CHAR(field1), p_param} But it was a big error hehe.If someone has encountered the problem, I would appreciate getting the solution!Thanks, 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