Skip to main content



      Home
Home » Archived » BIRT » Table of contents
Table of contents [message #146133] Mon, 20 March 2006 15:44 Go to next message
Eclipse UserFriend
Hi. I couldn't figure it out how the "table of elements" attribute works.
can anybody help me out? i'm trying to create a table of contents. what do
i have to do to have it created? thank you.

cristian
Re: Table of contents [message #146287 is a reply to message #146133] Tue, 21 March 2006 00:57 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: jasonweathersby.alltel.net

This is a multi-part message in MIME format.
--------------060909030207080101050603
Content-Type: text/plain; charset=ISO-8859-15; format=flowed
Content-Transfer-Encoding: 7bit

Cristian wrote:
> Hi. I couldn't figure it out how the "table of elements" attribute
> works. can anybody help me out? i'm trying to create a table of
> contents. what do i have to do to have it created? thank you.
>
> cristian
>
Cristian
Attached is an example of a TOC item on the group and on the order
number. Just edit the group to see the expression. On the order number
look at the TOC property.

Jason

--------------060909030207080101050603
Content-Type: text/xml;
name="TOCTest.rptdesign"
Content-Transfer-Encoding: 7bit
Content-Disposition: inline;
filename="TOCTest.rptdesign"

<?xml version="1.0" encoding="UTF-8"?>
<!-- Written by Eclipse BIRT 2.0 -->
<report xmlns="http://www.eclipse.org/birt/2005/design" version="3" id="1">
<property name="createdBy">Eclipse BIRT Designer Version 2.0.0 Build &lt;20060106-0544></property>
<property name="units">in</property>
<parameters>
<scalar-parameter name="NullToc" id="78">
<property name="valueType">static</property>
<property name="dataType">string</property>
<property name="format">Unformatted</property>
<property name="controlType">text-box</property>
<property name="defaultValue">no</property>
</scalar-parameter>
</parameters>
<data-sources>
<oda-data-source extensionID="org.eclipse.birt.report.data.oda.jdbc" name="Data Source" id="4">
<property name="odaDriverClass">org.eclipse.birt.report.data.oda.sampledb.Driver </property>
<property name="odaURL">jdbc:classicmodels:sampledb</property>
<property name="odaUser">ClassicModels</property>
</oda-data-source>
</data-sources>
<data-sets>
<oda-data-set extensionID="org.eclipse.birt.report.data.oda.jdbc.JdbcSelectDataSet " name="Data Set" id="5">
<property name="dataSource">Data Source</property>
<property name="queryText">select CLASSICMODELS.ORDERS.ORDERNUMBER, CLASSICMODELS.ORDERS.ORDERDATE, CLASSICMODELS.ORDERS.STATUS, CLASSICMODELS.CUSTOMERS.CUSTOMERNUMBER, CLASSICMODELS.CUSTOMERS.CUSTOMERNAME
from ORDERS, CUSTOMERS
Where CLASSICMODELS.CUSTOMERS.CUSTOMERNUMBER = CLASSICMODELS.ORDERS.CUSTOMERNUMBER
</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>
<grid id="80">
<property name="width">100%</property>
<column id="81"/>
<row id="82">
<cell id="83">
<table id="6">
<property name="height">3.166in</property>
<property name="width">6.302in</property>
<property name="dataSet">Data Set</property>
<property name="pageBreakInterval">20</property>
<column id="75"/>
<column id="45"/>
<column id="46">
<property name="width">2.291in</property>
</column>
<column id="49">
<property name="width">1.01in</property>
</column>
<header>
<row id="7">
<property name="backgroundColor">#FF8040</property>
<cell id="70">
<label id="76">
<text-property name="text">CUSTOMERNAME</text-property>
</label>
</cell>
<cell id="8">
<label id="9">
<text-property name="text">ORDERNUMBER</text-property>
</label>
</cell>
<cell id="10">
<label id="11">
<text-property name="text">ORDERDATE</text-property>
</label>
</cell>
<cell id="16">
<label id="17">
<text-property name="text">STATUS</text-property>
</label>
</cell>
</row>
</header>
<group id="52">
<property name="groupName">TestGroup</property>
<property name="interval">none</property>
<property name="sortDirection">asc</property>
<expression name="keyExpr">row["CUSTOMERNAME"]</expression>
<expression name="toc">row["CUSTOMERNAME"] + "--" + row["CUSTOMERNUMBER"]</expression>
<header>
<row id="53">
<property name="backgroundColor">#8080FF</property>
<cell id="71">
<data id="77">
<expression name="valueExpr">row["CUSTOMERNAME"]</expression>
</data>
</cell>
<cell id="54"/>
<cell id="55"/>
<cell id="58"/>
</row>
</header>
<footer>
<row id="61">
<cell id="73"/>
<cell id="62"/>
<cell id="63"/>
<cell id="66"/>
</row>
</footer>
</group>
<detail>
<row id="22">
<list-property name="highlightRules">
<structure>
<property name="operator">eq</property>
<property name="backgroundColor">#C0C0C0</property>
<expression name="testExpr">row[0]%2</expression>
<expression name="value1">0</expression>
</structure>
</list-property>
<cell id="72"/>
<cell id="23">
<data id="24">
<expression name="toc">"Order: " + row["ORDERNUMBER"]</expression>
<expression name="valueExpr">row["ORDERNUMBER"]</expression>
</data>
</cell>
<cell id="25">
<data id="26">
<expression name="valueExpr">row["ORDERDATE"]</expression>
</data>
</cell>
<cell id="31">
<data id="32">
<expression name="valueExpr">row["STATUS"]</expression>
</data>
</cell>
</row>
</detail>
<footer>
<row id="37">
<property name="height">2.041in</property>
<cell id="74"/>
<cell id="38"/>
<cell id="39"/>
<cell id="42"/>
</row>
</footer>
</table>
</cell>
</row>
</grid>
</body>
</report>

--------------060909030207080101050603--
Re: Table of contents [message #146305 is a reply to message #146133] Tue, 21 March 2006 01:10 Go to previous message
Eclipse UserFriend
Originally posted by: jasonweathersby.alltel.net

Cristian wrote:
> Hi. I couldn't figure it out how the "table of elements" attribute
> works. can anybody help me out? i'm trying to create a table of
> contents. what do i have to do to have it created? thank you.
>
> cristian
>
Chaffs,

I don't know a simple way of applying all style elements at once at
runtime, but you can change the properties you describe individually by
using this.getStyle().fontFamily=".." .backgroundColor=".." etc. Take a
look at the report scripting page.
http://www.eclipse.org/birt/phoenix/deploy/reportScripting.p hp
Previous Topic:saving reports for later viewing?
Next Topic:BIRT in a standalone application
Goto Forum:
  


Current Time: Tue Mar 11 07:18:14 EDT 2025

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

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

Back to the top