Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Archived » BIRT » How to get the absolute location of a data source
How to get the absolute location of a data source [message #879288] Wed, 30 May 2012 23:15 Go to next message
Neil Wang is currently offline Neil WangFriend
Messages: 105
Registered: July 2009
Senior Member
Hi,

I am trying to get the absolute location of a data source programmatically and this is what I have done so far:

I have a ReportDesignHandle object "rdh" and used rdh.getAllDataSources() to cast all data sources to a list of DesignElementHandle objects.

I further cast each DesignElementHandle object to an OdaDataSourceHandle object.

I checked all the methods of each object at the ReportDesignHandle, DesignElementHandle and OdaDataSourceHandle level but still can't figure out how to get the absolute location of each data source. Please advise.

Neil
Re: How to get the absolute location of a data source [message #879295 is a reply to message #879288] Wed, 30 May 2012 23:29 Go to previous messageGo to next message
Jason Weathersby is currently offline Jason WeathersbyFriend
Messages: 9167
Registered: July 2009
Senior Member

Neil,,

Do you mean like position on the report? Datasets do not have a
location. Tables do but unless you specify a width/height you I do not
believe we expose generated position.

Jason

On 5/30/2012 7:15 PM, Neil Wang wrote:
> Hi,
>
> I am trying to get the absolute location of a data source
> programmatically and this is what I have done so far:
>
> I have a ReportDesignHandle object "rdh" and used
> rdh.getAllDataSources() to cast all data sources to a list of
> DesignElementHandle objects.
> I further cast each DesignElementHandle object to an OdaDataSourceHandle
> object.
>
> I checked all the methods of each object at the ReportDesignHandle,
> DesignElementHandle and OdaDataSourceHandle level but still can't figure
> out how to get the absolute location of each data source. Please advise.
>
> Neil
Re: How to get the absolute location of a data source [message #879297 is a reply to message #879295] Wed, 30 May 2012 23:36 Go to previous messageGo to next message
Neil Wang is currently offline Neil WangFriend
Messages: 105
Registered: July 2009
Senior Member
Hi Jason,

Sorry, I should've been clearer. I am looking for the absolute path of each data source in the file system.

Neil
Re: How to get the absolute location of a data source [message #879320 is a reply to message #879297] Thu, 31 May 2012 00:58 Go to previous messageGo to next message
Jason Weathersby is currently offline Jason WeathersbyFriend
Messages: 9167
Registered: July 2009
Senior Member

What kind of data source is it?

Jason

On 5/30/2012 7:36 PM, Neil Wang wrote:
> Hi Jason,
>
> Sorry, I should've been clearer. I am looking for the absolute path of
> each data source in the file system.
>
> Neil
Re: How to get the absolute location of a data source [message #879694 is a reply to message #879320] Thu, 31 May 2012 16:57 Go to previous messageGo to next message
Neil Wang is currently offline Neil WangFriend
Messages: 105
Registered: July 2009
Senior Member
Hi Jason,

The source is a XML file.
Please have a look at the screen shot in attachment. Basically, I need to get "C:\Project1\NewMapping.xml" programmatically by using Java code.

Neil
  • Attachment: XML.JPG
    (Size: 31.78KB, Downloaded 155 times)
Re: How to get the absolute location of a data source [message #879793 is a reply to message #879694] Thu, 31 May 2012 21:19 Go to previous message
Jason Weathersby is currently offline Jason WeathersbyFriend
Messages: 9167
Registered: July 2009
Senior Member

Neil,

You can try something like this:

reportContext.getDesignHandle().getDataSources().get(0).getProperty("FILELIST");

But if the connection profile changes at runtime I am not sure this will
be updated. BTW the profile location property is:
OdaConnProfileStorePath

Jason


On 5/31/2012 12:57 PM, Neil Wang wrote:
> Hi Jason,
>
> The source is a XML file.
> Please have a look at the screen shot in attachment. Basically, I need to get "C:\Project1\NewMapping.xml" programmatically by using Java code.
>
> Neil
Previous Topic:Question on BIRT 3.7.2 export PDF
Next Topic:How to avoid ReferenceError error messages?
Goto Forum:
  


Current Time: Fri Apr 19 08:18:50 GMT 2024

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

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

Back to the top