kusu Posted February 19, 2011 Share Posted February 19, 2011 I have JasperServer CE 4.0 with a couple of reports.I have a series of users who should be able to log in and run these reports. When they log in, they should, if possible, see a list of the reports available to them, and nothing else. The list should contain the name of each report and its description. Clicking the report will run it.As it is now, the user sees way to much that he does not need and that confuses him, such as the parts of the repository he has access to, etc. This is way too complicated for the users.I have browsed this forum and elsewhere, and it appears that others are having the same problem, but I have not found a simple and complete description of a solution. So maybe someone can help me with this.One way to achieve what I want appears to be the following: Create a "report of reports" querying the jasperserver database and listing the reports available to the user's group. Each row of the report would be clickable and open an URL with the appropriate report. Edit jasperserver-servlet.xml such that the user is, upon log-in, automatically redirected to the report created in step 1.I have given this a try, and I have been able to create a simple report of reports querying the jasperserver database, but what kind of URL should I link its rows to? Also, the documentation on how to change jasperserver-servlet.xml is a bit sketchy.So here are a couple of questions, in case anyone has solved this in the way above: What would be a good SQL query to be used in the report of reports? How to construct the URL that the rows in the report should redirect the user to? How to edit jasperserver-servlet.xml to redirect the user of a given group to the report?Or is there any other way to achieve more or less what I want, i.e. to make sure that a user, upon log-in, sees basically only the ports (e.g. the report in a given folder) and as little else as possible?Thanks for any help in advance! Kurt Link to comment Share on other sites More sharing options...
Gaby38 Posted February 20, 2011 Share Posted February 20, 2011 I did what you want to do, in the same way you describe it. I created a report that is a "welcome report" listing all the reports that a user ca.n see.I define the allowed reports according to the "folder rights" set by jasperserver to the login user for these reports (Read-Only, write+delete,..) in redefining the rights coding as I want to use them.To "launch" that, I have modified in jasper-servlet.xml, the home page set for the "ROLE_USER" by "launching" the "welcome report" I previously spoke about. (you have to "clone" viewReportFlow.xml and modify it by forcing the path to your welcome report).You can complicate by mapping different "welcome reports" according to the "ROLE" assigned to the login.Post Edited by Gaby38 at 02/20/2011 22:28 Link to comment Share on other sites More sharing options...
kusu Posted February 21, 2011 Author Share Posted February 21, 2011 Thanks for your message. I am happy to see that someone more knowledgeable than me confirms that this should work.Would you mind sharing the sql query of your report? I guess I could figure it out by sufficiently reverse-engineering the tables in the database, but having a working example would simplify the work tremendously.Also, excerpts from your jasper-servlet.xml and viewReportFlow.xml would be very welcome.Best regardsKurt Link to comment Share on other sites More sharing options...
i92magmo Posted February 23, 2011 Share Posted February 23, 2011 I would also love to see the SQL to generate the list of reports - I guess there are several of us needing the same thing.A related question is how this would look also for dashboards, ie list available and permitted dashboards and then hyperlink to them?Thanks,Magnus Link to comment Share on other sites More sharing options...
lpeel Posted February 23, 2011 Share Posted February 23, 2011 I'm also very interested in the SQL for the list of reports but for a different need. Link to comment Share on other sites More sharing options...
Gaby38 Posted February 23, 2011 Share Posted February 23, 2011 The way I choosed to implement that is a little complex. In fact, I use the repository tree as an organization tree starting from "/reports" and having :- level 1 directory : "Department" or equivalent- one mandatory level directory under this level1 with an id_name "Queries" (because I have other "themes" as scheduled jobs,..)- level2 directory: "Service" or equivalent- level3 directory : "Chapter" or equivalentAll Reports are in the level3 directoryEach user that can log in has "user rights" towards these 3 levels that allow him to "see" or not these levels and then the reports.To "see" level1 directory (= in the report acting as home page) user must have READONLY jasperserver right (real not inherited).To "see" level2 directory (= in the report acting as home page) user must have READ+DELETE jasperserver right.To "see" level3 directory (= in the report acting as home page) user must have READ+WRITE+DELETE jasperserver right.The first report acting as home page lists the level2 directory names that user can see grouped by level1 name. By clicking on level2 name (hyperlink), an other report is launched, that is the real report listing the reports the user can launch(hyperlink). In my implementation all reports of level3 directory are visible. One can change the strategy towards the hierarchical visibility of reports : it is linked to the query reading the report list prom the jasperserver database.In the following queries, the FullUserName parameter is obtained from jasperserver Code: firts query listing level 1 and 2 Code: for the query listing the reports Post Edited by Gaby38 at 02/23/2011 22:07Post Edited by Gaby38 at 02/23/2011 22:10 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