Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Archived » BIRT » DataSource connection in runtime
DataSource connection in runtime [message #528112] Mon, 19 April 2010 11:53 Go to next message
sen K is currently offline sen KFriend
Messages: 28
Registered: April 2010
Junior Member
Hi,

Can I make DataSource,DataSet / SQL statement during runtime.Is it possible to pick those required information in runtime, through java.Someone can share example/ like to refer in this regards.

I appreciate your help.

Thanks
Sen
Re: DataSource connection in runtime [message #528240 is a reply to message #528112] Mon, 19 April 2010 19:15 Go to previous messageGo to next message
Jason Weathersby is currently offline Jason WeathersbyFriend
Messages: 9167
Registered: July 2009
Senior Member

You can modify these using the property binding feature(JavaScript
expression) or using an event handler (Java or JavaScript). Take a look
at this example:
http://www.eclipse.org/birt/phoenix/examples/reports/birt2.1 /querymod/index.php

Jason

sen K wrote:
> Hi,
>
> Can I make DataSource,DataSet / SQL statement during runtime.Is it
> possible to pick those required information in runtime, through
> java.Someone can share example/ like to refer in this regards.
>
> I appreciate your help.
>
> Thanks
> Sen
Re: DataSource connection in runtime [message #528400 is a reply to message #528240] Tue, 20 April 2010 12:02 Go to previous messageGo to next message
sen K is currently offline sen KFriend
Messages: 28
Registered: April 2010
Junior Member
Jason,

Thanks for your reply.I have gone through with this examle, it was useful one.

I feel that my question was not clear in my previous post.

Actually I am looking some help in, how to read the content from <some filename>.txt or <some filename>.properties from java file.Is it possible to load the DataSoruce and DataSet values ( like SQL query ) from file like .TXT or .properties file using java during runtime.

Please give some example for my better understand.

Regards
Sen
Re: DataSource connection in runtime [message #528528 is a reply to message #528400] Tue, 20 April 2010 19:23 Go to previous message
Jason Weathersby is currently offline Jason WeathersbyFriend
Messages: 9167
Registered: July 2009
Senior Member

Sen,

You can do this like:

importPackage(Packages.java.io);
reader = new FileReader("c:\\mycred.txt");
data = reader.read();

Just normal file io using Java called through Rhino JavaScript. Just
put code in your beforeOpen.

You may want to look at connection profiles which does this for you BTW.

Jason

sen K wrote:
> Jason,
>
> Thanks for your reply.I have gone through with this examle, it was
> useful one.
>
> I feel that my question was not clear in my previous post.
> Actually I am looking some help in, how to read the content from <some
> filename>.txt or <some filename>.properties from java file.Is it
> possible to load the DataSoruce and DataSet values ( like SQL query )
> from file like .TXT or .properties file using java during runtime.
>
> Please give some example for my better understand.
>
> Regards
> Sen
Previous Topic:Deploy Report Engine
Next Topic:Dynamic Parameter & Drill Through
Goto Forum:
  


Current Time: Sat Apr 20 01:48:10 GMT 2024

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

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

Back to the top