rajasekhar_1 Posted July 24, 2017 Share Posted July 24, 2017 Dear jasper Master I am new to jasper , We have one jasper server and no of users and no of data sources respectively to the users .now all the reports and charts in the server need to run /display for all users with their data . if one user connected to server with his/her user id the data source should be him/her self , is it possible to use only one set of reports / charts useful for all users(dynamically change the data source based on user ) what I have to do in JRXML file .or any other option ?alredy these reports are imported from another server is there any option available in server settings in jasper server ?kindly suggest on aboveThanksRajasekhar Link to comment Share on other sites More sharing options...
Solution darth_fader Posted July 24, 2017 Solution Share Posted July 24, 2017 You can add an attribute to each user in your jasperserver installation that sets a value in the JDBC connection dynamically based on user. For example, you can set properties in the jdbc connection based on those attributes. In this way you can change the datasource based on the user. Again, this is all done at the jasperserver level.There is a reference that also accomplishes something similar via spring, but I don't think it's necessary.http://community.jaspersoft.com/wiki/switching-datasource-based-user Link to comment Share on other sites More sharing options...
Friendly User Posted July 24, 2017 Share Posted July 24, 2017 JasperServer starting from version 6 has an option to use profile attributes in the data source definitions. Take a look at the chapter 4.1 "Profile attributes in data source definitions" in the JasperServer Admin Guide for more information on the feature.Another thing you can do to restrict the data based on the user logged in is to use domain data security. For that feature take a look at Chapter 5 in JasperServer Security Guide. 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