cancel
Showing results for 
Search instead for 
Did you mean: 

Changing the Data Source from Java program

0 Kudos

Dear Sir/Madam,


I have multiple data base. Created one crystal report. From java program calling that report with passing different data source information. To achieve that , how may I do that ?, if possible, pls shared any experiences.

Thank You .

Accepted Solutions (0)

Answers (3)

Answers (3)

0 Kudos

Dear Sir/Madam,

Connection Name(Optional) in Oracle JDBC have been defined as IB3K_APP in reports(.rpt file).Refer attached image for more details. Our reports are deployed in Oracle weblogic server where a Data source is defined with the same name as IB3K_APP. So during runtime , based on the datasource logon details, the reports are connected.

But we have a usecase where we need to connect to different databases based on logged in user. Is there any way to change this optional connection defined in the reports to a new name?

i.e. We'll define all possible datasource connections in weblogic. eg. IB3K_USA_DS1 , IB3K_EU_DS2, IB3K_IN_DS3. During runtime, we want the reports to have Connection Name(Optional) set to one these values which we provide

If possible, please have any idea.

Regards,

Thinzar

junge
Explorer
0 Kudos

To change the datasource/login settings programatically you can use something like this:

https://github.com/souvikduttachoudhury/Crystal-Reports/blob/master/src/com/businessobjects/samples/...

0 Kudos

Thanks Peter . Will try !

0 Kudos
0 Kudos

Thanks Williams