Ankur Gupta Posted March 11, 2014 Share Posted March 11, 2014 Hi,Please tell me if there is any method through which I can get the user name of the user who logged into the Jasper Server, and that name could be displayed in the report.Is there any parameter which can be referred or any other work around to obtain the logged in user name.Thanks in Advance!! Link to comment Share on other sites More sharing options...
ogavavka Posted March 11, 2014 Share Posted March 11, 2014 Look at Diagnostic Feature.specialy look at Diagnostic Report which using Diagnostic DataSource Link to comment Share on other sites More sharing options...
Solution fcerbell Posted March 11, 2014 Solution Share Posted March 11, 2014 Hi,You can create parameters in you report, with a specific name and datatype. Then these parameters will be automatically filled when the report is executed by JasperReports Server. There are about 10 such parameters. As an example, try to define a parameter in your report :LoggedInUsername (java.lang.String), with no defaut value. Then, you can use $P{LoggedInUsername} in a text field, in a query, in a printWhenExpression, ... RegardsFrançois Link to comment Share on other sites More sharing options...
Ankur Gupta Posted March 12, 2014 Author Share Posted March 12, 2014 Hi Francios,Thankyou so much solution of yours worked as a charm.Out of curosity, can you tell me all the 10 parameters which could be defined in such a way . This would increase the worth of the question . Thanks for your answer!! Link to comment Share on other sites More sharing options...
Ankur Gupta Posted March 12, 2014 Author Share Posted March 12, 2014 Hi Francios, Thankyou so much solution of yours worked as a charm. Out of curosity, can you tell me all the 10 parameters which could be defined in such a way . This would increase the worth of the question . Thanks for your answer!! Link to comment Share on other sites More sharing options...
fcerbell Posted March 12, 2014 Share Posted March 12, 2014 They are listed in one of the JasperReports Server guides (either ultimate guide, or admin or user guide), I don't remember exactly in which one. Link to comment Share on other sites More sharing options...
fcerbell Posted March 15, 2014 Share Posted March 15, 2014 You can find the list in the JasperReports-Server-Admin-Guide v5.5, chapter 4.4.2 Built-in Parameters for Query-based Input Controls, p 90, also available online : http://community.jaspersoft.com/documentation/jasperreports-server-administration-guide/v550/query-based-input-controls 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