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

DATASOURCE FOR MULTIPLE CLIENT INSTANCE


teamireport

Recommended Posts

HI Folks,

I would like to know how to achieve accessing /creating  making a datasource for my web applications different db instance.

Let me tell  what i have done so far.

1. I have a php web application and intergrated jasperserver successfully, in jasperserver  i used to create datasource say ' clientA_db'  with appropriate db name correctly, and will upload jrxml in jasperserver ,will point datasource for the uploading jrxml to 'clientA_db' .

 

My requirment is we have a different clients db with same web application jasperserver webservice intergrated ( i.e multi -tenant) .

as per my first point, we able to setup jasperserver thing for 'clientA'  , if we plan to access same jasperserver db for 'clientB' ,where the datasource already been created with the name of the 'clientA_db' means, how we should dynamically change datasource name to apporiate client instance database.

is there any way to dynamically setup datasource via webservice as a parameter .?

how we need to make it ?

pl.anyone guide me how to achive this ?

thanks,

teamireport

 

 

 

 

 

Link to comment
Share on other sites

  • Replies 15
  • Created
  • Last Reply

Top Posters In This Topic

If you are using a multi-tenant setup, would it work if you just setup different datasources in each organization?

org1/datasource/somedatasource

org2/datasource/someotherdatasource

The datasources could have same/different names and attributes as they would exist in separate organizations.

I am sort of confused by your question when you say that you will access the same jasperserver db for both applications.  Are you talking about the repository database here? 

 

Link to comment
Share on other sites

Thanks for your quick suggestion ,

 

snip>>

I am sort of confused by your question when you say that you will access the same jasperserver db for both applications.  Are you talking about the repository database here?

 yes, i'm talking about repository database, there we hardcorde database name for the 'clientA ' in datasource . this would be like

repository jasperserver database which contains jrxml ,which always looks for 'clientA' database for all my report, since i have created datasource for 'clientA' alone, if we setup 'clientB' instance , the same jasperserver only looks for 'clientA' db,not 'clientB' here how do i change databasename in datasource of jasperserver dyanmcially for clientB .

client  A < ----- >jasperserver db(where hardcoded database name for 'clientA' instance alone)  <---->clientB

                                                           



Post Edited by teamireport at 12/09/2009 18:18
Link to comment
Share on other sites

OK, but when you said multi-tenant, I assumed that clientA & clientB would be in different organizations.  Are you saying that clientA & clientB should be DS's in the same organization and configured to point to different DB's (and then you want your reports to be able to run against either)?

If so, I think I better understand the question (but multi-tenant doesn't seem relevant to this discussion).

Link to comment
Share on other sites

OK, now I understand, but I am not sure of the solution.

One solution would be to deploy the reports to 2 different organizations and then define different datasources in each organization.  Your app would then require multiple web service clients (to point at the multiple organizations).

Another potential solution would be to write a custom data source.  I've only implemented a custom data source that reads the connection information from a properties file, but you may be able to write it in such a way that it creates a connection based on some input parameter passed into the report (your DAO should have access to the report params).

Take a look at section 5.10 of the JasperServer-Pro-Admin-Guide.pdf. (see 5.10.5 for details). 

Link to comment
Share on other sites

Many thanks jdevine for your support.

 

yes, solution # 1 that you mentioned ,i already had in my mind, going by solution #1 apporach what we feel means, if any changes made in organization 1 jrxml means , need to do the same in organzation 2 too without forgetting :) , we feel this apporach is fine but moving forward in future maintaining the repository db is quite hetic.so, i was looking forwards for other solution.

 

But, yours solution #2 is quite impressive and that giving me confident to achive.

let me go thru the doc in few mintues ,will get back to you,

BTW, could you pl. able to attach custom data source that you have created, that surely gives me some insight. ?



Post Edited by teamireport at 12/09/2009 18:46
Link to comment
Share on other sites

yes, i have found the custom datasource example files as you mentioned,  thanks ton !

but i dont find the doc "JasperServer-Pro-Admin-Guide.pdf "  :(

 

could you pl. tell me where its available ? i have searched my whole  jasperserver checkout directory

could you please ?

 

Link to comment
Share on other sites

jdevine ! thanks you so much for your time that you spent for  replying to my qns sooner.

i looked at the doc ,getting some ideas that you already mentioned.

let me start doing implementing the custom datasource, if i have questions or somewhere i struggle will let u know.

could you please keep watching this forum continuosly, ? i post my updated here,so that other users can benefit from our conversation

once again many thanks...bye for now will catch you by tommrow.

 

 

Link to comment
Share on other sites

  • 1 year later...
  • 6 years later...

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...