Rabinarayan Posted December 19, 2007 Share Posted December 19, 2007 Hi, I am able to use LoggedInUser in iReport.It can show the loggedInUserName in a textbox, but I want to use this in a dataset of ireport. When I call it in DataSet it ask me for setting/assigning a default value to this. How can I assign a default value to this object. Can anybody help me out this. Rabinarayan Link to comment Share on other sites More sharing options...
lucianc Posted December 19, 2007 Share Posted December 19, 2007 If you want to use LoggedInUser in a subdataset, you'll have to explicitly declare it and propagate the value:Code:<subDataset name="myDataset"> <!-- subdataset param --> <parameter name="LoggedInUser" class="com.jaspersoft.jasperserver.api.metadata.user.domain.User"/> ...</subDataset>...<!-- main report param --><parameter name="LoggedInUser" class="com.jaspersoft.jasperserver.api.metadata.user.domain.User"/>...<datasetRun subDataset="myDataset"> <datasetParameter name="LoggedInUser"> <datasetParameterExpression>$P{LoggedInUser}</datasetParameterExpression> </datasetParameter></datasetRun> HTH,Lucian Link to comment Share on other sites More sharing options...
huwtrimet.org Posted September 12, 2008 Share Posted September 12, 2008 Is there a method to get the loggedinuser 's password, and provide it to the dataset? Is dataset same as datasource? Where should I look for this code? thanks in advance. Link to comment Share on other sites More sharing options...
lucianc Posted September 17, 2008 Share Posted September 17, 2008 The user password cannot be read from the LoggedInUser report parameter.A dataset is not the same thing as a datasource.I don't understand what source code you're looking for. JasperReports and JasperServer source code is available on JasperForge.org.Regards,Lucian 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