Source Code for Examples
Select a project to browse the source code. I current do not include graphics or other binary artifacts. I include the source code and xml files as well as the ".projects" and the ".classpath" files.
<?xml version="1.0" encoding="UTF-8"?>
<report xmlns="http://www.eclipse.org/birt/2005/design" version="3.2.22" id="1">
<property name="createdBy">Eclipse BIRT Designer Version 3.7.0.v20110602 Build <3.7.0.v20110607-1526></property>
<property name="units">in</property>
<property name="iconFile">/templates/chart_listing.gif</property>
<property name="cheatSheet">org.eclipse.birt.report.designer.ui.cheatsheet.chartlisting</property>
<property name="bidiLayoutOrientation">ltr</property>
<property name="imageDPI">96</property>
<data-sources>
<script-data-source name="srcStock2" id="40"/>
</data-sources>
<data-sets>
<script-data-set name="dataStock2" id="41">
<list-property name="resultSetHints">
<structure>
<property name="position">1</property>
<property name="name">columnOpen</property>
<property name="dataType">decimal</property>
</structure>
</list-property>
<list-property name="columnHints">
<structure>
<property name="columnName">columnOpen</property>
<text-property name="displayName">Open</text-property>
</structure>
</list-property>
<structure name="cachedMetaData">
<list-property name="resultSet">
<structure>
<property name="position">1</property>
<property name="name">columnOpen</property>
<property name="dataType">decimal</property>
</structure>
</list-property>
</structure>
<property name="dataSource">srcStock2</property>
<method name="open"><![CDATA[count = 0;
// Create instance of
// the GetStockHistory class
gsh = new Packages.de.vogella.birt.stocks.daomock.StockDaoMock();
//Load the List
stock = gsh.getStockValues("Java");
]]></method>
<method name="fetch"><![CDATA[if(count < stock.size()){
row["columnOpen"] = stock.get(count).getOpen();
count++;
return true;
}
return false;
]]></method>
</script-data-set>
</data-sets>
<styles>
<style name="report" id="33">
<property name="fontFamily">sans-serif</property>
<property name="fontSize">10pt</property>
</style>
<style name="crosstab-cell" id="37">
<property name="borderBottomColor">#CCCCCC</property>
<property name="borderBottomStyle">solid</property>
<property name="borderBottomWidth">1pt</property>
<property name="borderLeftColor">#CCCCCC</property>
<property name="borderLeftStyle">solid</property>
<property name="borderLeftWidth">1pt</property>
<property name="borderRightColor">#CCCCCC</property>
<property name="borderRightStyle">solid</property>
<property name="borderRightWidth">1pt</property>
<property name="borderTopColor">#CCCCCC</property>
<property name="borderTopStyle">solid</property>
<property name="borderTopWidth">1pt</property>
</style>
<style name="crosstab" id="38">
<property name="borderBottomColor">#CCCCCC</property>
<property name="borderBottomStyle">solid</property>
<property name="borderBottomWidth">1pt</property>
<property name="borderLeftColor">#CCCCCC</property>
<property name="borderLeftStyle">solid</property>
<property name="borderLeftWidth">1pt</property>
<property name="borderRightColor">#CCCCCC</property>
<property name="borderRightStyle">solid</property>
<property name="borderRightWidth">1pt</property>
<property name="borderTopColor">#CCCCCC</property>
<property name="borderTopStyle">solid</property>
<property name="borderTopWidth">1pt</property>
</style>
</styles>
<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>
<grid id="4">
<property name="height">0.322in</property>
<property name="width">5.968in</property>
<column id="5"/>
<row id="6">
<property name="height">0.322in</property>
<property name="verticalAlign">text-bottom</property>
<cell id="7">
<property name="verticalAlign">top</property>
<label id="8">
<property name="fontWeight">bold</property>
<property name="textUnderline">underline</property>
<property name="textAlign">center</property>
<text-property name="text">Report Header</text-property>
</label>
</cell>
</row>
</grid>
<table id="42">
<property name="dataSet">dataStock2</property>
<list-property name="boundDataColumns">
<structure>
<property name="name">columnOpen</property>
<text-property name="displayName">Open</text-property>
<expression name="expression" type="javascript">dataSetRow["columnOpen"]</expression>
<property name="dataType">decimal</property>
</structure>
</list-property>
<column id="49"/>
<header>
<row id="43">
<cell id="44">
<label id="50">
<text-property name="text">Open</text-property>
</label>
</cell>
</row>
</header>
<detail>
<row id="45">
<cell id="46">
<data id="51">
<property name="resultSetColumn">columnOpen</property>
</data>
</cell>
</row>
</detail>
<footer>
<row id="47">
<cell id="48"/>
</row>
</footer>
</table>
</body>
</report>