mandm Posted July 19, 2011 Share Posted July 19, 2011 i have a tricky question, which i will be glad if addressed by the forum, my worry is that i have a input parameter which i need to have the values changed dynamically, e.g unit_name which can change based on each table so i have a mapping table which i use via the $P{LoggedInUser}.getUsername() parameter in the report, to run a report for a specific user....But can i use this $P{LoggedInUser}.getUsername() in the single select query option on the server?my query is select distinct key from table1 where lst_id in (select lst_id from table2 where Name = 'units' and file_id in (select fileid from usermap where userid = $P{LoggedInUser}.getUsername()))union select '%' as key_valueorder by key_value asc in this query i need to derive the distinct keys based on each logged in users table... Can this be done in jasper? Link to comment Share on other sites More sharing options...
andre187 Posted July 19, 2011 Share Posted July 19, 2011 With Jasperserver Pro you can use all $P, $P! and $X Parameters.What are you using? Did you try out, ob your solution works? Link to comment Share on other sites More sharing options...
mandm Posted July 19, 2011 Author Share Posted July 19, 2011 yes i used this file to install the jasper server jasperreports-server-cp-4.0.0-linux-installer.binSo i am guessing i have the Community edition, but i have user $P, $P! etc...successfully in my reports, its just that i do not know how to use it on the query based input parameters 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