Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Archived » BIRT » set Data Source from your java code
set Data Source from your java code [message #819262] Mon, 12 March 2012 17:38 Go to next message
Deepali Patil is currently offline Deepali PatilFriend
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 21:47 Go to previous messageGo to next message
Jason Weathersby is currently offline Jason WeathersbyFriend
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.
>
Re: set Data Source from your java code [message #819925 is a reply to message #819398] Tue, 13 March 2012 13:57 Go to previous messageGo to next message
sam va is currently offline sam vaFriend
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 08:31 Go to previous message
Deepali Patil is currently offline Deepali PatilFriend
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: Mon Dec 02 21:10:17 GMT 2024

Powered by FUDForum. Page generated in 0.03688 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top