Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Archived » BIRT » Relative path and flat file
Relative path and flat file [message #96523] Mon, 05 December 2005 09:56 Go to next message
Pietro is currently offline PietroFriend
Messages: 27
Registered: July 2009
Junior Member
Hi all,
I'd like to say if is possible to have relative path in setting flat
file data source. In other words, I'd like that report read file in its
current directory because I must use report in my application and I
don't know where the program is installed.

Thanks for any help,
Pietro
Re: Relative path and flat file [message #98414 is a reply to message #96523] Mon, 12 December 2005 08:44 Go to previous message
Eclipse UserFriend
Originally posted by: gilles.vandaele.advalvas.be

Hi Pietro,
I did something who works fine: I set the dataSource.HOME and the
dataSet.queryText in the beforeOpen() methods of those two objects. I need
to set the default properties to valid paths, for the report to be loaded
fine in the designer, but at runtime, the datasource and dataset are
linked to a dynamic path (see my 'date' paramater).
The xml in the .rptdesign source becomes:
------------------------
<parameters>
<scalar-parameter name="date" id="17">
...
</scalar-parameter>
</parameters>
<data-sources>
<oda-data-source
extensionID="org.eclipse.birt.report.data.oda.flatfile" name="DataSource"
id="4">
<method
name="beforeOpen"><![CDATA[this.extensionProperties.HOME="P:\\daily\\ "+report.params["date"];]]></method>
<property name="HOME">P:\daily\20051111</property>
<property name="CHARSET">UTF-8</property>
<property name="INCLTYPELINE">NO</property>
</oda-data-source>
</data-sources>
<data-sets>
<oda-data-set
extensionID="org.eclipse.birt.report.data.oda.flatfile.dataSet "
name="DataSet" id="5">
<property name="dataSource">DataSource</property>
<method name="beforeOpen"><![CDATA[this.queryText="select *
from percentiles-"+report.params["date"]+".csv";]]></method >
-------------------------

Hope it helps.
Previous Topic:2.0M3 preview NoClassDefFoundError
Next Topic:OutOfMemory JavaHeapSpace?
Goto Forum:
  


Current Time: Tue May 28 14:58:46 GMT 2024

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

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

Back to the top