phillip.sdao Posted May 9, 2014 Share Posted May 9, 2014 This seems like it should be real easy, but its causing me problems.I have a stored procedure it takes a string that is a comma delimited join of a collection. I want to take a collection that is a multi-select, and turn it into a string as my stored procedure parameter. Tried $P{...}.join(","). Tried making a variable thats String.join($P{...},",") and feeding in the variable. I would use $X{} but it seems like thats only for parameters. Is there some documentation somewhere on the $X{} functions(not sure what to call them) Link to comment Share on other sites More sharing options...
Solution ghudson_1 Posted May 9, 2014 Solution Share Posted May 9, 2014 $X syntax for params is described here:http://community.jaspersoft.com/documentation/jasperreports-server-administration-guide-beta/query-based-input-controlsBut that's more appropriate for creating an IN clause in a SQL query. You need to cast your collection into string that retains the delimited values? parameters can be based upon values of other parameters. Sounds like you need to investigate a java method like this org.springframework.util.StringUtils.collectionToDelimitedString($P{mycollection},",") <-- that could be the expression of the parameter which you pass to the storedproc Link to comment Share on other sites More sharing options...
psdao1102 Posted May 12, 2014 Share Posted May 12, 2014 Thank you very much. Thats the answer I needed. The difference between Jaspersoft, and its community/staff is lightyears of difference between that and Pentaho. You guys rock! 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