markwilliamson101 Posted March 2, 2017 Share Posted March 2, 2017 Hi,So I got a Report working utilising parameters. Said parameters are used in the reports sql query e.gSELECT * FROM table WHERE paramter_column = $P{url_parameter1}Now, does anyone know if it is possible to also utilise a paramter in subsitute of a hard coded sql query column in the form of paramter_column. E.gSELECT * FROM table WHERE $P{url_parameter1} = $P{url_parameter2}Would make the report I am trying to make a alot more dynamic and adapatable, one template to suit multiple report types instead of having several report tamplates hard coded. So far when i try the above, the report throws an error. Any help appreciated. best,Mark Link to comment Share on other sites More sharing options...
Solution hozawa Posted March 3, 2017 Solution Share Posted March 3, 2017 Probably have to use $P!{query} format. Check the following page for details.http://community.jaspersoft.com/documentation/tibco-jaspersoft-studio-user-guide/v630/using-parameters-queries Link to comment Share on other sites More sharing options...
markwilliamson101 Posted March 3, 2017 Author Share Posted March 3, 2017 So the accpeted answer does work, just beware trying to use it for multiple columns of diffeent data types. You many have to do parsing etc. Have to investiagte more. 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