jacobhorbulyk Posted April 26, 2011 Share Posted April 26, 2011 Hi all,Is it possible for a user to be redirected to a specific report after login as opposed to entering their login credentials and then being redirected to the repository by default? Is this a feature that is avaialbe in the professional versions or is it just something that has yet to be concieved?Thanks Link to comment Share on other sites More sharing options...
mdahlman Posted April 29, 2011 Share Posted April 29, 2011 There's no simple way to achieve this.The commercial version of JasperReports Server shows an example of redirecting based on the user's role. The same technique would work equally well in the community edition.The key thing that is needed to redirect each user would be the concept of persisted user preferences. We'll surely see this feature added someday, but it's not there today.That said, you could certainly get it working today... but it will take some work. The profile attributes are already there. So you could populate that attribute with something and then grab that value and use it to figure out where to direct the user on login. It won't be trivial.Regards,Matt Link to comment Share on other sites More sharing options...
jacobhorbulyk Posted May 2, 2011 Author Share Posted May 2, 2011 Would you be able to tell me which file those settings would be in? I would assume it to be a .properties file somewhere in the jasper server install folder. Link to comment Share on other sites More sharing options...
Gaby38 Posted May 2, 2011 Share Posted May 2, 2011 I already did that by modifying the jasper-servlet.xml file. The launched report is a report listing the /reports tree and showing to the user only the reports he is authorized to launch.I already posted about that somewhere in this forum one or two years ago. Link to comment Share on other sites More sharing options...
jacobhorbulyk Posted May 2, 2011 Author Share Posted May 2, 2011 With regards to this post: http://jasperforge.org/plugins/espforum/view.php?group_id=112&forumid=102&topicid=45586 How would I go about finding the URI? Link to comment Share on other sites More sharing options...
ernestoo Posted May 2, 2011 Share Posted May 2, 2011 Hi,The URI refers to the repository URI, see the attached screenshot. For example, for the Employee List report the URI is /reports/samples/Employee Link to comment Share on other sites More sharing options...
jacobhorbulyk Posted May 3, 2011 Author Share Posted May 3, 2011 So I change the line in the jasperserver-servlet.xml file to: <value>ROLE_USER|redirect:/flow.html?_flowId=viewReportFlow&reportUnit=/Two_Tables</value> and then upon restarting jasper server I get the following error: org.springframework.beans.factory.xml.XmlBeanDefinitionStoreException: Line 122 in XML document from ServletContext resource [/WEB-INF/jasperserver-servlet.xml] is invalid; nested exception is org.xml.sax.SAXParseException: The reference to entity "reportUnit" must end with the ';' delimiter.Any suggestions? Link to comment Share on other sites More sharing options...
Gaby38 Posted May 3, 2011 Share Posted May 3, 2011 The post I was referencing is :http://jasperforge.org/plugins/espforum/view.php?group_id=112&forumid=102&topicid=45792In fact, I "clone" the viewReportFlow and I set the report to be launched at the beginning.In the jasperserver 4 release, it is the same basic principle but there are some changes in the files to be cloned and the way to do that.Swood said that my method was "cumbersome". It is probably true, but it works fine since one or two years. I think there are other ways to do the same thing in a more clever manner but I am not a guru of spring.Gaby 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