Jump to content
We've recently updated our Privacy Statement, available here ×

HELP!!! How to create referece to catalog?


bratsever

Recommended Posts

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

  • Replies 12
  • Created
  • Last Reply

Top Posters In This Topic

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,

Lucian

PS: 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

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

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

  • 2 weeks later...

bratsever

I 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

  • 4 weeks later...

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.

 

Sherman

Jaspersoft

Link to comment
Share on other sites

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 account

Sign in

Already have an account? Sign in here.

Sign In Now

×
×
  • Create New...