Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » BIRT » Nested table dataset cache
Nested table dataset cache [message #644949] Tue, 14 December 2010 22:48 Go to next message
Pinny Markowitz is currently offline Pinny MarkowitzFriend
Messages: 28
Registered: July 2009
Junior Member
Is there any way to have a nested table filter based on a secondary
dataset - without having to query the database one time for each row in
the parent table?

I am trying to use a filter on the nested table instead of a dataset
parameter:
row['customer_id'] == row._outer['customer_id']

Even though the dataset query for the nested table doesn't change, the
query is still going to the database for each row. Can this data be
cached and reused somehow?
Re: Nested table dataset cache [message #644958 is a reply to message #644949] Wed, 15 December 2010 00:27 Go to previous messageGo to next message
Jason Weathersby is currently offline Jason WeathersbyFriend
Messages: 9167
Registered: July 2009
Senior Member

Pinny,

I just tried this with 2.6.1 and the dataset only opened once. Take a
look at the attached example.

Does the inner table use a different dataset? If it does you may want
to try adding the dataset to a table before your nested tables set its
visibility to hide it, name it and then bind the inner table to the
report item instead of a dataset.

Jason

Jason

<?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
2.6.1.v20100902 Build &lt;2.6.1.v20100915-1750></property>
<property name="units">in</property>
<property name="iconFile">/templates/blank_report.gif</property>
<property name="bidiLayoutOrientation">ltr</property>
<property name="imageDPI">96</property>
<data-sources>
<oda-data-source
extensionID="org.eclipse.birt.report.data.oda.jdbc" name="Data Source"
id="7">
<list-property name="privateDriverProperties">
<ex-property>
<name>contentBidiFormatStr</name>
<value>ILYNN</value>
</ex-property>
<ex-property>
<name>metadataBidiFormatStr</name>
<value>ILYNN</value>
</ex-property>
</list-property>
<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="8">
<list-property name="columnHints">
<structure>
<property name="columnName">ORDERNUMBER</property>
<text-property
name="displayName">ORDERNUMBER</text-property>
<text-property
name="heading">ORDERNUMBER</text-property>
</structure>
<structure>
<property name="columnName">PRODUCTCODE</property>
<text-property
name="displayName">PRODUCTCODE</text-property>
<text-property
name="heading">PRODUCTCODE</text-property>
</structure>
<structure>
<property name="columnName">QUANTITYORDERED</property>
<text-property
name="displayName">QUANTITYORDERED</text-property>
<text-property
name="heading">QUANTITYORDERED</text-property>
</structure>
<structure>
<property name="columnName">PRICEEACH</property>
<text-property
name="displayName">PRICEEACH</text-property>
<text-property name="heading">PRICEEACH</text-property>
</structure>
<structure>
<property name="columnName">ORDERLINENUMBER</property>
<text-property
name="displayName">ORDERLINENUMBER</text-property>
<text-property
name="heading">ORDERLINENUMBER</text-property>
</structure>
</list-property>
<structure name="cachedMetaData">
<list-property name="resultSet">
<structure>
<property name="position">1</property>
<property name="name">ORDERNUMBER</property>
<property name="dataType">integer</property>
</structure>
<structure>
<property name="position">2</property>
<property name="name">PRODUCTCODE</property>
<property name="dataType">string</property>
</structure>
<structure>
<property name="position">3</property>
<property name="name">QUANTITYORDERED</property>
<property name="dataType">integer</property>
</structure>
<structure>
<property name="position">4</property>
<property name="name">PRICEEACH</property>
<property name="dataType">float</property>
</structure>
<structure>
<property name="position">5</property>
<property name="name">ORDERLINENUMBER</property>
<property name="dataType">integer</property>
</structure>
</list-property>
</structure>
<method name="beforeOpen"><![CDATA[importPackage(
Packages.java.io );
out = new PrintWriter( new FileWriter( "c:/test/cachenestedevents.txt",
true ) );
out.println( "beforeOpen Event");
out.close();
]]></method>
<property name="dataSource">Data Source</property>
<list-property name="resultSet">
<structure>
<property name="position">1</property>
<property name="name">ORDERNUMBER</property>
<property name="nativeName">ORDERNUMBER</property>
<property name="dataType">integer</property>
<property name="nativeDataType">4</property>
</structure>
<structure>
<property name="position">2</property>
<property name="name">PRODUCTCODE</property>
<property name="nativeName">PRODUCTCODE</property>
<property name="dataType">string</property>
<property name="nativeDataType">12</property>
</structure>
<structure>
<property name="position">3</property>
<property name="name">QUANTITYORDERED</property>
<property name="nativeName">QUANTITYORDERED</property>
<property name="dataType">integer</property>
<property name="nativeDataType">4</property>
</structure>
<structure>
<property name="position">4</property>
<property name="name">PRICEEACH</property>
<property name="nativeName">PRICEEACH</property>
<property name="dataType">float</property>
<property name="nativeDataType">8</property>
</structure>
<structure>
<property name="position">5</property>
<property name="name">ORDERLINENUMBER</property>
<property name="nativeName">ORDERLINENUMBER</property>
<property name="dataType">integer</property>
<property name="nativeDataType">5</property>
</structure>
</list-property>
<xml-property name="queryText"><![CDATA[select *
from orderdetails]]></xml-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>ORDERNUMBER</design:name>
<design:position>1</design:position>
<design:nativeDataTypeCode>4</design:nativeDataTypeCode>
<design:precision>10</design:precision>
<design:scale>0</design:scale>
<design:nullability>Nullable</design:nullability>
<design:uiHints>
<design:displayName>ORDERNUMBER</design:displayName>
</design:uiHints>
</design:attributes>
<design:usageHints>
<design:label>ORDERNUMBER</design:label>
<design:formattingHints>
<design:displaySize>11</design:displaySize>
</design:formattingHints>
</design:usageHints>
</design:resultColumnDefinitions>
<design:resultColumnDefinitions>
<design:attributes>
<design:name>PRODUCTCODE</design:name>
<design:position>2</design:position>
<design:nativeDataTypeCode>12</design:nativeDataTypeCode>
<design:precision>15</design:precision>
<design:scale>0</design:scale>
<design:nullability>Nullable</design:nullability>
<design:uiHints>
<design:displayName>PRODUCTCODE</design:displayName>
</design:uiHints>
</design:attributes>
<design:usageHints>
<design:label>PRODUCTCODE</design:label>
<design:formattingHints>
<design:displaySize>15</design:displaySize>
</design:formattingHints>
</design:usageHints>
</design:resultColumnDefinitions>
<design:resultColumnDefinitions>
<design:attributes>
<design:name>QUANTITYORDERED</design:name>
<design:position>3</design:position>
<design:nativeDataTypeCode>4</design:nativeDataTypeCode>
<design:precision>10</design:precision>
<design:scale>0</design:scale>
<design:nullability>Nullable</design:nullability>
<design:uiHints>
<design:displayName>QUANTITYORDERED</design:displayName>
</design:uiHints>
</design:attributes>
<design:usageHints>
<design:label>QUANTITYORDERED</design:label>
<design:formattingHints>
<design:displaySize>11</design:displaySize>
</design:formattingHints>
</design:usageHints>
</design:resultColumnDefinitions>
<design:resultColumnDefinitions>
<design:attributes>
<design:name>PRICEEACH</design:name>
<design:position>4</design:position>
<design:nativeDataTypeCode>8</design:nativeDataTypeCode>
<design:precision>15</design:precision>
<design:scale>0</design:scale>
<design:nullability>Nullable</design:nullability>
<design:uiHints>
<design:displayName>PRICEEACH</design:displayName>
</design:uiHints>
</design:attributes>
<design:usageHints>
<design:label>PRICEEACH</design:label>
<design:formattingHints>
<design:displaySize>22</design:displaySize>
</design:formattingHints>
</design:usageHints>
</design:resultColumnDefinitions>
<design:resultColumnDefinitions>
<design:attributes>
<design:name>ORDERLINENUMBER</design:name>
<design:position>5</design:position>
<design:nativeDataTypeCode>5</design:nativeDataTypeCode>
<design:precision>5</design:precision>
<design:scale>0</design:scale>
<design:nullability>Nullable</design:nullability>
<design:uiHints>
<design:displayName>ORDERLINENUMBER</design:displayName>
</design:uiHints>
</design:attributes>
<design:usageHints>
<design:label>ORDERLINENUMBER</design:label>
<design:formattingHints>
<design:displaySize>6</design:displaySize>
</design:formattingHints>
</design:usageHints>
</design:resultColumnDefinitions>
</design:resultSetColumns>
<design:criteria/>
</design:resultSetDefinitions>
</design:ResultSets>
</model:DesignValues>
]]></xml-property>
</oda-data-set>
</data-sets>
<styles>
<style name="report" id="4">
<property name="fontFamily">sans-serif</property>
<property name="fontSize">10pt</property>
</style>
<style name="crosstab-cell" id="5">
<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="6">
<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>
<table name="outer" id="9">
<property name="dataSet">Data Set</property>
<list-property name="boundDataColumns">
<structure>
<property name="name">ORDERNUMBER</property>
<text-property
name="displayName">ORDERNUMBER</text-property>
<expression name="expression"
type="javascript">dataSetRow["ORDERNUMBER"]</expression >
<property name="dataType">integer</property>
</structure>
<structure>
<property name="name">PRODUCTCODE</property>
<text-property
name="displayName">PRODUCTCODE</text-property>
<expression name="expression"
type="javascript">dataSetRow["PRODUCTCODE"]</expression >
<property name="dataType">string</property>
</structure>
<structure>
<property name="name">QUANTITYORDERED</property>
<text-property
name="displayName">QUANTITYORDERED</text-property>
<expression name="expression"
type="javascript">dataSetRow["QUANTITYORDERED"]</expression >
<property name="dataType">integer</property>
</structure>
<structure>
<property name="name">PRICEEACH</property>
<text-property
name="displayName">PRICEEACH</text-property>
<expression name="expression"
type="javascript">dataSetRow["PRICEEACH"]</expression>
<property name="dataType">float</property>
</structure>
<structure>
<property name="name">ORDERLINENUMBER</property>
<text-property
name="displayName">ORDERLINENUMBER</text-property>
<expression name="expression"
type="javascript">dataSetRow["ORDERLINENUMBER"]</expression >
<property name="dataType">integer</property>
</structure>
</list-property>
<column id="38"/>
<column id="46"/>
<header>
<row id="10">
<cell id="11">
<label id="12">
<text-property
name="text">ORDERNUMBER</text-property>
</label>
</cell>
<cell id="43"/>
</row>
</header>
<detail>
<row id="21">
<cell id="22">
<data id="23">
<property name="whiteSpace">nowrap</property>
<property
name="resultSetColumn">ORDERNUMBER</property>
</data>
</cell>
<cell id="44">
<table name="inner" id="47">
<property name="dataSet">Data Set</property>
<list-property name="boundDataColumns">
<structure>
<property
name="name">ORDERNUMBER</property>
<text-property
name="displayName">ORDERNUMBER</text-property>
<expression name="expression"
type="javascript">dataSetRow["ORDERNUMBER"]</expression >
<property
name="dataType">integer</property>
</structure>
<structure>
<property
name="name">PRODUCTCODE</property>
<text-property
name="displayName">PRODUCTCODE</text-property>
<expression name="expression"
type="javascript">dataSetRow["PRODUCTCODE"]</expression >
<property
name="dataType">string</property>
</structure>
<structure>
<property
name="name">QUANTITYORDERED</property>
<text-property
name="displayName">QUANTITYORDERED</text-property>
<expression name="expression"
type="javascript">dataSetRow["QUANTITYORDERED"]</expression >
<property
name="dataType">integer</property>
</structure>
<structure>
<property
name="name">PRICEEACH</property>
<text-property
name="displayName">PRICEEACH</text-property>
<expression name="expression"
type="javascript">dataSetRow["PRICEEACH"]</expression>
<property
name="dataType">float</property>
</structure>
<structure>
<property
name="name">ORDERLINENUMBER</property>
<text-property
name="displayName">ORDERLINENUMBER</text-property>
<expression name="expression"
type="javascript">dataSetRow["ORDERLINENUMBER"]</expression >
<property
name="dataType">integer</property>
</structure>
</list-property>
<list-property name="filter">
<structure>
<property name="operator">eq</property>
<expression name="expr"
type="javascript">row["ORDERNUMBER"]</expression>
<simple-property-list name="value1">

<value>row._outer["ORDERNUMBER"]</value>
</simple-property-list>
</structure>
</list-property>
<column id="76"/>
<column id="77"/>
<column id="78"/>
<column id="79"/>
<column id="80"/>
<header>
<row id="48">
<cell id="49">
<label id="50">
<text-property
name="text">ORDERNUMBER</text-property>
</label>
</cell>
<cell id="51">
<label id="52">
<text-property
name="text">PRODUCTCODE</text-property>
</label>
</cell>
<cell id="53">
<label id="54">
<text-property
name="text">QUANTITYORDERED</text-property>
</label>
</cell>
<cell id="55">
<label id="56">
<text-property
name="text">PRICEEACH</text-property>
</label>
</cell>
<cell id="57">
<label id="58">
<text-property
name="text">ORDERLINENUMBER</text-property>
</label>
</cell>
</row>
</header>
<detail>
<row id="59">
<cell id="60">
<data id="61">
<property
name="whiteSpace">nowrap</property>
<property
name="resultSetColumn">ORDERNUMBER</property>
</data>
</cell>
<cell id="62">
<data id="63">
<property
name="whiteSpace">nowrap</property>
<property
name="resultSetColumn">PRODUCTCODE</property>
</data>
</cell>
<cell id="64">
<data id="65">
<property
name="whiteSpace">nowrap</property>
<property
name="resultSetColumn">QUANTITYORDERED</property>
</data>
</cell>
<cell id="66">
<data id="67">
<property
name="whiteSpace">nowrap</property>
<property
name="resultSetColumn">PRICEEACH</property>
</data>
</cell>
<cell id="68">
<data id="69">
<property
name="whiteSpace">nowrap</property>
<property
name="resultSetColumn">ORDERLINENUMBER</property>
</data>
</cell>
</row>
</detail>
<footer>
<row id="70">
<cell id="71"/>
<cell id="72"/>
<cell id="73"/>
<cell id="74"/>
<cell id="75"/>
</row>
</footer>
</table>
</cell>
</row>
</detail>
<footer>
<row id="32">
<cell id="33"/>
<cell id="45"/>
</row>
</footer>
</table>
</body>
</report>


On 12/14/2010 5:48 PM, Pinny Markowitz wrote:
> Is there any way to have a nested table filter based on a secondary
> dataset - without having to query the database one time for each row in
> the parent table?
>
> I am trying to use a filter on the nested table instead of a dataset
> parameter:
> row['customer_id'] == row._outer['customer_id']
>
> Even though the dataset query for the nested table doesn't change, the
> query is still going to the database for each row. Can this data be
> cached and reused somehow?
Re: Nested table dataset cache [message #644960 is a reply to message #644958] Wed, 15 December 2010 00:44 Go to previous messageGo to next message
Jason Weathersby is currently offline Jason WeathersbyFriend
Messages: 9167
Registered: July 2009
Senior Member

Pinny

Dont bother with the report item binding. You will not be able to put a
filter on it. One method I tried was to take the dataset used in the
inner query and bind it to a table and delete everything in the table
but the footer row. Then drag your nested tables into this footer. It
looks like it may work. Probably faster to do a join in the dataset but
it may work for you. Take a look at the attached example.

Jason


<?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
2.6.1.v20100902 Build &lt;2.6.1.v20100915-1750></property>
<property name="units">in</property>
<property name="iconFile">/templates/blank_report.gif</property>
<property name="bidiLayoutOrientation">ltr</property>
<property name="imageDPI">96</property>
<data-sources>
<oda-data-source
extensionID="org.eclipse.birt.report.data.oda.jdbc" name="Data Source"
id="7">
<list-property name="privateDriverProperties">
<ex-property>
<name>contentBidiFormatStr</name>
<value>ILYNN</value>
</ex-property>
<ex-property>
<name>metadataBidiFormatStr</name>
<value>ILYNN</value>
</ex-property>
</list-property>
<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="8">
<list-property name="columnHints">
<structure>
<property name="columnName">ORDERNUMBER</property>
<text-property
name="displayName">ORDERNUMBER</text-property>
<text-property
name="heading">ORDERNUMBER</text-property>
</structure>
<structure>
<property name="columnName">PRODUCTCODE</property>
<text-property
name="displayName">PRODUCTCODE</text-property>
<text-property
name="heading">PRODUCTCODE</text-property>
</structure>
<structure>
<property name="columnName">QUANTITYORDERED</property>
<text-property
name="displayName">QUANTITYORDERED</text-property>
<text-property
name="heading">QUANTITYORDERED</text-property>
</structure>
<structure>
<property name="columnName">PRICEEACH</property>
<text-property
name="displayName">PRICEEACH</text-property>
<text-property name="heading">PRICEEACH</text-property>
</structure>
<structure>
<property name="columnName">ORDERLINENUMBER</property>
<text-property
name="displayName">ORDERLINENUMBER</text-property>
<text-property
name="heading">ORDERLINENUMBER</text-property>
</structure>
</list-property>
<structure name="cachedMetaData">
<list-property name="resultSet">
<structure>
<property name="position">1</property>
<property name="name">ORDERNUMBER</property>
<property name="dataType">integer</property>
</structure>
<structure>
<property name="position">2</property>
<property name="name">PRODUCTCODE</property>
<property name="dataType">string</property>
</structure>
<structure>
<property name="position">3</property>
<property name="name">QUANTITYORDERED</property>
<property name="dataType">integer</property>
</structure>
<structure>
<property name="position">4</property>
<property name="name">PRICEEACH</property>
<property name="dataType">float</property>
</structure>
<structure>
<property name="position">5</property>
<property name="name">ORDERLINENUMBER</property>
<property name="dataType">integer</property>
</structure>
</list-property>
</structure>
<method name="beforeOpen"><![CDATA[importPackage(
Packages.java.io );
out = new PrintWriter( new FileWriter( "c:/test/cachenestedevents.txt",
true ) );
out.println( "beforeOpen Event");
out.close();
]]></method>
<property name="dataSource">Data Source</property>
<list-property name="resultSet">
<structure>
<property name="position">1</property>
<property name="name">ORDERNUMBER</property>
<property name="nativeName">ORDERNUMBER</property>
<property name="dataType">integer</property>
<property name="nativeDataType">4</property>
</structure>
<structure>
<property name="position">2</property>
<property name="name">PRODUCTCODE</property>
<property name="nativeName">PRODUCTCODE</property>
<property name="dataType">string</property>
<property name="nativeDataType">12</property>
</structure>
<structure>
<property name="position">3</property>
<property name="name">QUANTITYORDERED</property>
<property name="nativeName">QUANTITYORDERED</property>
<property name="dataType">integer</property>
<property name="nativeDataType">4</property>
</structure>
<structure>
<property name="position">4</property>
<property name="name">PRICEEACH</property>
<property name="nativeName">PRICEEACH</property>
<property name="dataType">float</property>
<property name="nativeDataType">8</property>
</structure>
<structure>
<property name="position">5</property>
<property name="name">ORDERLINENUMBER</property>
<property name="nativeName">ORDERLINENUMBER</property>
<property name="dataType">integer</property>
<property name="nativeDataType">5</property>
</structure>
</list-property>
<xml-property name="queryText"><![CDATA[select *
from orderdetails]]></xml-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>ORDERNUMBER</design:name>
<design:position>1</design:position>
<design:nativeDataTypeCode>4</design:nativeDataTypeCode>
<design:precision>10</design:precision>
<design:scale>0</design:scale>
<design:nullability>Nullable</design:nullability>
<design:uiHints>
<design:displayName>ORDERNUMBER</design:displayName>
</design:uiHints>
</design:attributes>
<design:usageHints>
<design:label>ORDERNUMBER</design:label>
<design:formattingHints>
<design:displaySize>11</design:displaySize>
</design:formattingHints>
</design:usageHints>
</design:resultColumnDefinitions>
<design:resultColumnDefinitions>
<design:attributes>
<design:name>PRODUCTCODE</design:name>
<design:position>2</design:position>
<design:nativeDataTypeCode>12</design:nativeDataTypeCode>
<design:precision>15</design:precision>
<design:scale>0</design:scale>
<design:nullability>Nullable</design:nullability>
<design:uiHints>
<design:displayName>PRODUCTCODE</design:displayName>
</design:uiHints>
</design:attributes>
<design:usageHints>
<design:label>PRODUCTCODE</design:label>
<design:formattingHints>
<design:displaySize>15</design:displaySize>
</design:formattingHints>
</design:usageHints>
</design:resultColumnDefinitions>
<design:resultColumnDefinitions>
<design:attributes>
<design:name>QUANTITYORDERED</design:name>
<design:position>3</design:position>
<design:nativeDataTypeCode>4</design:nativeDataTypeCode>
<design:precision>10</design:precision>
<design:scale>0</design:scale>
<design:nullability>Nullable</design:nullability>
<design:uiHints>
<design:displayName>QUANTITYORDERED</design:displayName>
</design:uiHints>
</design:attributes>
<design:usageHints>
<design:label>QUANTITYORDERED</design:label>
<design:formattingHints>
<design:displaySize>11</design:displaySize>
</design:formattingHints>
</design:usageHints>
</design:resultColumnDefinitions>
<design:resultColumnDefinitions>
<design:attributes>
<design:name>PRICEEACH</design:name>
<design:position>4</design:position>
<design:nativeDataTypeCode>8</design:nativeDataTypeCode>
<design:precision>15</design:precision>
<design:scale>0</design:scale>
<design:nullability>Nullable</design:nullability>
<design:uiHints>
<design:displayName>PRICEEACH</design:displayName>
</design:uiHints>
</design:attributes>
<design:usageHints>
<design:label>PRICEEACH</design:label>
<design:formattingHints>
<design:displaySize>22</design:displaySize>
</design:formattingHints>
</design:usageHints>
</design:resultColumnDefinitions>
<design:resultColumnDefinitions>
<design:attributes>
<design:name>ORDERLINENUMBER</design:name>
<design:position>5</design:position>
<design:nativeDataTypeCode>5</design:nativeDataTypeCode>
<design:precision>5</design:precision>
<design:scale>0</design:scale>
<design:nullability>Nullable</design:nullability>
<design:uiHints>
<design:displayName>ORDERLINENUMBER</design:displayName>
</design:uiHints>
</design:attributes>
<design:usageHints>
<design:label>ORDERLINENUMBER</design:label>
<design:formattingHints>
<design:displaySize>6</design:displaySize>
</design:formattingHints>
</design:usageHints>
</design:resultColumnDefinitions>
</design:resultSetColumns>
<design:criteria/>
</design:resultSetDefinitions>
</design:ResultSets>
</model:DesignValues>
]]></xml-property>
</oda-data-set>
<oda-data-set
extensionID="org.eclipse.birt.report.data.oda.jdbc.JdbcSelectDataSet "
name="orders" id="149">
<list-property name="columnHints">
<structure>
<property name="columnName">ORDERNUMBER</property>
<text-property
name="displayName">ORDERNUMBER</text-property>
<text-property
name="heading">ORDERNUMBER</text-property>
</structure>
<structure>
<property name="columnName">ORDERDATE</property>
<text-property
name="displayName">ORDERDATE</text-property>
<text-property name="heading">ORDERDATE</text-property>
</structure>
<structure>
<property name="columnName">REQUIREDDATE</property>
<text-property
name="displayName">REQUIREDDATE</text-property>
<text-property
name="heading">REQUIREDDATE</text-property>
</structure>
<structure>
<property name="columnName">SHIPPEDDATE</property>
<text-property
name="displayName">SHIPPEDDATE</text-property>
<text-property
name="heading">SHIPPEDDATE</text-property>
</structure>
<structure>
<property name="columnName">STATUS</property>
<text-property
name="displayName">STATUS</text-property>
<text-property name="heading">STATUS</text-property>
</structure>
<structure>
<property name="columnName">COMMENTS</property>
<text-property
name="displayName">COMMENTS</text-property>
<text-property name="heading">COMMENTS</text-property>
</structure>
<structure>
<property name="columnName">CUSTOMERNUMBER</property>
<text-property
name="displayName">CUSTOMERNUMBER</text-property>
<text-property
name="heading">CUSTOMERNUMBER</text-property>
</structure>
</list-property>
<structure name="cachedMetaData">
<list-property name="resultSet">
<structure>
<property name="position">1</property>
<property name="name">ORDERNUMBER</property>
<property name="dataType">integer</property>
</structure>
<structure>
<property name="position">2</property>
<property name="name">ORDERDATE</property>
<property name="dataType">date</property>
</structure>
<structure>
<property name="position">3</property>
<property name="name">REQUIREDDATE</property>
<property name="dataType">date</property>
</structure>
<structure>
<property name="position">4</property>
<property name="name">SHIPPEDDATE</property>
<property name="dataType">date</property>
</structure>
<structure>
<property name="position">5</property>
<property name="name">STATUS</property>
<property name="dataType">string</property>
</structure>
<structure>
<property name="position">6</property>
<property name="name">COMMENTS</property>
<property name="dataType">string</property>
</structure>
<structure>
<property name="position">7</property>
<property name="name">CUSTOMERNUMBER</property>
<property name="dataType">integer</property>
</structure>
</list-property>
</structure>
<method name="beforeOpen"><![CDATA[importPackage(
Packages.java.io );
out = new PrintWriter( new FileWriter( "c:/test/2cachenestedevents.txt",
true ) );
out.println( "beforeOpen Event");
out.close();]]></method>
<property name="dataSource">Data Source</property>
<list-property name="resultSet">
<structure>
<property name="position">1</property>
<property name="name">ORDERNUMBER</property>
<property name="nativeName">ORDERNUMBER</property>
<property name="dataType">integer</property>
<property name="nativeDataType">4</property>
</structure>
<structure>
<property name="position">2</property>
<property name="name">ORDERDATE</property>
<property name="nativeName">ORDERDATE</property>
<property name="dataType">date</property>
<property name="nativeDataType">91</property>
</structure>
<structure>
<property name="position">3</property>
<property name="name">REQUIREDDATE</property>
<property name="nativeName">REQUIREDDATE</property>
<property name="dataType">date</property>
<property name="nativeDataType">91</property>
</structure>
<structure>
<property name="position">4</property>
<property name="name">SHIPPEDDATE</property>
<property name="nativeName">SHIPPEDDATE</property>
<property name="dataType">date</property>
<property name="nativeDataType">91</property>
</structure>
<structure>
<property name="position">5</property>
<property name="name">STATUS</property>
<property name="nativeName">STATUS</property>
<property name="dataType">string</property>
<property name="nativeDataType">12</property>
</structure>
<structure>
<property name="position">6</property>
<property name="name">COMMENTS</property>
<property name="nativeName">COMMENTS</property>
<property name="dataType">string</property>
<property name="nativeDataType">12</property>
</structure>
<structure>
<property name="position">7</property>
<property name="name">CUSTOMERNUMBER</property>
<property name="nativeName">CUSTOMERNUMBER</property>
<property name="dataType">integer</property>
<property name="nativeDataType">4</property>
</structure>
</list-property>
<xml-property name="queryText"><![CDATA[select *
from orders]]></xml-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>ORDERNUMBER</design:name>
<design:position>1</design:position>
<design:nativeDataTypeCode>4</design:nativeDataTypeCode>
<design:precision>10</design:precision>
<design:scale>0</design:scale>
<design:nullability>Nullable</design:nullability>
<design:uiHints>
<design:displayName>ORDERNUMBER</design:displayName>
</design:uiHints>
</design:attributes>
<design:usageHints>
<design:label>ORDERNUMBER</design:label>
<design:formattingHints>
<design:displaySize>11</design:displaySize>
</design:formattingHints>
</design:usageHints>
</design:resultColumnDefinitions>
<design:resultColumnDefinitions>
<design:attributes>
<design:name>ORDERDATE</design:name>
<design:position>2</design:position>
<design:nativeDataTypeCode>91</design:nativeDataTypeCode>
<design:precision>10</design:precision>
<design:scale>0</design:scale>
<design:nullability>Nullable</design:nullability>
<design:uiHints>
<design:displayName>ORDERDATE</design:displayName>
</design:uiHints>
</design:attributes>
<design:usageHints>
<design:label>ORDERDATE</design:label>
<design:formattingHints>
<design:displaySize>10</design:displaySize>
</design:formattingHints>
</design:usageHints>
</design:resultColumnDefinitions>
<design:resultColumnDefinitions>
<design:attributes>
<design:name>REQUIREDDATE</design:name>
<design:position>3</design:position>
<design:nativeDataTypeCode>91</design:nativeDataTypeCode>
<design:precision>10</design:precision>
<design:scale>0</design:scale>
<design:nullability>Nullable</design:nullability>
<design:uiHints>
<design:displayName>REQUIREDDATE</design:displayName>
</design:uiHints>
</design:attributes>
<design:usageHints>
<design:label>REQUIREDDATE</design:label>
<design:formattingHints>
<design:displaySize>10</design:displaySize>
</design:formattingHints>
</design:usageHints>
</design:resultColumnDefinitions>
<design:resultColumnDefinitions>
<design:attributes>
<design:name>SHIPPEDDATE</design:name>
<design:position>4</design:position>
<design:nativeDataTypeCode>91</design:nativeDataTypeCode>
<design:precision>10</design:precision>
<design:scale>0</design:scale>
<design:nullability>Nullable</design:nullability>
<design:uiHints>
<design:displayName>SHIPPEDDATE</design:displayName>
</design:uiHints>
</design:attributes>
<design:usageHints>
<design:label>SHIPPEDDATE</design:label>
<design:formattingHints>
<design:displaySize>10</design:displaySize>
</design:formattingHints>
</design:usageHints>
</design:resultColumnDefinitions>
<design:resultColumnDefinitions>
<design:attributes>
<design:name>STATUS</design:name>
<design:position>5</design:position>
<design:nativeDataTypeCode>12</design:nativeDataTypeCode>
<design:precision>15</design:precision>
<design:scale>0</design:scale>
<design:nullability>Nullable</design:nullability>
<design:uiHints>
<design:displayName>STATUS</design:displayName>
</design:uiHints>
</design:attributes>
<design:usageHints>
<design:label>STATUS</design:label>
<design:formattingHints>
<design:displaySize>15</design:displaySize>
</design:formattingHints>
</design:usageHints>
</design:resultColumnDefinitions>
<design:resultColumnDefinitions>
<design:attributes>
<design:name>COMMENTS</design:name>
<design:position>6</design:position>
<design:nativeDataTypeCode>12</design:nativeDataTypeCode>
<design:precision>32700</design:precision>
<design:scale>0</design:scale>
<design:nullability>Nullable</design:nullability>
<design:uiHints>
<design:displayName>COMMENTS</design:displayName>
</design:uiHints>
</design:attributes>
<design:usageHints>
<design:label>COMMENTS</design:label>
<design:formattingHints>
<design:displaySize>32700</design:displaySize>
</design:formattingHints>
</design:usageHints>
</design:resultColumnDefinitions>
<design:resultColumnDefinitions>
<design:attributes>
<design:name>CUSTOMERNUMBER</design:name>
<design:position>7</design:position>
<design:nativeDataTypeCode>4</design:nativeDataTypeCode>
<design:precision>10</design:precision>
<design:scale>0</design:scale>
<design:nullability>Nullable</design:nullability>
<design:uiHints>
<design:displayName>CUSTOMERNUMBER</design:displayName>
</design:uiHints>
</design:attributes>
<design:usageHints>
<design:label>CUSTOMERNUMBER</design:label>
<design:formattingHints>
<design:displaySize>11</design:displaySize>
</design:formattingHints>
</design:usageHints>
</design:resultColumnDefinitions>
</design:resultSetColumns>
<design:criteria/>
</design:resultSetDefinitions>
</design:ResultSets>
</model:DesignValues>
]]></xml-property>
</oda-data-set>
</data-sets>
<styles>
<style name="report" id="4">
<property name="fontFamily">sans-serif</property>
<property name="fontSize">10pt</property>
</style>
<style name="crosstab-cell" id="5">
<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="6">
<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>
<table id="280">
<property name="dataSet">orders</property>
<list-property name="boundDataColumns">
<structure>
<property name="name">ORDERNUMBER</property>
<text-property
name="displayName">ORDERNUMBER</text-property>
<expression name="expression"
type="javascript">dataSetRow["ORDERNUMBER"]</expression >
<property name="dataType">integer</property>
</structure>
<structure>
<property name="name">ORDERDATE</property>
<text-property
name="displayName">ORDERDATE</text-property>
<expression name="expression"
type="javascript">dataSetRow["ORDERDATE"]</expression>
<property name="dataType">date</property>
</structure>
<structure>
<property name="name">REQUIREDDATE</property>
<text-property
name="displayName">REQUIREDDATE</text-property>
<expression name="expression"
type="javascript">dataSetRow["REQUIREDDATE"]</expression >
<property name="dataType">date</property>
</structure>
<structure>
<property name="name">SHIPPEDDATE</property>
<text-property
name="displayName">SHIPPEDDATE</text-property>
<expression name="expression"
type="javascript">dataSetRow["SHIPPEDDATE"]</expression >
<property name="dataType">date</property>
</structure>
<structure>
<property name="name">STATUS</property>
<text-property
name="displayName">STATUS</text-property>
<expression name="expression"
type="javascript">dataSetRow["STATUS"]</expression>
<property name="dataType">string</property>
</structure>
<structure>
<property name="name">COMMENTS</property>
<text-property
name="displayName">COMMENTS</text-property>
<expression name="expression"
type="javascript">dataSetRow["COMMENTS"]</expression>
<property name="dataType">string</property>
</structure>
<structure>
<property name="name">CUSTOMERNUMBER</property>
<text-property
name="displayName">CUSTOMERNUMBER</text-property>
<expression name="expression"
type="javascript">dataSetRow["CUSTOMERNUMBER"]</expression >
<property name="dataType">integer</property>
</structure>
</list-property>
<column id="319"/>
<footer>
<row id="311">
<cell id="312">
<table name="myouter" id="150">
<property name="dataSet">Data Set</property>
<list-property name="boundDataColumns">
<structure>
<property
name="name">ORDERNUMBER</property>
<text-property
name="displayName">ORDERNUMBER</text-property>
<expression name="expression"
type="javascript">dataSetRow["ORDERNUMBER"]</expression >
<property
name="dataType">integer</property>
</structure>
<structure>
<property
name="name">PRODUCTCODE</property>
<text-property
name="displayName">PRODUCTCODE</text-property>
<expression name="expression"
type="javascript">dataSetRow["PRODUCTCODE"]</expression >
<property
name="dataType">string</property>
</structure>
<structure>
<property
name="name">QUANTITYORDERED</property>
<text-property
name="displayName">QUANTITYORDERED</text-property>
<expression name="expression"
type="javascript">dataSetRow["QUANTITYORDERED"]</expression >
<property
name="dataType">integer</property>
</structure>
<structure>
<property
name="name">PRICEEACH</property>
<text-property
name="displayName">PRICEEACH</text-property>
<expression name="expression"
type="javascript">dataSetRow["PRICEEACH"]</expression>
<property
name="dataType">float</property>
</structure>
<structure>
<property
name="name">ORDERLINENUMBER</property>
<text-property
name="displayName">ORDERLINENUMBER</text-property>
<expression name="expression"
type="javascript">dataSetRow["ORDERLINENUMBER"]</expression >
<property
name="dataType">integer</property>
</structure>
</list-property>
<column id="179"/>
<column id="187"/>
<header>
<row id="151">
<cell id="152">
<label id="153">
<text-property
name="text">ORDERNUMBER</text-property>
</label>
</cell>
<cell id="184"/>
</row>
</header>
<detail>
<row id="162">
<cell id="163">
<data id="164">
<property
name="whiteSpace">nowrap</property>
<property
name="resultSetColumn">ORDERNUMBER</property>
</data>
</cell>
<cell id="185">
<table name="myinner" id="188">
<property
name="dataSet">orders</property>
<list-property
name="boundDataColumns">
<structure>
<property
name="name">ORDERNUMBER</property>
<text-property
name="displayName">ORDERNUMBER</text-property>
<expression
name="expression" type="javascript">dataSetRow["ORDERNUMBER"]</expression >
<property
name="dataType">integer</property>
</structure>
<structure>
<property
name="name">ORDERDATE</property>
<text-property
name="displayName">ORDERDATE</text-property>
<expression
name="expression" type="javascript">dataSetRow["ORDERDATE"]</expression>
<property
name="dataType">date</property>
</structure>
<structure>
<property
name="name">REQUIREDDATE</property>
<text-property
name="displayName">REQUIREDDATE</text-property>
<expression
name="expression" type="javascript">dataSetRow["REQUIREDDATE"]</expression >
<property
name="dataType">date</property>
</structure>
<structure>
<property
name="name">SHIPPEDDATE</property>
<text-property
name="displayName">SHIPPEDDATE</text-property>
<expression
name="expression" type="javascript">dataSetRow["SHIPPEDDATE"]</expression >
<property
name="dataType">date</property>
</structure>
<structure>
<property
name="name">STATUS</property>
<text-property
name="displayName">STATUS</text-property>
<expression
name="expression" type="javascript">dataSetRow["STATUS"]</expression>
<property
name="dataType">string</property>
</structure>
<structure>
<property
name="name">COMMENTS</property>
<text-property
name="displayName">COMMENTS</text-property>
<expression
name="expression" type="javascript">dataSetRow["COMMENTS"]</expression>
<property
name="dataType">string</property>
</structure>
<structure>
<property
name="name">CUSTOMERNUMBER</property>
<text-property
name="displayName">CUSTOMERNUMBER</text-property>
<expression
name="expression"
type="javascript">dataSetRow["CUSTOMERNUMBER"]</expression >
<property
name="dataType">integer</property>
</structure>
</list-property>
<list-property name="filter">
<structure>
<property
name="operator">eq</property>
<expression
name="expr" type="javascript">row["ORDERNUMBER"]</expression>

<simple-property-list name="value1">

<value>row._outer["ORDERNUMBER"]</value>
</simple-property-list>
</structure>
</list-property>
<column id="227"/>
<column id="228"/>
<column id="233"/>
<header>
<row id="189">
<cell id="190">
<label id="191">

<text-property name="text">ORDERNUMBER</text-property>
</label>
</cell>
<cell id="192">
<label id="193">

<text-property name="text">ORDERDATE</text-property>
</label>
</cell>
<cell id="202">
<label id="203">

<text-property name="text">CUSTOMERNUMBER</text-property>
</label>
</cell>
</row>
</header>
<detail>
<row id="204">
<property
name="backgroundColor">#FF8080</property>
<cell id="205">
<data id="206">
<property
name="whiteSpace">nowrap</property>
<property
name="resultSetColumn">ORDERNUMBER</property>
</data>
</cell>
<cell id="207">
<data id="208">
<property
name="whiteSpace">nowrap</property>
<property
name="resultSetColumn">ORDERDATE</property>
</data>
</cell>
<cell id="217">
<data id="218">
<property
name="whiteSpace">nowrap</property>
<property
name="resultSetColumn">CUSTOMERNUMBER</property>
</data>
</cell>
</row>
</detail>
<footer>
<row id="219">
<cell id="220"/>
<cell id="221"/>
<cell id="226"/>
</row>
</footer>
</table>
</cell>
</row>
</detail>
<footer>
<row id="173">
<cell id="174"/>
<cell id="186"/>
</row>
</footer>
</table>
</cell>
</row>
</footer>
</table>
</body>
</report>


On 12/14/2010 7:27 PM, Jason Weathersby wrote:
> Pinny,
>
> I just tried this with 2.6.1 and the dataset only opened once. Take a
> look at the attached example.
>
> Does the inner table use a different dataset? If it does you may want to
> try adding the dataset to a table before your nested tables set its
> visibility to hide it, name it and then bind the inner table to the
> report item instead of a dataset.
>
> Jason
>
> Jason
>
> <?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 2.6.1.v20100902
> Build &lt;2.6.1.v20100915-1750></property>
> <property name="units">in</property>
> <property name="iconFile">/templates/blank_report.gif</property>
> <property name="bidiLayoutOrientation">ltr</property>
> <property name="imageDPI">96</property>
> <data-sources>
> <oda-data-source extensionID="org.eclipse.birt.report.data.oda.jdbc"
> name="Data Source" id="7">
> <list-property name="privateDriverProperties">
> <ex-property>
> <name>contentBidiFormatStr</name>
> <value>ILYNN</value>
> </ex-property>
> <ex-property>
> <name>metadataBidiFormatStr</name>
> <value>ILYNN</value>
> </ex-property>
> </list-property>
> <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="8">
> <list-property name="columnHints">
> <structure>
> <property name="columnName">ORDERNUMBER</property>
> <text-property name="displayName">O
Re: Nested table dataset cache [message #645115 is a reply to message #644960] Wed, 15 December 2010 15:39 Go to previous messageGo to next message
Pinny Markowitz is currently offline Pinny MarkowitzFriend
Messages: 28
Registered: July 2009
Junior Member
Jason

Thanks for responding. Yes, I am using a separate dataset for the
nested table, and using the solution you proposed I am still seeing the
database being queried for each row in the parent table.

A join on the datasets isn't practical since each set holds quite a bit
of detailed data that the other does not. I was actually nesting the
second dataset within a group footer of the parent table because of this.

Do you know of any other approach that might work? Also, is there a
reason that BIRT doesn't allow filtering on bound report items? Thanks!

On 12/14/2010 7:44 PM, Jason Weathersby wrote:
> One method I tried was to take the dataset used in the inner query and
> bind it to a table and delete everything in the table but the footer row
Re: Nested table dataset cache [message #645132 is a reply to message #645115] Wed, 15 December 2010 16:20 Go to previous messageGo to next message
Jason Weathersby is currently offline Jason WeathersbyFriend
Messages: 9167
Registered: July 2009
Senior Member

Pinny,

The last report I posted did not call the query every time. The outer
most table was bound to the same dataset as the innermost table. The
only difference was that is was not filtered.

Jason



On 12/15/2010 10:39 AM, Pinny Markowitz wrote:
> Jason
>
> Thanks for responding. Yes, I am using a separate dataset for the nested
> table, and using the solution you proposed I am still seeing the
> database being queried for each row in the parent table.
>
> A join on the datasets isn't practical since each set holds quite a bit
> of detailed data that the other does not. I was actually nesting the
> second dataset within a group footer of the parent table because of this.
>
> Do you know of any other approach that might work? Also, is there a
> reason that BIRT doesn't allow filtering on bound report items? Thanks!
>
> On 12/14/2010 7:44 PM, Jason Weathersby wrote:
>> One method I tried was to take the dataset used in the inner query and
>> bind it to a table and delete everything in the table but the footer row
>
Re: Nested table dataset cache [message #645145 is a reply to message #645132] Wed, 15 December 2010 17:03 Go to previous messageGo to next message
Pinny Markowitz is currently offline Pinny MarkowitzFriend
Messages: 28
Registered: July 2009
Junior Member
I recreated the scenario you provided and it worked as you said. Adding
filters or nesting within group rows worked as well. For some reason
I'm not seeing this behavior in my own report, which is significantly
more complex. I'll do some more research to see if I can determine
where it is coming from.

Thanks!

On 12/15/2010 11:20 AM, Jason Weathersby wrote:
> Pinny,
>
> The last report I posted did not call the query every time. The outer
> most table was bound to the same dataset as the innermost table. The
> only difference was that is was not filtered.
>
> Jason
>
>
>
> On 12/15/2010 10:39 AM, Pinny Markowitz wrote:
>> Jason
>>
>> Thanks for responding. Yes, I am using a separate dataset for the nested
>> table, and using the solution you proposed I am still seeing the
>> database being queried for each row in the parent table.
>>
>> A join on the datasets isn't practical since each set holds quite a bit
>> of detailed data that the other does not. I was actually nesting the
>> second dataset within a group footer of the parent table because of this.
>>
>> Do you know of any other approach that might work? Also, is there a
>> reason that BIRT doesn't allow filtering on bound report items? Thanks!
>>
>> On 12/14/2010 7:44 PM, Jason Weathersby wrote:
>>> One method I tried was to take the dataset used in the inner query and
>>> bind it to a table and delete everything in the table but the footer row
>>
>
Re: Nested table dataset cache [message #645175 is a reply to message #645145] Wed, 15 December 2010 19:14 Go to previous messageGo to next message
Pinny Markowitz is currently offline Pinny MarkowitzFriend
Messages: 28
Registered: July 2009
Junior Member
I was able to recreate the problem with a simple query. If the outer
table (using same dataset as inner) returns 0 rows using the query, it
will run over and over for each row in the middle table. This is
probably happening because the cache appears to be empty. I was able to
fix it in my case by adding a dummy row that always returns and will be
filtered out. Is this considered a bug?

Thanks for you help!

On 12/15/2010 12:03 PM, Pinny Markowitz wrote:
> I recreated the scenario you provided and it worked as you said. Adding
> filters or nesting within group rows worked as well. For some reason I'm
> not seeing this behavior in my own report, which is significantly more
> complex. I'll do some more research to see if I can determine where it
> is coming from.
>
> Thanks!
>
> On 12/15/2010 11:20 AM, Jason Weathersby wrote:
>> Pinny,
>>
>> The last report I posted did not call the query every time. The outer
>> most table was bound to the same dataset as the innermost table. The
>> only difference was that is was not filtered.
>>
>> Jason
>>
>>
>>
>> On 12/15/2010 10:39 AM, Pinny Markowitz wrote:
>>> Jason
>>>
>>> Thanks for responding. Yes, I am using a separate dataset for the nested
>>> table, and using the solution you proposed I am still seeing the
>>> database being queried for each row in the parent table.
>>>
>>> A join on the datasets isn't practical since each set holds quite a bit
>>> of detailed data that the other does not. I was actually nesting the
>>> second dataset within a group footer of the parent table because of
>>> this.
>>>
>>> Do you know of any other approach that might work? Also, is there a
>>> reason that BIRT doesn't allow filtering on bound report items? Thanks!
>>>
>>> On 12/14/2010 7:44 PM, Jason Weathersby wrote:
>>>> One method I tried was to take the dataset used in the inner query and
>>>> bind it to a table and delete everything in the table but the footer
>>>> row
>>>
>>
>
Re: Nested table dataset cache [message #645176 is a reply to message #645175] Wed, 15 December 2010 19:18 Go to previous messageGo to next message
Jason Weathersby is currently offline Jason WeathersbyFriend
Messages: 9167
Registered: July 2009
Senior Member

Not sure if its a bug, but log it anyways and we may be able to pick it
up as an enhancement.

Jason

On 12/15/2010 2:14 PM, Pinny Markowitz wrote:
> I was able to recreate the problem with a simple query. If the outer
> table (using same dataset as inner) returns 0 rows using the query, it
> will run over and over for each row in the middle table. This is
> probably happening because the cache appears to be empty. I was able to
> fix it in my case by adding a dummy row that always returns and will be
> filtered out. Is this considered a bug?
>
> Thanks for you help!
>
> On 12/15/2010 12:03 PM, Pinny Markowitz wrote:
>> I recreated the scenario you provided and it worked as you said. Adding
>> filters or nesting within group rows worked as well. For some reason I'm
>> not seeing this behavior in my own report, which is significantly more
>> complex. I'll do some more research to see if I can determine where it
>> is coming from.
>>
>> Thanks!
>>
>> On 12/15/2010 11:20 AM, Jason Weathersby wrote:
>>> Pinny,
>>>
>>> The last report I posted did not call the query every time. The outer
>>> most table was bound to the same dataset as the innermost table. The
>>> only difference was that is was not filtered.
>>>
>>> Jason
>>>
>>>
>>>
>>> On 12/15/2010 10:39 AM, Pinny Markowitz wrote:
>>>> Jason
>>>>
>>>> Thanks for responding. Yes, I am using a separate dataset for the
>>>> nested
>>>> table, and using the solution you proposed I am still seeing the
>>>> database being queried for each row in the parent table.
>>>>
>>>> A join on the datasets isn't practical since each set holds quite a bit
>>>> of detailed data that the other does not. I was actually nesting the
>>>> second dataset within a group footer of the parent table because of
>>>> this.
>>>>
>>>> Do you know of any other approach that might work? Also, is there a
>>>> reason that BIRT doesn't allow filtering on bound report items? Thanks!
>>>>
>>>> On 12/14/2010 7:44 PM, Jason Weathersby wrote:
>>>>> One method I tried was to take the dataset used in the inner query and
>>>>> bind it to a table and delete everything in the table but the footer
>>>>> row
>>>>
>>>
>>
>
Re: Nested table dataset cache [message #645185 is a reply to message #645176] Wed, 15 December 2010 19:54 Go to previous messageGo to next message
Pinny Markowitz is currently offline Pinny MarkowitzFriend
Messages: 28
Registered: July 2009
Junior Member
https://bugs.eclipse.org/bugs/show_bug.cgi?id=332678

Thanks again!

On 12/15/2010 2:18 PM, Jason Weathersby wrote:
> Not sure if its a bug, but log it anyways and we may be able to pick it
> up as an enhancement.
>
> Jason
>
> On 12/15/2010 2:14 PM, Pinny Markowitz wrote:
>> I was able to recreate the problem with a simple query. If the outer
>> table (using same dataset as inner) returns 0 rows using the query, it
>> will run over and over for each row in the middle table. This is
>> probably happening because the cache appears to be empty. I was able to
>> fix it in my case by adding a dummy row that always returns and will be
>> filtered out. Is this considered a bug?
>>
>> Thanks for you help!
>>
>> On 12/15/2010 12:03 PM, Pinny Markowitz wrote:
>>> I recreated the scenario you provided and it worked as you said. Adding
>>> filters or nesting within group rows worked as well. For some reason I'm
>>> not seeing this behavior in my own report, which is significantly more
>>> complex. I'll do some more research to see if I can determine where it
>>> is coming from.
>>>
>>> Thanks!
>>>
>>> On 12/15/2010 11:20 AM, Jason Weathersby wrote:
>>>> Pinny,
>>>>
>>>> The last report I posted did not call the query every time. The outer
>>>> most table was bound to the same dataset as the innermost table. The
>>>> only difference was that is was not filtered.
>>>>
>>>> Jason
>>>>
>>>>
>>>>
>>>> On 12/15/2010 10:39 AM, Pinny Markowitz wrote:
>>>>> Jason
>>>>>
>>>>> Thanks for responding. Yes, I am using a separate dataset for the
>>>>> nested
>>>>> table, and using the solution you proposed I am still seeing the
>>>>> database being queried for each row in the parent table.
>>>>>
>>>>> A join on the datasets isn't practical since each set holds quite a
>>>>> bit
>>>>> of detailed data that the other does not. I was actually nesting the
>>>>> second dataset within a group footer of the parent table because of
>>>>> this.
>>>>>
>>>>> Do you know of any other approach that might work? Also, is there a
>>>>> reason that BIRT doesn't allow filtering on bound report items?
>>>>> Thanks!
>>>>>
>>>>> On 12/14/2010 7:44 PM, Jason Weathersby wrote:
>>>>>> One method I tried was to take the dataset used in the inner query
>>>>>> and
>>>>>> bind it to a table and delete everything in the table but the footer
>>>>>> row
>>>>>
>>>>
>>>
>>
>
Re: Nested table dataset cache [message #645196 is a reply to message #645185] Wed, 15 December 2010 21:24 Go to previous message
Jason Weathersby is currently offline Jason WeathersbyFriend
Messages: 9167
Registered: July 2009
Senior Member

Thanks for logging

On 12/15/2010 2:54 PM, Pinny Markowitz wrote:
> https://bugs.eclipse.org/bugs/show_bug.cgi?id=332678
>
> Thanks again!
>
> On 12/15/2010 2:18 PM, Jason Weathersby wrote:
>> Not sure if its a bug, but log it anyways and we may be able to pick it
>> up as an enhancement.
>>
>> Jason
>>
>> On 12/15/2010 2:14 PM, Pinny Markowitz wrote:
>>> I was able to recreate the problem with a simple query. If the outer
>>> table (using same dataset as inner) returns 0 rows using the query, it
>>> will run over and over for each row in the middle table. This is
>>> probably happening because the cache appears to be empty. I was able to
>>> fix it in my case by adding a dummy row that always returns and will be
>>> filtered out. Is this considered a bug?
>>>
>>> Thanks for you help!
>>>
>>> On 12/15/2010 12:03 PM, Pinny Markowitz wrote:
>>>> I recreated the scenario you provided and it worked as you said. Adding
>>>> filters or nesting within group rows worked as well. For some reason
>>>> I'm
>>>> not seeing this behavior in my own report, which is significantly more
>>>> complex. I'll do some more research to see if I can determine where it
>>>> is coming from.
>>>>
>>>> Thanks!
>>>>
>>>> On 12/15/2010 11:20 AM, Jason Weathersby wrote:
>>>>> Pinny,
>>>>>
>>>>> The last report I posted did not call the query every time. The outer
>>>>> most table was bound to the same dataset as the innermost table. The
>>>>> only difference was that is was not filtered.
>>>>>
>>>>> Jason
>>>>>
>>>>>
>>>>>
>>>>> On 12/15/2010 10:39 AM, Pinny Markowitz wrote:
>>>>>> Jason
>>>>>>
>>>>>> Thanks for responding. Yes, I am using a separate dataset for the
>>>>>> nested
>>>>>> table, and using the solution you proposed I am still seeing the
>>>>>> database being queried for each row in the parent table.
>>>>>>
>>>>>> A join on the datasets isn't practical since each set holds quite a
>>>>>> bit
>>>>>> of detailed data that the other does not. I was actually nesting the
>>>>>> second dataset within a group footer of the parent table because of
>>>>>> this.
>>>>>>
>>>>>> Do you know of any other approach that might work? Also, is there a
>>>>>> reason that BIRT doesn't allow filtering on bound report items?
>>>>>> Thanks!
>>>>>>
>>>>>> On 12/14/2010 7:44 PM, Jason Weathersby wrote:
>>>>>>> One method I tried was to take the dataset used in the inner query
>>>>>>> and
>>>>>>> bind it to a table and delete everything in the table but the footer
>>>>>>> row
>>>>>>
>>>>>
>>>>
>>>
>>
>
Previous Topic:Iportal
Next Topic:Server Side Paging
Goto Forum:
  


Current Time: Sat Nov 29 04:05:10 GMT 2014

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

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