How to get the projects folder from in a script? [message #754299] |
Tue, 01 November 2011 23:22 |
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 |
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 |
|
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
>>
>>
>
|
|
|
|
Powered by
FUDForum. Page generated in 0.03721 seconds