|
Re: Custom ODA driver in BIRT rptdesign [message #220041 is a reply to message #219997] |
Tue, 20 February 2007 20:23 |
|
Does you ODA driver show up in the designer when you do a new data
set/source?
Jason
"Ivan Biddles" <ivanb@scientology.net> wrote in message
news:d71e8a14db99dcb1714dc6542c7cea94$1@www.eclipse.org...
> Hi,
> I have written a custom ODA driver following the example of the Flatfile
> ODA driver.
> It works on its own within a JUnit test suite but when I try to reference
> it in a BIRT ".rptdesign" file, the driver never gets called.
> I have searched for an example of a ".rptdesign" file that shows the
> Flatfile ODA in action but have been unable to find one anywhere on the
> Net.
> Does anyone have such an example ".rptdesign" file, particularly showing
> the appropriate data source and data set tags?
> Thanks in advance, Ivan.
>
|
|
|
|
Re: Custom ODA driver in BIRT rptdesign [message #220061 is a reply to message #220053] |
Wed, 21 February 2007 00:11 |
|
You should be able to create a design with your data source then.
I have attached an example that uses the flat file driver as well.
Jason
<?xml version="1.0" encoding="UTF-8"?>
<!-- Written by Eclipse BIRT 2.0 -->
<report xmlns="http://www.eclipse.org/birt/2005/design" version="3.2.6"
id="1">
<property name="createdBy">Eclipse BIRT Designer Version
2.1.1.v20060922-1058 Build <20060926-0959></property>
<property name="units">in</property>
<property name="comments">Copyright (c) 2006 <<Your Company Name
here>></property>
<data-sources>
<oda-data-source
extensionID="org.eclipse.datatools.connectivity.oda.flatfile " name="Data
Source" id="4">
<text-property name="displayName"></text-property>
<property name="HOME">C:\dwn</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.datatools.connectivity.oda.flatfile.dataSet "
name="Data Set" id="5">
<structure name="cachedMetaData">
<list-property name="resultSet">
<structure>
<property name="position">1</property>
<property name="name">Date</property>
<property name="dataType">string</property>
</structure>
<structure>
<property name="position">2</property>
<property name="name">Open</property>
<property name="dataType">string</property>
</structure>
<structure>
<property name="position">3</property>
<property name="name">High</property>
<property name="dataType">string</property>
</structure>
<structure>
<property name="position">4</property>
<property name="name">Low</property>
<property name="dataType">string</property>
</structure>
</list-property>
</structure>
<property name="dataSource">Data Source</property>
<list-property name="resultSet">
<structure>
<property name="position">1</property>
<property name="name">Date</property>
<property name="nativeName">Date</property>
<property name="dataType">string</property>
<property name="nativeDataType">12</property>
</structure>
<structure>
<property name="position">2</property>
<property name="name">Open</property>
<property name="nativeName">Open</property>
<property name="dataType">string</property>
<property name="nativeDataType">12</property>
</structure>
<structure>
<property name="position">3</property>
<property name="name">High</property>
<property name="nativeName">High</property>
<property name="dataType">string</property>
<property name="nativeDataType">12</property>
</structure>
<structure>
<property name="position">4</property>
<property name="name">Low</property>
<property name="nativeName">Low</property>
<property name="dataType">string</property>
<property name="nativeDataType">12</property>
</structure>
</list-property>
<property name="queryText">select Date, Open, High, Low from
table.csv</property>
<xml-property name="designerValues"><![CDATA[<?xml version="1.0"
encoding="UTF-8"?>
<model:DesignValues
xmlns:design="http://www.eclipse.org/datatools/connectivity/oda/design"
xmlns:model="http://www.eclipse.org/birt/report/model/adapter/odaModel">
<Version>1.0</Version>
<design:ResultSets derivedMetaData="true">
<design:resultSetDefinitions>
<design:resultSetColumns>
<design:resultColumnDefinitions>
<design:attributes>
<design:name>Date</design:name>
<design:position>1</design:position>
<design:nativeDataTypeCode>12</design:nativeDataTypeCode>
<design:precision>-1</design:precision>
<design:scale>-1</design:scale>
<design:nullability>Unknown</design:nullability>
</design:attributes>
<design:usageHints>
<design:label>Date</design:label>
<design:formattingHints/>
</design:usageHints>
</design:resultColumnDefinitions>
<design:resultColumnDefinitions>
<design:attributes>
<design:name>Open</design:name>
<design:position>2</design:position>
<design:nativeDataTypeCode>12</design:nativeDataTypeCode>
<design:precision>-1</design:precision>
<design:scale>-1</design:scale>
<design:nullability>Unknown</design:nullability>
</design:attributes>
<design:usageHints>
<design:label>Open</design:label>
<design:formattingHints/>
</design:usageHints>
</design:resultColumnDefinitions>
<design:resultColumnDefinitions>
<design:attributes>
<design:name>High</design:name>
<design:position>3</design:position>
<design:nativeDataTypeCode>12</design:nativeDataTypeCode>
<design:precision>-1</design:precision>
<design:scale>-1</design:scale>
<design:nullability>Unknown</design:nullability>
</design:attributes>
<design:usageHints>
<design:label>High</design:label>
<design:formattingHints/>
</design:usageHints>
</design:resultColumnDefinitions>
<design:resultColumnDefinitions>
<design:attributes>
<design:name>Low</design:name>
<design:position>4</design:position>
<design:nativeDataTypeCode>12</design:nativeDataTypeCode>
<design:precision>-1</design:precision>
<design:scale>-1</design:scale>
<design:nullability>Unknown</design:nullability>
</design:attributes>
<design:usageHints>
<design:label>Low</design:label>
<design:formattingHints/>
</design:usageHints>
</design:resultColumnDefinitions>
</design:resultSetColumns>
</design:resultSetDefinitions>
</design:ResultSets>
</model:DesignValues>
]]></xml-property>
</oda-data-set>
</data-sets>
<page-setup>
<simple-master-page name="Simple MasterPage" id="2">
<page-footer>
<text id="3">
<property name="contentType">html</property>
<text-property name="content"><![CDATA[<value-of>new
Date()</value-of>]]></text-property>
</text>
</page-footer>
</simple-master-page>
</page-setup>
<body>
<table id="6">
<property name="width">100%</property>
<property name="dataSet">Data Set</property>
<list-property name="boundDataColumns">
<structure>
<property name="name">Date</property>
<expression name="expression">dataSetRow["Date"]</expression>
<property name="dataType">string</property>
</structure>
<structure>
<property name="name">Open</property>
<expression name="expression">dataSetRow["Open"]</expression>
<property name="dataType">string</property>
</structure>
<structure>
<property name="name">High</property>
<expression name="expression">dataSetRow["High"]</expression>
<property name="dataType">string</property>
</structure>
<structure>
<property name="name">Low</property>
<expression name="expression">dataSetRow["Low"]</expression>
<property name="dataType">string</property>
</structure>
</list-property>
<column id="30"/>
<column id="31"/>
<column id="32"/>
<column id="33"/>
<header>
<row id="7">
<cell id="8">
<label id="9">
<text-property name="text">Date</text-property>
</label>
</cell>
<cell id="10">
<label id="11">
<text-property name="text">Open</text-property>
</label>
</cell>
<cell id="12">
<label id="13">
<text-property name="text">High</text-property>
</label>
</cell>
<cell id="14">
<label id="15">
<text-property name="text">Low</text-property>
</label>
</cell>
</row>
</header>
<detail>
<row id="16">
<cell id="17">
<data id="18">
<property name="resultSetColumn">Date</property>
</data>
</cell>
<cell id="19">
<data id="20">
<property name="resultSetColumn">Open</property>
</data>
</cell>
<cell id="21">
<data id="22">
<property name="resultSetColumn">High</property>
</data>
</cell>
<cell id="23">
<data id="24">
<property name="resultSetColumn">Low</property>
</data>
</cell>
</row>
</detail>
<footer>
<row id="25">
<cell id="26"/>
<cell id="27"/>
<cell id="28"/>
<cell id="29"/>
</row>
</footer>
</table>
</body>
</report>
"Ivan Biddles" <ivanb@scientology.net> wrote in message
news:f372a1938ee39bb5b71a630899806709$1@www.eclipse.org...
> Dear Jason,
>
> Thank you for your very fast reply.
>
> I was a little slower getting back to you because, to be honest, I
> haven't been using the report designer so I had to set it up and work out
> how to use it. (Since my focus is on the underlying ODA driver I have just
> a simple rptdesign file that I copied from an ordinary sample and edited
> the XML.)
>
> Anyway, I did set up the BIRT 2.2M4 all-in-one and opened the rptdesign
> in the designer and the data source and data set did show up.
>
> Best wishes, Ivan
>
|
|
|
|
Re: Custom ODA driver in BIRT rptdesign [message #220383 is a reply to message #219997] |
Thu, 22 February 2007 04:55 |
Eclipse User |
|
|
|
Originally posted by: rchamarthy.gmail.com
Hope you have a valid plugin.xml file for your custom ODA driver.
Also after launching the designer with your driver, look under
Help->About Eclipse SDK->Plug-in Details->Plug-in ID, and check if your driver
bundle ID is mentioned in that list.
Ravi Chamarthy.
Ivan Biddles wrote:
> Hi,
> I have written a custom ODA driver following the example of the Flatfile
> ODA driver.
> It works on its own within a JUnit test suite but when I try to reference
> it in a BIRT ".rptdesign" file, the driver never gets called.
> I have searched for an example of a ".rptdesign" file that shows the
> Flatfile ODA in action but have been unable to find one anywhere on the
> Net.
> Does anyone have such an example ".rptdesign" file, particularly showing
> the appropriate data source and data set tags?
> Thanks in advance, Ivan.
|
|
|
|
|
|
Powered by
FUDForum. Page generated in 0.03402 seconds