bratsever Posted September 17, 2008 Share Posted September 17, 2008 Hello,I'm sorry for my poor English. I'm interesting in JasperServer and JasperReports,.But I have a problem. So.. we have some partners and one pattern of report for them. Reports for each partner are store in separate catalog. How we can make reference for catalog so when partner or admin enter to this catalog the id of partner transfer to report? Link to comment Share on other sites More sharing options...
bratsever Posted September 17, 2008 Author Share Posted September 17, 2008 Can anyone help ????? Link to comment Share on other sites More sharing options...
lucianc Posted September 17, 2008 Share Posted September 17, 2008 There is no intended feature that makes the report unit URI available in report templates, but you can still get a context URI by calling com.jaspersoft.jasperserver.api.engine.jasperreports.util.RepositoryUtil.getThreadRepositoryContext().getContextURI(). Based on this, you can derive the report unit or folder URIs.Regards,LucianPS: I'm not sure I properly understood your question. I'm assuming that a "catalog" is a repository folder. Link to comment Share on other sites More sharing options...
bratsever Posted September 18, 2008 Author Share Posted September 18, 2008 My company uses JasperServer to provide sale statistic for its multiple partners. The statistic is partner dependent, the partners access it using partner statistic report. The report template is the same for all partners, except the PARTNER_ID parameter value. Now there are dozens of practically identical report instances in the repository with many more to come. So the question is about reducing maintanance costs. Is it possible to create in a partner folder some kind of a symlink to the report's singleton and attach partner specific parameter values to the symlink or better to the folder itself ? Do you recommend some other alternative to the dull copy/paste approach? Link to comment Share on other sites More sharing options...
gabrielinux Posted September 18, 2008 Share Posted September 18, 2008 For security reasons, I would recommend making a separate report for each partner, each in its own folder, and each folder with its own permissions. Link to comment Share on other sites More sharing options...
bratsever Posted September 19, 2008 Author Share Posted September 19, 2008 what's that got todo with it? The report template is the same for all partners, except the PARTNER_ID parameter value. I need like symlink in Unix to do with repositary folder. In principle, can I do that in JasperServer? Link to comment Share on other sites More sharing options...
lucianc Posted September 19, 2008 Share Posted September 19, 2008 I'm afraid that JasperServer does not support such repository folder/resource synlinks.Why exactly do you need separate folders/reports per partner, as opposed to having a single report with a partner input control?Regards,Lucian Link to comment Share on other sites More sharing options...
bratsever Posted September 19, 2008 Author Share Posted September 19, 2008 The partner_id parameter value is unknown for a partner and more than that, the partner shouldn't know anything about other partners. The input control suggest such a knowledge and leads to security or commercial risks Link to comment Share on other sites More sharing options...
lucianc Posted September 19, 2008 Share Posted September 19, 2008 Then, if I understand correctly, each partner would have its own user(s). If this is the case, is there a way to determine the partner ID based on the username? If so, you could create a single report which would use $P{LoggedInUser} to provide a default value for a hidden Partner ID parameter. Link to comment Share on other sites More sharing options...
bratsever Posted September 19, 2008 Author Share Posted September 19, 2008 Problem consist in if admin of JasperServer want to create reports for different partners, which have the same report template, he need every time to login as different user and if the count of partners is very large so its a hard work to create reports Link to comment Share on other sites More sharing options...
bratsever Posted September 29, 2008 Author Share Posted September 29, 2008 Hello Lucian, can you help me in this problem? Link to comment Share on other sites More sharing options...
dataman101 Posted September 30, 2008 Share Posted September 30, 2008 bratseverI have run into this same brick wall. I have take two approaches:1. Short term - deployed OpenReports that has $P{OPENREPORTS_USER_EXTERNALID} that is collected on the user setup form as label.externalId. Works great.2. Long term - add a new table to the JasperReports schema that adds PARTNER_ID and UserName records. Enhance the the User.java to retrieve PARTNER_ID for a given user and populate a new $P{PARTNER_ID} parameter to use in th JRXML.If you have found another apporach - pass it on.T Link to comment Share on other sites More sharing options...
swood Posted October 29, 2008 Share Posted October 29, 2008 This issue is under the more general area of multi-tenancy. In another post, I said:Multi-tenancy is a many tenacled beast, including requirements such as: restricting repository access tenant/customer, user and role management user preferences, including setting a home page clustering, scalability Jaspersoft has helped many customers implement multi-tenant solutions with services. In the next JasperServer Professional release, we are taking what we have learned and putting multi-tenant features into the core product. ShermanJaspersoft 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