Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » BIRT » set Data Source from your java code
set Data Source from your java code [message #819262] Mon, 12 March 2012 13:38 Go to next message
Deepali Patil is currently offline Deepali Patil
Messages: 22
Registered: January 2012
Junior Member
Hi,

I have rptdesign, and I generate report in different format through my java code.
I have set the dataSource while designing the report design, and java code just run's that design.
When I am testing same code with rptdesign on different LAN, it can not able to find dataSource which I set in design. To run this code I need to edit datasource for database. Which is very tedious for different LAN

Is it possible to set datasource through java code?

Thanks,
Deepali.
Re: set Data Source from your java code [message #819398 is a reply to message #819262] Mon, 12 March 2012 17:47 Go to previous messageGo to next message
Jason Weathersby is currently offline Jason Weathersby
Messages: 9167
Registered: July 2009
Senior Member

Using the de api from the java code that runs the report you should be
able to open the report and modify any properties. What do you want to
change in the data source?

Jason

On 3/12/2012 1:38 PM, Deepali Patil wrote:
> Hi,
>
> I have rptdesign, and I generate report in different format through my
> java code. I have set the dataSource while designing the report design,
> and java code just run's that design.
> When I am testing same code with rptdesign on different LAN, it can not
> able to find dataSource which I set in design. To run this code I need
> to edit datasource for database. Which is very tedious for different LAN
>
> Is it possible to set datasource through java code?
> Thanks,
> Deepali.
>


Jason Weathersby

BIRT Exchange
Re: set Data Source from your java code [message #819925 is a reply to message #819398] Tue, 13 March 2012 09:57 Go to previous messageGo to next message
sam va is currently offline sam va
Messages: 121
Registered: July 2011
Senior Member
from java you can use the below line

task.getAppContext().put("OdaJDBCDriverPassInConnection", connObject);

Thanks

Re: set Data Source from your java code [message #830131 is a reply to message #819925] Tue, 27 March 2012 04:31 Go to previous message
Deepali Patil is currently offline Deepali Patil
Messages: 22
Registered: January 2012
Junior Member
Hi,

Thank you so much for reply.

task.getAppContext().put("OdaJDBCDriverPassInConnection", connObject); works for me.




Thanks,
Deepali.
Previous Topic:Aggregation problem
Next Topic:Image tutorial please!!
Goto Forum:
  


Current Time: Fri Apr 18 16:43:39 EDT 2014

Powered by FUDForum. Page generated in 0.02204 seconds