Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » BIRT » How to get the projects folder from in a script?
How to get the projects folder from in a script? [message #754299] Tue, 01 November 2011 23:22 Go to next message
Eclipse User
Using BIRT within an EMF based RCP application. Using a set of
pre-created reports in a reports project that can then be copied as
files to one or more active projects containing EMF data model instances.


Currently using a beforeOpen script to find the externalized connection
property:

var folder = reportContext.getDesignHandle().getSystemId();
this.setExtensionProperty("OdaConnProfileStorePath", folder +
"premises.cps");

Ideally instead of copying files I would like to use linked files
instead. But then the getSystemId() will not suffice. (It always shows
the real reports directory not the linked one running in the Report
Viewer.)

Is there a way to find out the project directory of the report design
that is being run in the viewer instead?

thanks for any suggestions,
John
Re: How to get the projects folder from in a script? [message #754528 is a reply to message #754299] Wed, 02 November 2011 23:54 Go to previous messageGo to next message
Eclipse User
var reportFolderAndReportName =
reportContext.getReportRunnable().getReportName();


On 11/01/2011 06:22 PM, John E. Conlon wrote:
> Using BIRT within an EMF based RCP application. Using a set of
> pre-created reports in a reports project that can then be copied as
> files to one or more active projects containing EMF data model instances.
>
>
> Currently using a beforeOpen script to find the externalized connection
> property:
>
> var folder = reportContext.getDesignHandle().getSystemId();
> this.setExtensionProperty("OdaConnProfileStorePath", folder +
> "premises.cps");
>
> Ideally instead of copying files I would like to use linked files
> instead. But then the getSystemId() will not suffice. (It always shows
> the real reports directory not the linked one running in the Report
> Viewer.)
>
> Is there a way to find out the project directory of the report design
> that is being run in the viewer instead?
>
> thanks for any suggestions,
> John
>
>
Re: How to get the projects folder from in a script? [message #755252 is a reply to message #754528] Mon, 07 November 2011 19:43 Go to previous message
Jason Weathersby is currently offline Jason Weathersby
Messages: 9167
Registered: July 2009
Senior Member

You also can put the connection profile in the resource folder and use
reportContext.getResource(nameofyourprofile);

Jason

On 11/2/2011 7:54 PM, John E. Conlon wrote:
> var reportFolderAndReportName =
> reportContext.getReportRunnable().getReportName();
>
>
> On 11/01/2011 06:22 PM, John E. Conlon wrote:
>> Using BIRT within an EMF based RCP application. Using a set of
>> pre-created reports in a reports project that can then be copied as
>> files to one or more active projects containing EMF data model instances.
>>
>>
>> Currently using a beforeOpen script to find the externalized connection
>> property:
>>
>> var folder = reportContext.getDesignHandle().getSystemId();
>> this.setExtensionProperty("OdaConnProfileStorePath", folder +
>> "premises.cps");
>>
>> Ideally instead of copying files I would like to use linked files
>> instead. But then the getSystemId() will not suffice. (It always shows
>> the real reports directory not the linked one running in the Report
>> Viewer.)
>>
>> Is there a way to find out the project directory of the report design
>> that is being run in the viewer instead?
>>
>> thanks for any suggestions,
>> John
>>
>>
>
Previous Topic:Adding dynamic columns to an OdaDataSet
Next Topic:Connection exeptions
Goto Forum:
  


Current Time: Thu Sep 18 01:50:38 GMT 2014

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

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