I ran into a problem with the BIRT 3.7.2 Report Designer.
I have two scripted DataSets, both consisting only of Output Parameters.
The report should use both DataSets together in one Text ReportElement that uses all of the Output Parameters in both DataSets.
To accomplish this, I created a dummy column in each of the two DataSets and joined them together on it to form a JointDataSet.
So far, so good. (Would be nice to remove the dummy column though.)
Now to the problem.
If I bind the newly created JointDataSet to the Text element and let the Designer create bindings for the output parameters, the BIRT Preview displays an Error:
Quote
Error evaluating Javascript expression. Script engine error: Failed to evaluate output parameter value: DS2::out2.
If i omit the bindings for the output parameters, everything works fine.
( Except that I wanted the output parameters, not the dummy join columns.
If this is a new bug, could you please track it?
A workaround would be to just create a new Dataset and copy-paste the outputParams from both Datasets, but this is kind of ugly.
Am I doing anything wrong?
This is the rptdesign (Upload failed for some reason):
<?xml version="1.0" encoding="UTF-8"?>
<report xmlns="http://www.eclipse.org/birt/2005/design" version="3.2.23" id="1">
<property name="createdBy">Eclipse BIRT Designer Version 3.7.2.v20120213 Build <3.7.2.v20120214-1408></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>
<script-data-source name="ScriptedSource" id="7"/>
</data-sources>
<data-sets>
<script-data-set name="DS1" id="8">
<list-property name="resultSetHints">
<structure>
<property name="position">1</property>
<property name="name">joincol</property>
<property name="dataType">integer</property>
</structure>
</list-property>
<list-property name="columnHints">
<structure>
<property name="columnName">joincol</property>
</structure>
</list-property>
<list-property name="parameters">
<structure>
<property name="name">out1</property>
<property name="dataType">string</property>
<property name="position">1</property>
<property name="isInput">false</property>
<property name="isOutput">true</property>
</structure>
</list-property>
<structure name="cachedMetaData">
<list-property name="resultSet">
<structure>
<property name="position">1</property>
<property name="name">joincol</property>
<property name="dataType">integer</property>
</structure>
</list-property>
</structure>
<property name="dataSource">ScriptedSource</property>
<method name="open"><![CDATA[
outputParams["out1"] = "This is out1.";
printJoinCol = true;
]]></method>
<method name="fetch"><![CDATA[if(printJoinCol){
row["joincol"] = 1;
printJoinCol = false;
return true;
}
return false;]]></method>
</script-data-set>
<script-data-set name="DS2" id="9">
<list-property name="resultSetHints">
<structure>
<property name="position">1</property>
<property name="name">joincol</property>
<property name="dataType">integer</property>
</structure>
</list-property>
<list-property name="columnHints">
<structure>
<property name="columnName">joincol</property>
</structure>
</list-property>
<list-property name="parameters">
<structure>
<property name="name">out2</property>
<property name="dataType">string</property>
<property name="position">1</property>
<property name="isInput">false</property>
<property name="isOutput">true</property>
</structure>
</list-property>
<structure name="cachedMetaData">
<list-property name="resultSet">
<structure>
<property name="position">1</property>
<property name="name">joincol</property>
<property name="dataType">integer</property>
</structure>
</list-property>
</structure>
<property name="dataSource">ScriptedSource</property>
<method name="open"><![CDATA[
outputParams["out2"] = "This is out2.";
printJoinCol = true;]]></method>
<method name="fetch"><![CDATA[if(printJoinCol){
row["joincol"] = 1;
printJoinCol = false;
return true;
}
return false;]]></method>
</script-data-set>
<joint-data-set name="JointSet" id="17">
<list-property name="columnHints">
<structure>
<property name="columnName">DS1::joincol</property>
<property name="alias">DS1::joincol</property>
<property name="analysis">measure</property>
<text-property name="displayName">DS1::joincol</text-property>
</structure>
<structure>
<property name="columnName">DS2::joincol</property>
<property name="alias">DS2::joincol</property>
<property name="analysis">measure</property>
<text-property name="displayName">DS2::joincol</text-property>
</structure>
</list-property>
<list-property name="parameters">
<structure>
<property name="name">DS2::out2</property>
<property name="dataType">string</property>
<property name="position">1</property>
<property name="isOptional">false</property>
<property name="allowNull">false</property>
<property name="isInput">false</property>
<property name="isOutput">true</property>
</structure>
<structure>
<property name="name">DS1::out1</property>
<property name="dataType">string</property>
<property name="position">2</property>
<property name="isOptional">false</property>
<property name="allowNull">false</property>
<property name="isInput">false</property>
<property name="isOutput">true</property>
</structure>
</list-property>
<structure name="cachedMetaData">
<list-property name="resultSet">
<structure>
<property name="position">1</property>
<property name="name">DS1::joincol</property>
<property name="dataType">integer</property>
</structure>
<structure>
<property name="position">2</property>
<property name="name">DS2::joincol</property>
<property name="dataType">integer</property>
</structure>
</list-property>
</structure>
<simple-property-list name="dataSets">
<value>DS1</value>
<value>DS2</value>
</simple-property-list>
<list-property name="joinConditions">
<structure>
<property name="joinType">inner</property>
<property name="joinOperator">eq</property>
<property name="leftDataSet">DS1</property>
<property name="rightDataSet">DS2</property>
<expression name="leftExpression">dataSetRow["joincol"]</expression>
<expression name="rightExpression">dataSetRow["joincol"]</expression>
</structure>
</list-property>
</joint-data-set>
</data-sets>
<page-setup>
<simple-master-page name="Simple MasterPage" id="2"/>
</page-setup>
<body>
<label id="11">
<property name="fontWeight">bold</property>
<text-property name="text">Only DS1:</text-property>
</label>
<text id="10">
<property name="dataSet">DS1</property>
<list-property name="boundDataColumns">
<structure>
<property name="name">joincol</property>
<text-property name="displayName">joincol</text-property>
<expression name="expression" type="javascript">dataSetRow["joincol"]</expression>
<property name="dataType">integer</property>
</structure>
<structure>
<property name="name">out1</property>
<expression name="expression" type="javascript">outputParams["out1"]</expression>
<property name="dataType">string</property>
</structure>
</list-property>
<property name="contentType">html</property>
<text-property name="content"><![CDATA[joincol: <VALUE-OF>row["joincol"]</VALUE-OF><BR>
out1: <VALUE-OF>row["out1"]</VALUE-OF>]]></text-property>
</text>
<label id="12">
<property name="fontWeight">bold</property>
<text-property name="text">Only DS2:</text-property>
</label>
<text id="13">
<property name="dataSet">DS2</property>
<list-property name="boundDataColumns">
<structure>
<property name="name">joincol</property>
<text-property name="displayName">joincol</text-property>
<expression name="expression" type="javascript">dataSetRow["joincol"]</expression>
<property name="dataType">integer</property>
</structure>
<structure>
<property name="name">out2</property>
<expression name="expression" type="javascript">outputParams["out2"]</expression>
<property name="dataType">string</property>
</structure>
</list-property>
<property name="contentType">html</property>
<text-property name="content"><![CDATA[joincol: <VALUE-OF>row["joincol"]</VALUE-OF><BR>
out2: <VALUE-OF>row["out2"]</VALUE-OF>]]></text-property>
</text>
<label id="15">
<property name="fontWeight">bold</property>
<text-property name="text">JointSet without output params binding:</text-property>
</label>
<text id="16">
<property name="dataSet">JointSet</property>
<list-property name="boundDataColumns">
<structure>
<property name="name">DS1::joincol</property>
<text-property name="displayName">DS1::joincol</text-property>
<expression name="expression" type="javascript">dataSetRow["DS1::joincol"]</expression>
<property name="dataType">integer</property>
</structure>
<structure>
<property name="name">DS2::joincol</property>
<text-property name="displayName">DS2::joincol</text-property>
<expression name="expression" type="javascript">dataSetRow["DS2::joincol"]</expression>
<property name="dataType">integer</property>
</structure>
</list-property>
<property name="contentType">html</property>
<text-property name="content"><![CDATA[<I>DS1:</I><BR>
joincol: <VALUE-OF>row["DS1::joincol"]</VALUE-OF><BR>
<I>DS2:</I><BR>
joincol: <VALUE-OF>row["DS2::joincol"]</VALUE-OF>]]></text-property>
</text>
<label id="18">
<property name="fontWeight">bold</property>
<text-property name="text">JointSet with output params binding (Error, see Preview):</text-property>
</label>
<text id="19">
<property name="dataSet">JointSet</property>
<list-property name="boundDataColumns">
<structure>
<property name="name">DS1::joincol</property>
<text-property name="displayName">DS1::joincol</text-property>
<expression name="expression" type="javascript">dataSetRow["DS1::joincol"]</expression>
<property name="dataType">integer</property>
</structure>
<structure>
<property name="name">DS2::joincol</property>
<text-property name="displayName">DS2::joincol</text-property>
<expression name="expression" type="javascript">dataSetRow["DS2::joincol"]</expression>
<property name="dataType">integer</property>
</structure>
<structure>
<property name="name">DS2::out2</property>
<expression name="expression" type="javascript">outputParams["DS2::out2"]</expression>
<property name="dataType">string</property>
</structure>
<structure>
<property name="name">DS1::out1</property>
<expression name="expression" type="javascript">outputParams["DS1::out1"]</expression>
<property name="dataType">string</property>
</structure>
</list-property>
<property name="contentType">html</property>
<text-property name="content"><![CDATA[<I>DS1:</I><BR>
joincol: <VALUE-OF>row["DS1::joincol"]</VALUE-OF><BR>
out1: <VALUE-OF>row["DS1::out1"]</VALUE-OF><BR>
<I>DS2:</I><BR>
joincol: <VALUE-OF>row["DS2::joincol"]</VALUE-OF><BR>
out2: <VALUE-OF>row["DS2::out2"]</VALUE-OF>]]></text-property>
</text>
</body>
</report>





MultiQuote





