ernestcl Posted March 14, 2007 Share Posted March 14, 2007 hi, Does anyone know how to pass login name as parameter to jasper report Thanks, Link to comment Share on other sites More sharing options...
candre Posted March 14, 2007 Share Posted March 14, 2007 What login name are you talking about? Link to comment Share on other sites More sharing options...
ernestcl Posted March 14, 2007 Author Share Posted March 14, 2007 jasperserver login Link to comment Share on other sites More sharing options...
csbac Posted March 18, 2007 Share Posted March 18, 2007 Hi!One of the JS samples does this ... SalesByMonth.Accesses $P{LoggedInUser}.getFullName().LoggedInUser is defined as a com.jaspersoft.jasperserver.api.metadata.user.domain.User, "Use in prompt". There is no corresponding input control; thus, I presume JS just knows from the class type what to assign to it? Yours,Sebastian Link to comment Share on other sites More sharing options...
lucianc Posted March 19, 2007 Share Posted March 19, 2007 JS always assigns a com.jaspersoft.jasperserver.api.metadata.user.domain.User instane to the "LoggedInUser" parameter, so one would need to declare this type for the parameter and then used getters to extract the user details. Regards,Lucian Link to comment Share on other sites More sharing options...
koskisa Posted September 3, 2007 Share Posted September 3, 2007 Hi, Can someone show me a way to pass this parameter to the report query? I mean that my query should include JasperServer login name automatically without user promt. Thank you! PS. BTW is this feature supported in the JS GPL version? ========= Ok, now I've got it to work.Post edited by: koskisa, at: 2007/09/04 11:42 Link to comment Share on other sites More sharing options...
sergioOrtiz Posted September 6, 2007 Share Posted September 6, 2007 Hi, I have implemented a modification that allows to pass j_username/j_password parameter as part of the URL (in my case I use only a j_username) You may need to hook Acegi security by writing your own AuthenticationProcessingFilterEntryPoint.It is desirable that you become familiarised with this framework before - see http://www.acegisecurity.org/suggested.html A valid approach would be to check in the commence function whether these parameters are present in the URL and, if positive, redirecting to the j_acegi_security_check. Hope this helps... Link to comment Share on other sites More sharing options...
crazyyokel Posted September 11, 2007 Share Posted September 11, 2007 koskisa wrote:Hi,Can someone show me a way to pass this parameter to the report query? I mean that my query should include JasperServer login name automatically without user promt. Thank you!PS. BTW is this feature supported in the JS GPL version?=========Ok, now I've got it to work.<br><br>Post edited by: koskisa, at: 2007/09/04 11:42 I am facing the same problem and was not be able to solve it. Would you mind sharing some of your experience on how to solve it? Thanks. Link to comment Share on other sites More sharing options...
sergioOrtiz Posted September 18, 2007 Share Posted September 18, 2007 Hi, You'll need to deploy you own AuthenticationProcessingFilterEntryPoint and arrange the acegi security configuration to support this.I don't have much time but I'll try to point the basic steps involved. I'll attach some code so that you can explore it on your own. The basic steps are:- Develop you own entry point (I've attached an example)- Create a jar file which should be included in JasperServer's WEBINFlib directory.- Modify the applicationContext-security.xml file to: + Redirect the authenticationProcessingFilterEntryPoint class to your implementation <bean id="authenticationProcessingFilterEntryPoint" class="Your class here"> + Ensure you have an inMemoryDaoImpl as Dao authentication provider. This will allow you to define users in a list. I would say these are the steps required...Unfortunately, I did this modification some time ago and I don't have enough time to revise it thoroughly.I hope this provide you the basic guidelines to solve your problem. Best regards, [file name=code.zip size=8924]http://www.jasperforge.org/components/com_joomlaboard/uploaded/files/code.zip[/file] Link to comment Share on other sites More sharing options...
Rabinarayan Posted December 18, 2007 Share Posted December 18, 2007 hi, can u help me how to use logged username in sql where cluase for an input control. I want to create an input control type 'Single Select Query' and SQL Query based on Logged username. Plzzzzzzzzz help me out. Rabinarayan Link to comment Share on other sites More sharing options...
Teodor Danciu Posted December 18, 2007 Share Posted December 18, 2007 Hi, This is not yet supported.There is a built-in parameter to get a hold of the user name, but queries for input controls cannot have parameters. Please post this as a feature request here:http://jasperforge.org/sf/tracker/do/listArtifacts/projects.jasperserver/tracker.feature_requestsand we'll try include it in upcoming releases. Thank you,Teodor Link to comment Share on other sites More sharing options...
Rabinarayan Posted December 18, 2007 Share Posted December 18, 2007 Hi, Thanx for your suggetion. Can you name me the built-in parameter in iReport to access the loggedInUser Name. Or, Can you suggest me how to access LoggedInUser name in Jasper Report i.e in iReport. Plzzzz help me out. I'll thankful to u. Rabinarayan 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