jasemilly Posted December 12, 2011 Share Posted December 12, 2011 Hi I have several rep's using the same report and I filter the results using loggedInUser.Each rep can filter the report by a user control that currently displays every single customer, regardless of which rep is responsible. Is it possible to filter on the username within the Jasper front end. or have a text box were the type their ID and then filter the dropdown box as a type of cascade??thanks in advance jasemilly. Link to comment Share on other sites More sharing options...
jens_noering Posted December 13, 2011 Share Posted December 13, 2011 You can use the Parameter $P!{LoggedInUsername} in select-input Controls.That will give you the logged in Username that you can use it to filter your sql-query. hth, Link to comment Share on other sites More sharing options...
jasemilly Posted December 13, 2011 Author Share Posted December 13, 2011 so something like where rep_id = $P!{LoggedInUsername} will work?? thanks!!! Link to comment Share on other sites More sharing options...
jens_noering Posted December 16, 2011 Share Posted December 16, 2011 yes if your username is like the rep_id. for me its working fine.if its not working post your query. if this is not possibel you could build a parameter as a textbox where the user can type his id in an filter with this parameter the a second parameter with a single select query.but you have the security problem when every user can type an id in a box. better way is a table with set set of jasperserver username an the id and then use a join and a direct filter with the jaspeserver username on the select box. no one has to type an id and there is no security problem. hthPost Edited by jens_noering at 12/16/2011 16:00Post Edited by jens_noering at 12/16/2011 16:05 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