Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Archived » BIRT » Problem with joint data set with property binding and viewer servlet
Problem with joint data set with property binding and viewer servlet [message #486405] Thu, 17 September 2009 14:08 Go to next message
Peter Kullmann is currently offline Peter KullmannFriend
Messages: 240
Registered: July 2009
Senior Member
This is a multi-part message in MIME format.
--------------080406060403010504030404
Content-Type: text/plain; charset=ISO-8859-15; format=flowed
Content-Transfer-Encoding: 7bit

Hi,

I have a simple report (attached) with the following specs:
- A single XML datasource where the xml file is given as a parameter
"dataFile" (using property binding)
- Two normal data sets referencing the data source
- A joint dataset based on the first two

The following works as expected:
<birt-viewer>/frameset?__report=test-join-param.rptdesign&dataFile=http://www.w3schools.com/XML/simple.xml

Alternatively you can enter the dataFile parameter when the viewer
prompts for it.

What does not work correctly is when we use <birt-viewer>/run

In this case the property mapping is not performed.

On the other hand: Using a simpler report with an xml data source and
property mapping (but without a joint data set) works in /frameset and
/run equally well.

Thanks for any hints or workarounds
Peter

--------------080406060403010504030404
Content-Type: text/xml; x-mac-type="0"; x-mac-creator="0";
name="test-join-param.rptdesign"
Content-Transfer-Encoding: 7bit
Content-Disposition: inline;
filename="test-join-param.rptdesign"

<?xml version="1.0" encoding="UTF-8"?>
<report xmlns="http://www.eclipse.org/birt/2005/design" version="3.2.20" id="1">
<property name="createdBy">Eclipse BIRT Designer Version 2.5.0.v20090603 Build &lt;2.5.0.v20090617-0630></property>
<property name="units">in</property>
<list-property name="propertyBindings">
<structure>
<property name="name">FILELIST</property>
<property name="id">7</property>
<expression name="value">params["dataFile"]</expression>
</structure>
<structure>
<property name="name">ENCODINGLIST</property>
<property name="id">7</property>
</structure>
<structure>
<property name="name">SCHEMAFILELIST</property>
<property name="id">7</property>
</structure>
<structure>
<property name="name">OdaConnProfileName</property>
<property name="id">7</property>
</structure>
<structure>
<property name="name">OdaConnProfileStorePath</property>
<property name="id">7</property>
</structure>
</list-property>
<property name="iconFile">/templates/blank_report.gif</property>
<property name="bidiLayoutOrientation">ltr</property>
<parameters>
<scalar-parameter name="dataFile" id="39">
<property name="valueType">static</property>
<property name="dataType">string</property>
<property name="paramType">simple</property>
<property name="controlType">text-box</property>
<property name="distinct">true</property>
<structure name="format">
<property name="category">Unformatted</property>
</structure>
</scalar-parameter>
</parameters>
<data-sources>
<oda-data-source extensionID="org.eclipse.datatools.enablement.oda.xml" name="Data Source" id="7">
<property name="FILELIST">default</property>
</oda-data-source>
</data-sources>
<data-sets>
<oda-data-set extensionID="org.eclipse.datatools.enablement.oda.xml.dataSet " name="Price" id="8">
<structure name="cachedMetaData">
<list-property name="resultSet">
<structure>
<property name="position">1</property>
<property name="name">name</property>
<property name="dataType">string</property>
</structure>
<structure>
<property name="position">2</property>
<property name="name">price</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">name</property>
<property name="nativeName">name</property>
<property name="dataType">string</property>
<property name="nativeDataType">12</property>
</structure>
<structure>
<property name="position">2</property>
<property name="name">price</property>
<property name="nativeName">price</property>
<property name="dataType">string</property>
<property name="nativeDataType">12</property>
</structure>
</list-property>
<xml-property name="queryText">< ![CDATA[table0#-TNAME-#table0#:#[/breakfast_menu/food]#:#{na me;STRING;/name},{price;STRING;/price}]] ></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>name</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>name</design:label>
<design:formattingHints/>
</design:usageHints>
</design:resultColumnDefinitions>
<design:resultColumnDefinitions>
<design:attributes>
<design:name>price</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>price</design:label>
<design:formattingHints/>
</design:usageHints>
</design:resultColumnDefinitions>
</design:resultSetColumns>
</design:resultSetDefinitions>
</design:ResultSets>
</model:DesignValues>]]></xml-property>
<list-property name="privateDriverProperties">
<ex-property>
<name>MAX_ROW</name>
<value>-1</value>
</ex-property>
<ex-property>
<name>XML_FILE</name>
</ex-property>
</list-property>
</oda-data-set>
<oda-data-set extensionID="org.eclipse.datatools.enablement.oda.xml.dataSet " name="Description" id="9">
<structure name="cachedMetaData">
<list-property name="resultSet">
<structure>
<property name="position">1</property>
<property name="name">name</property>
<property name="dataType">string</property>
</structure>
<structure>
<property name="position">2</property>
<property name="name">description</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">name</property>
<property name="nativeName">name</property>
<property name="dataType">string</property>
<property name="nativeDataType">12</property>
</structure>
<structure>
<property name="position">2</property>
<property name="name">description</property>
<property name="nativeName">description</property>
<property name="dataType">string</property>
<property name="nativeDataType">12</property>
</structure>
</list-property>
<xml-property name="queryText">< ![CDATA[table0#-TNAME-#table0#:#[/breakfast_menu/food]#:#{na me;STRING;/name},{description;STRING;/description}]] ></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>name</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>name</design:label>
<design:formattingHints/>
</design:usageHints>
</design:resultColumnDefinitions>
<design:resultColumnDefinitions>
<design:attributes>
<design:name>description</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>description</design:label>
<design:formattingHints/>
</design:usageHints>
</design:resultColumnDefinitions>
</design:resultSetColumns>
</design:resultSetDefinitions>
</design:ResultSets>
</model:DesignValues>]]></xml-property>
<list-property name="privateDriverProperties">
<ex-property>
<name>MAX_ROW</name>
<value>-1</value>
</ex-property>
<ex-property>
<name>XML_FILE</name>
</ex-property>
</list-property>
</oda-data-set>
<joint-data-set name="MyJoin" id="10">
<structure name="cachedMetaData">
<list-property name="resultSet">
<structure>
<property name="position">1</property>
<property name="name">Price::name</property>
<property name="dataType">string</property>
</structure>
<structure>
<property name="position">2</property>
<property name="name">Price::price</property>
<property name="dataType">string</property>
</structure>
<structure>
<property name="position">3</property>
<property name="name">Description::name</property>
<property name="dataType">string</property>
</structure>
<structure>
<property name="position">4</property>
<property name="name">Description::description</property>
<property name="dataType">string</property>
</structure>
</list-property>
</structure>
<simple-property-list name="dataSets">
<value>Price</value>
<value>Description</value>
</simple-property-list>
<list-property name="joinConditions">
<structure>
<property name="joinType">inner</property>
<property name="joinOperator">eq</property>
<property name="leftDataSet">Price</property>
<property name="rightDataSet">Description</property>
<expression name="leftExpression">dataSetRow["name"]</expression>
<expression name="rightExpression">dataSetRow["name"]</expression>
</structure>
</list-property>
</joint-data-set>
</data-sets>
<styles>
<style name="report" id="4">
<property name="fontFamily">"Verdana"</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="11">
<property name="dataSet">MyJoin</property>
<list-property name="boundDataColumns">
<structure>
<property name="name">Price::name</property>
<property name="displayName">Price::name</property>
<expression name="expression">dataSetRow["Price::name"]</expression >
<property name="dataType">string</property>
</structure>
<structure>
<property name="name">Price::price</property>
<property name="displayName">Price::price</property>
<expression name="expression">dataSetRow["Price::price"]</expression >
<property name="dataType">string</property>
</structure>
<structure>
<property name="name">Description::name</property>
<property name="displayName">Description::name</property>
<expression name="expression">dataSetRow["Description::name"]</expression >
<property name="dataType">string</property>
</structure>
<structure>
<property name="name">Description::description</property>
<property name="displayName">Description::description</property>
<expression name="expression">dataSetRow["Description::description"] </expression>
<property name="dataType">string</property>
</structure>
</list-property>
<column id="35"/>
<column id="36"/>
<column id="37"/>
<column id="38"/>
<header>
<row id="12">
<cell id="13">
<label id="14">
<text-property name="text">Price::name</text-property>
</label>
</cell>
<cell id="15">
<label id="16">
<text-property name="text">Price::price</text-property>
</label>
</cell>
<cell id="17">
<label id="18">
<text-property name="text">Description::name</text-property>
</label>
</cell>
<cell id="19">
<label id="20">
<text-property name="text">Description::description</text-property>
</label>
</cell>
</row>
</header>
<detail>
<row id="21">
<cell id="22">
<data id="23">
<property name="resultSetColumn">Price::name</property>
</data>
</cell>
<cell id="24">
<data id="25">
<property name="resultSetColumn">Price::price</property>
</data>
</cell>
<cell id="26">
<data id="27">
<property name="resultSetColumn">Description::name</property>
</data>
</cell>
<cell id="28">
<data id="29">
<property name="resultSetColumn">Description::description</property >
</data>
</cell>
</row>
</detail>
<footer>
<row id="30">
<cell id="31"/>
<cell id="32"/>
<cell id="33"/>
<cell id="34"/>
</row>
</footer>
</table>
</body>
</report>

--------------080406060403010504030404--
Re: Problem with joint data set with property binding and viewer servlet [message #487035 is a reply to message #486405] Mon, 21 September 2009 15:33 Go to previous messageGo to next message
Jason Weathersby is currently offline Jason WeathersbyFriend
Messages: 9167
Registered: July 2009
Senior Member

Peter,

This may be a bug. Can you try using params["dataFile"].value?
Another thing to try is to take it out of property binding and put it in
the beforeOpen script of your datasource:

this.setExtensionProperty("FILELIST",params["dataFile"].value);

Jason

Peter Kullmann wrote:
> Hi,
>
> I have a simple report (attached) with the following specs:
> - A single XML datasource where the xml file is given as a parameter
> "dataFile" (using property binding)
> - Two normal data sets referencing the data source
> - A joint dataset based on the first two
>
> The following works as expected:
> <birt-viewer>/frameset?__report=test-join-param.rptdesign&dataFile=http://www.w3schools.com/XML/simple.xml
>
>
> Alternatively you can enter the dataFile parameter when the viewer
> prompts for it.
>
> What does not work correctly is when we use <birt-viewer>/run
>
> In this case the property mapping is not performed.
>
> On the other hand: Using a simpler report with an xml data source and
> property mapping (but without a joint data set) works in /frameset and
> /run equally well.
>
> Thanks for any hints or workarounds
> Peter
>
Re: Problem with joint data set with property binding and viewer servlet [message #487239 is a reply to message #487035] Tue, 22 September 2009 14:57 Go to previous messageGo to next message
Peter Kullmann is currently offline Peter KullmannFriend
Messages: 240
Registered: July 2009
Senior Member
Hi Jason

Thanks for the tips:
- params["dataFile"].value in the property bindings had no effect (same
problem)
- But setting the property in beforeOpen worked well.

Shall I open a bug report for this?

Peter


Jason Weathersby schrieb:
> Peter,
>
> This may be a bug. Can you try using params["dataFile"].value?
> Another thing to try is to take it out of property binding and put it in
> the beforeOpen script of your datasource:
>
> this.setExtensionProperty("FILELIST",params["dataFile"].value);
>
> Jason
>
> Peter Kullmann wrote:
>> Hi,
>>
>> I have a simple report (attached) with the following specs:
>> - A single XML datasource where the xml file is given as a parameter
>> "dataFile" (using property binding)
>> - Two normal data sets referencing the data source
>> - A joint dataset based on the first two
>>
>> The following works as expected:
>> <birt-viewer>/frameset?__report=test-join-param.rptdesign&dataFile=http://www.w3schools.com/XML/simple.xml
>>
>>
>> Alternatively you can enter the dataFile parameter when the viewer
>> prompts for it.
>>
>> What does not work correctly is when we use <birt-viewer>/run
>>
>> In this case the property mapping is not performed.
>>
>> On the other hand: Using a simpler report with an xml data source and
>> property mapping (but without a joint data set) works in /frameset and
>> /run equally well.
>>
>> Thanks for any hints or workarounds
>> Peter
>>
Re: Problem with joint data set with property binding and viewer servlet [message #487263 is a reply to message #487239] Tue, 22 September 2009 15:40 Go to previous messageGo to next message
Jason Weathersby is currently offline Jason WeathersbyFriend
Messages: 9167
Registered: July 2009
Senior Member

Please do.

Peter Kullmann wrote:
> Hi Jason
>
> Thanks for the tips:
> - params["dataFile"].value in the property bindings had no effect (same
> problem)
> - But setting the property in beforeOpen worked well.
>
> Shall I open a bug report for this?
>
> Peter
>
>
> Jason Weathersby schrieb:
>> Peter,
>>
>> This may be a bug. Can you try using params["dataFile"].value?
>> Another thing to try is to take it out of property binding and put it
>> in the beforeOpen script of your datasource:
>>
>> this.setExtensionProperty("FILELIST",params["dataFile"].value);
>>
>> Jason
>>
>> Peter Kullmann wrote:
>>> Hi,
>>>
>>> I have a simple report (attached) with the following specs:
>>> - A single XML datasource where the xml file is given as a parameter
>>> "dataFile" (using property binding)
>>> - Two normal data sets referencing the data source
>>> - A joint dataset based on the first two
>>>
>>> The following works as expected:
>>> <birt-viewer>/frameset?__report=test-join-param.rptdesign&dataFile=http://www.w3schools.com/XML/simple.xml
>>>
>>>
>>> Alternatively you can enter the dataFile parameter when the viewer
>>> prompts for it.
>>>
>>> What does not work correctly is when we use <birt-viewer>/run
>>>
>>> In this case the property mapping is not performed.
>>>
>>> On the other hand: Using a simpler report with an xml data source and
>>> property mapping (but without a joint data set) works in /frameset
>>> and /run equally well.
>>>
>>> Thanks for any hints or workarounds
>>> Peter
>>>
Re: Problem with joint data set with property binding and viewer servlet [message #487784 is a reply to message #487263] Thu, 24 September 2009 12:22 Go to previous messageGo to next message
Peter Kullmann is currently offline Peter KullmannFriend
Messages: 240
Registered: July 2009
Senior Member
see https://bugs.eclipse.org/bugs/show_bug.cgi?id=290396

Peter
Re: Problem with joint data set with property binding and viewer servlet [message #487862 is a reply to message #487784] Thu, 24 September 2009 15:22 Go to previous message
Jason Weathersby is currently offline Jason WeathersbyFriend
Messages: 9167
Registered: July 2009
Senior Member

Thanks

Peter Kullmann wrote:
> see https://bugs.eclipse.org/bugs/show_bug.cgi?id=290396
>
> Peter
Previous Topic:Changing header height?
Next Topic:RCP Designer for linux
Goto Forum:
  


Current Time: Fri Apr 26 11:07:58 GMT 2024

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

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

Back to the top