sugra Posted January 7, 2009 Share Posted January 7, 2009 Hello,I would like to create an ireport where the query picks up the current user logged into a system and displays information based on it.What I really want is to know how to write the statementwhere users.id = users. [current user id] Have any of you tried this before and if so how is it done? Thanks in advance Link to comment Share on other sites More sharing options...
hingerl Posted January 8, 2009 Share Posted January 8, 2009 hi, for your [current user id] you can use this parameter:Code:<parameter name="LoggedInUser" class="com.jaspersoft.jasperserver.api.metadata.user.domain.User" isForPrompting="false"/>Post Edited by hingerl at 01/08/09 12:25 Link to comment Share on other sites More sharing options...
sugra Posted January 8, 2009 Author Share Posted January 8, 2009 Thank you but where do I place this code... in the .jrxml file? I tried it and got a few errors. Link to comment Share on other sites More sharing options...
mdahlman Posted January 9, 2009 Share Posted January 9, 2009 sugra, hingerl's reference is correct. You should use LoggedInUser. But to put this in context, it is referring to JasperServer. Are you already using JasperServer? It includes a sample report that uses this parameter, so you can start with this example:/reports/samples/SalesByMonth If you have more questions on this topic, you'll get better information on the JasperServer forum. Regards,Matt Link to comment Share on other sites More sharing options...
sugra Posted February 11, 2009 Author Share Posted February 11, 2009 Hi,I'm not using Jasper Server.I am using a plugin into SugarCRM. I create the .jrxml file in iReports and then upload to Sugar and run the reports from there. I want to know how I can write the .jrxml script so that once it is in SugarCRM it can pick up the current user. Any ideas?? 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