Skip to main content



      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 19:15 Go to next message
Eclipse UserFriend
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 19:29 Go to previous messageGo to next message
Eclipse UserFriend
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 19:36 Go to previous messageGo to next message
Eclipse UserFriend
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] Wed, 30 May 2012 20:58 Go to previous messageGo to next message
Eclipse UserFriend
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 12:57 Go to previous messageGo to next message
Eclipse UserFriend
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 229 times)
Re: How to get the absolute location of a data source [message #879793 is a reply to message #879694] Thu, 31 May 2012 17:19 Go to previous message
Eclipse UserFriend
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: Mon Jul 07 04:35:02 EDT 2025

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

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

Back to the top