Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Archived » 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 UserFriend
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 UserFriend
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 messageGo to next message
Jason Weathersby is currently offline Jason WeathersbyFriend
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
>>
>>
>
Re: How to get the projects folder from in a script? [message #1817245 is a reply to message #755252] Tue, 19 November 2019 08:24 Go to previous message
Emanuele Spatola is currently offline Emanuele SpatolaFriend
Messages: 11
Registered: September 2019
Location: Italy
Junior Member
It works for me, thanks :)
Previous Topic:create Data Source with .csv
Next Topic:Splitting cross tab header cell into multiple columns
Goto Forum:
  


Current Time: Thu Mar 28 20:56:23 GMT 2024

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

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

Back to the top