Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » BIRT » Scripted dataset problem
Scripted dataset problem [message #641969] Mon, 29 November 2010 12:23 Go to next message
Don Wood is currently offline Don WoodFriend
Messages: 32
Registered: February 2010
Location: Pennsylvania
Member
I have a report which uses both a JDBC Dataset and a Scripted Dataset. When I preview the report within the Report Design perspective, the report works fine. However, when I run my application and attempt to view the report using the Report Viewer, I'm receiving the error below.

[11/24/10 11:07:33:827 EST] 00000035 QueryResultSe E Cannot fetch the next data row.
Cannot move down to next row in the result set.
SQL error #1: [jcc][t4][10120][10898][3.52.95] Invalid operation: result set is closed. ERRORCODE=-4470, SQLSTATE=null

org.eclipse.birt.data.engine.core.DataException: Cannot fetch the next data row.


I've narrowed the problem down to the Scripted Dataset. If I remove it and its corresponding table, the report runs without an error. (Of course in this case, I'm also missing necessary data.) If I leave the Scripted DataSet in the report but don't bind any of its data to a table, I get errors on the console; however, the report still runs. With the Scripted Dataset and a table on the report using data from the Scripted Dataset, the report doesn't run...all I get is the error on the console shown above.

I'm using BIRT 2.3.

Any help would be greatly appreciated.

Don
Re: Scripted dataset problem [message #642028 is a reply to message #641969] Mon, 29 November 2010 15:31 Go to previous messageGo to next message
Jason Weathersby is currently offline Jason WeathersbyFriend
Messages: 9167
Registered: July 2009
Senior Member

Don,

Can you post the report?

Jason

On 11/29/2010 7:24 AM, Don wrote:
> I have a report which uses both a JDBC Dataset and a Scripted Dataset.
> When I preview the report within the Report Design perspective, the
> report works fine. However, when I run my application and attempt to
> view the report using the Report Viewer, I'm receiving the error below.
>
> [11/24/10 11:07:33:827 EST] 00000035 QueryResultSe E Cannot fetch the
> next data row.
> Cannot move down to next row in the result set.
> SQL error #1: [jcc][t4][10120][10898][3.52.95] Invalid operation: result
> set is closed. ERRORCODE=-4470, SQLSTATE=null
>
> org.eclipse.birt.data.engine.core.DataException: Cannot fetch the next
> data row.
>
> I've narrowed the problem down to the Scripted Dataset. If I remove it
> and its corresponding table, the report runs without an error. (Of
> course in this case, I'm also missing necessary data.) If I leave the
> Scripted DataSet in the report but don't bind any of its data to a
> table, I get errors on the console; however, the report still runs. With
> the Scripted Dataset and a table on the report using data from the
> Scripted Dataset, the report doesn't run...all I get is the error on the
> console shown above.
>
> I'm using BIRT 2.3.
>
> Any help would be greatly appreciated.
> Don
Re: Scripted dataset problem [message #642210 is a reply to message #641969] Tue, 30 November 2010 12:09 Go to previous messageGo to next message
Don Wood is currently offline Don WoodFriend
Messages: 32
Registered: February 2010
Location: Pennsylvania
Member
Jason,

Here's the XML code for the report...

<?xml version="1.0" encoding="UTF-8"?>
<report xmlns="http://www.eclipse.org/birt/2005/design" version="3.2.17" id="1">
<property name="createdBy">Eclipse BIRT Designer Version 2.3.2.r232_20090202 Build &lt;2.3.2.v20090218-0730></property>
<property name="units">in</property>
<method name="initialize"><![CDATA[importPackage(Packages.java.util.*);
globalvarList = new java.util.ArrayList();
prgCount = 0;
]]></method>
<property name="iconFile">/templates/blank_report.gif</property>
<property name="bidiLayoutOrientation">ltr</property>
<data-sources>
<oda-data-source extensionID="org.eclipse.birt.report.data.oda.jdbc" name="MPMSDB" id="7">
<text-property name="displayName"></text-property>
<property name="odaDriverClass">com.ibm.db2.jcc.DB2Driver</property >
<property name="odaURL">jdbc:db2://pddevgwdsnd2k01:50000/DSN</property>
<property name="odaUser">mpmspgm</property>
<encrypted-property name="odaPassword" encryptionID="base64">bXBtczAx</encrypted-property>
<property name="odaJndiName">jdbc/MPMS</property>
</oda-data-source>
<script-data-source name="scriptedDataSource" id="31"/>
</data-sources>
<data-sets>
<oda-data-set extensionID="org.eclipse.birt.report.data.oda.jdbc.JdbcSelectDataSet " name="db2DataSet" id="8">
<list-property name="columnHints">
<structure>
<property name="columnName">PRG_ID</property>
<property name="displayName">PRG_ID</property>
</structure>
<structure>
<property name="columnName">PRG_STS_CD</property>
<property name="displayName">PRG_STS_CD</property>
</structure>
<structure>
<property name="columnName">PRG_TYPE_CD</property>
<property name="displayName">PRG_TYPE_CD</property>
</structure>
</list-property>
<structure name="cachedMetaData">
<list-property name="resultSet">
<structure>
<property name="position">1</property>
<property name="name">PRG_ID</property>
<property name="dataType">integer</property>
</structure>
<structure>
<property name="position">2</property>
<property name="name">PRG_STS_CD</property>
<property name="dataType">string</property>
</structure>
<structure>
<property name="position">3</property>
<property name="name">PRG_TYPE_CD</property>
<property name="dataType">string</property>
</structure>
</list-property>
</structure>
<property name="dataSource">MPMSDB</property>
<method name="onFetch"><![CDATA[//list = new java.util.ArrayList();

var data={};
//data.prg_id = row["PRG_ID"];
//data.prg_type_cd = row["PRG_TYPE_CD"];
//data.prg_sts_cd = row["PRG_STS_CD"];

data.prg_id = row.PRG_ID;
data.prg_type_cd = row.PRG_TYPE_CD;
data.prg_sts_cd = row.PRG_STS_CD;

globalvarList.add(data);
//globalvarList = list;
]]></method>
<list-property name="resultSet">
<structure>
<property name="position">1</property>
<property name="name">PRG_ID</property>
<property name="nativeName">PRG_ID</property>
<property name="dataType">integer</property>
<property name="nativeDataType">4</property>
</structure>
<structure>
<property name="position">2</property>
<property name="name">PRG_STS_CD</property>
<property name="nativeName">PRG_STS_CD</property>
<property name="dataType">string</property>
<property name="nativeDataType">12</property>
</structure>
<structure>
<property name="position">3</property>
<property name="name">PRG_TYPE_CD</property>
<property name="nativeName">PRG_TYPE_CD</property>
<property name="dataType">string</property>
<property name="nativeDataType">12</property>
</structure>
</list-property>
<property name="queryText">select prg_id, prg_sts_cd, prg_type_cd
from mpmsprod.t001program
where prg_id > 300
order by prg_type_cd, prg_id</property>
</oda-data-set>
<script-data-set name="scriptedDataSet" id="32">
<list-property name="resultSetHints">
<structure>
<property name="position">1</property>
<property name="name">PRG_ID</property>
<property name="dataType">integer</property>
</structure>
<structure>
<property name="position">2</property>
<property name="name">PRG_TYPE_CD</property>
<property name="dataType">string</property>
</structure>
<structure>
<property name="position">3</property>
<property name="name">PRG_STS_CD</property>
<property name="dataType">string</property>
</structure>
<structure>
<property name="position">4</property>
<property name="name">programCount</property>
<property name="dataType">integer</property>
</structure>
</list-property>
<list-property name="columnHints">
<structure>
<property name="columnName">PRG_ID</property>
<property name="displayName">Program ID</property>
</structure>
<structure>
<property name="columnName">PRG_TYPE_CD</property>
<property name="displayName">Program Type</property>
</structure>
<structure>
<property name="columnName">PRG_STS_CD</property>
<property name="displayName">Program Status</property>
</structure>
<structure>
<property name="columnName">programCount</property>
<property name="displayName"># of Rows</property>
</structure>
</list-property>
<structure name="cachedMetaData">
<list-property name="resultSet">
<structure>
<property name="position">1</property>
<property name="name">PRG_ID</property>
<property name="dataType">integer</property>
</structure>
<structure>
<property name="position">2</property>
<property name="name">PRG_TYPE_CD</property>
<property name="dataType">string</property>
</structure>
<structure>
<property name="position">3</property>
<property name="name">PRG_STS_CD</property>
<property name="dataType">string</property>
</structure>
<structure>
<property name="position">4</property>
<property name="name">programCount</property>
<property name="dataType">integer</property>
</structure>
</list-property>
</structure>
<property name="dataSource">scriptedDataSource</property>
<method name="fetch"><![CDATA[if(prgCount < globalvarList.size())
{
var data = globalvarList.get(prgCount);

var prgId = data.prg_id;

if (prgId > 400)
{
row["PRG_ID"] = data.prg_id;
}
else
{
row["PRG_ID"] = 2;
}
row["PRG_TYPE_CD"] = data.prg_type_cd;
row["PRG_STS_CD"] =data.prg_sts_cd;
row["programCount"] = globalvarList.size();
prgCount++;
return true;
}

row["programCount"] = globalvarList.size();

return false;

/*var prgCount = globalvarList.size();
if(prgCount < globalvarList.size())
{
var data = globalvarList.get(customerCount);

row["CUSTOMER_ID"] = data.customer_id;
row["CUSTOMER_NAME"] = data.customer_name;
row["PRODUCT_ID"] =data.product_id;

customerCount++;
return true;
}

return false; */]]></method>
</script-data-set>
</data-sets>
<styles>
<style name="report" id="4">
<property name="fontFamily">"Verdana"</property>
<property name="fontSize">10pt</property>
</style>
<style name="crosstab" 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-cell" 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">
<property name="topMargin">0.25in</property>
<property name="leftMargin">0.25in</property>
<property name="bottomMargin">0.25in</property>
<property name="rightMargin">0.25in</property>
<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="9">
<property name="width">100%</property>
<property name="dataSet">db2DataSet</property>
<list-property name="visibility">
<structure>
<property name="format">all</property>
<expression name="valueExpr">true</expression>
</structure>
</list-property>
<list-property name="boundDataColumns">
<structure>
<property name="name">PRG_ID</property>
<property name="displayName">PRG_ID</property>
<expression name="expression">dataSetRow["PRG_ID"]</expression>
<property name="dataType">integer</property>
</structure>
<structure>
<property name="name">PRG_STS_CD</property>
<property name="displayName">PRG_STS_CD</property>
<expression name="expression">dataSetRow["PRG_STS_CD"]</expression>
<property name="dataType">string</property>
</structure>
<structure>
<property name="name">PRG_TYPE_CD</property>
<property name="displayName">PRG_TYPE_CD</property>
<expression name="expression">dataSetRow["PRG_TYPE_CD"]</expression >
<property name="dataType">string</property>
</structure>
</list-property>
<column id="28">
<property name="textAlign">center</property>
</column>
<column id="29">
<property name="textAlign">center</property>
</column>
<column id="30">
<property name="textAlign">center</property>
</column>
<header>
<row id="10">
<cell id="11">
<label id="12">
<text-property name="text">PRG_ID from db2DataSet</text-property>
</label>
</cell>
<cell id="13">
<label id="14">
<text-property name="text">PRG_STS_CD from db2DataSet</text-property>
</label>
</cell>
<cell id="15">
<label id="16">
<text-property name="text">PRG_TYPE_CD from db2DataSet</text-property>
</label>
</cell>
</row>
</header>
<detail>
<row id="17">
<cell id="18">
<data id="19">
<property name="resultSetColumn">PRG_ID</property>
</data>
</cell>
<cell id="20">
<data id="21">
<property name="resultSetColumn">PRG_STS_CD</property>
</data>
</cell>
<cell id="22">
<data id="23">
<property name="resultSetColumn">PRG_TYPE_CD</property>
</data>
</cell>
</row>
</detail>
<footer>
<row id="24">
<cell id="25"/>
<cell id="26"/>
<cell id="27"/>
</row>
</footer>
</table>
<table id="33">
<property name="width">100%</property>
<property name="dataSet">scriptedDataSet</property>
<list-property name="boundDataColumns">
<structure>
<property name="name">PRG_ID</property>
<property name="displayName">Program ID</property>
<expression name="expression">dataSetRow["PRG_ID"]</expression>
<property name="dataType">integer</property>
</structure>
<structure>
<property name="name">PRG_TYPE_CD</property>
<property name="displayName">Program Type</property>
<expression name="expression">dataSetRow["PRG_TYPE_CD"]</expression >
<property name="dataType">string</property>
</structure>
<structure>
<property name="name">PRG_STS_CD</property>
<property name="displayName">Program Status</property>
<expression name="expression">dataSetRow["PRG_STS_CD"]</expression>
<property name="dataType">string</property>
</structure>
<structure>
<property name="name">programCount</property>
<property name="displayName"># of Rows</property>
<expression name="expression">dataSetRow["programCount"]</expression >
<property name="dataType">integer</property>
</structure>
</list-property>
<column id="52">
<property name="textAlign">center</property>
</column>
<column id="53">
<property name="textAlign">center</property>
</column>
<column id="54">
<property name="textAlign">center</property>
</column>
<column id="58">
<property name="textAlign">center</property>
</column>
<header>
<row id="34">
<cell id="35">
<label id="36">
<text-property name="text">Program ID</text-property>
</label>
</cell>
<cell id="37">
<label id="38">
<text-property name="text">Program Type</text-property>
</label>
</cell>
<cell id="39">
<label id="40">
<text-property name="text">Program Status</text-property>
</label>
</cell>
<cell id="55">
<label id="59">
<text-property name="text"># of Rows</text-property>
</label>
</cell>
</row>
</header>
<detail>
<row id="41">
<cell id="42">
<data id="43">
<property name="resultSetColumn">PRG_ID</property>
</data>
</cell>
<cell id="44">
<data id="45">
<property name="resultSetColumn">PRG_TYPE_CD</property>
</data>
</cell>
<cell id="46">
<data id="47">
<property name="resultSetColumn">PRG_STS_CD</property>
</data>
</cell>
<cell id="56">
<data id="60">
<property name="resultSetColumn">programCount</property>
</data>
</cell>
</row>
</detail>
<footer>
<row id="48">
<cell id="49"/>
<cell id="50"/>
<cell id="51"/>
<cell id="57"/>
</row>
</footer>
</table>
</body>
</report>
Re: Scripted dataset problem [message #642261 is a reply to message #642210] Tue, 30 November 2010 15:57 Go to previous messageGo to next message
Jason Weathersby is currently offline Jason WeathersbyFriend
Messages: 9167
Registered: July 2009
Senior Member

Don,

Not certain this will work but can you try:

moving the code in the onFetch of the normal dataset to the table rows
onCreate. You can get the values like
this.getRowData().getColumnValue("nameofbinding");
This should be the first table in your report.

Also move the code from the initialize event to the beforeFactory event.

Also in the scripted dataset's fetch method the line before you return
false is not needed.

//this line
row["programCount"] = globalvarList.size();

return false;

Jason

On 11/30/2010 7:09 AM, Don wrote:
> Jason,
>
> Here's the XML code for the report...
>
> <?xml version="1.0" encoding="UTF-8"?>
> <report xmlns="http://www.eclipse.org/birt/2005/design" version="3.2.17"
> id="1">
> <property name="createdBy">Eclipse BIRT Designer Version
> 2.3.2.r232_20090202 Build <2.3.2.v20090218-0730></property>
> <property name="units">in</property>
> <method name="initialize"><![CDATA[importPackage(Packages.java.util.*);
> globalvarList = new java.util.ArrayList();
> prgCount = 0;
> ]]></method>
> <property name="iconFile">/templates/blank_report.gif</property>
> <property name="bidiLayoutOrientation">ltr</property>
> <data-sources>
> <oda-data-source extensionID="org.eclipse.birt.report.data.oda.jdbc"
> name="MPMSDB" id="7">
> <text-property name="displayName"></text-property>
> <property name="odaDriverClass">com.ibm.db2.jcc.DB2Driver</property >
> <property name="odaURL">jdbc:db2://pddevgwdsnd2k01:50000/DSN</property>
> <property name="odaUser">mpmspgm</property>
> <encrypted-property name="odaPassword"
> encryptionID="base64">bXBtczAx</encrypted-property>
> <property name="odaJndiName">jdbc/MPMS</property>
> </oda-data-source>
> <script-data-source name="scriptedDataSource" id="31"/>
> </data-sources>
> <data-sets>
> <oda-data-set
> extensionID="org.eclipse.birt.report.data.oda.jdbc.JdbcSelectDataSet "
> name="db2DataSet" id="8">
> <list-property name="columnHints">
> <structure>
> <property name="columnName">PRG_ID</property>
> <property name="displayName">PRG_ID</property>
> </structure>
> <structure>
> <property name="columnName">PRG_STS_CD</property>
> <property name="displayName">PRG_STS_CD</property>
> </structure>
> <structure>
> <property name="columnName">PRG_TYPE_CD</property>
> <property name="displayName">PRG_TYPE_CD</property>
> </structure>
> </list-property>
> <structure name="cachedMetaData">
> <list-property name="resultSet">
> <structure>
> <property name="position">1</property>
> <property name="name">PRG_ID</property>
> <property name="dataType">integer</property>
> </structure>
> <structure>
> <property name="position">2</property>
> <property name="name">PRG_STS_CD</property>
> <property name="dataType">string</property>
> </structure>
> <structure>
> <property name="position">3</property>
> <property name="name">PRG_TYPE_CD</property>
> <property name="dataType">string</property>
> </structure>
> </list-property>
> </structure>
> <property name="dataSource">MPMSDB</property>
> <method name="onFetch"><![CDATA[//list = new java.util.ArrayList();
>
> var data={};
> //data.prg_id = row["PRG_ID"];
> //data.prg_type_cd = row["PRG_TYPE_CD"];
> //data.prg_sts_cd = row["PRG_STS_CD"];
>
> data.prg_id = row.PRG_ID;
> data.prg_type_cd = row.PRG_TYPE_CD;
> data.prg_sts_cd = row.PRG_STS_CD;
>
> globalvarList.add(data);
> //globalvarList = list;
> ]]></method>
> <list-property name="resultSet">
> <structure>
> <property name="position">1</property>
> <property name="name">PRG_ID</property>
> <property name="nativeName">PRG_ID</property>
> <property name="dataType">integer</property>
> <property name="nativeDataType">4</property>
> </structure>
> <structure>
> <property name="position">2</property>
> <property name="name">PRG_STS_CD</property>
> <property name="nativeName">PRG_STS_CD</property>
> <property name="dataType">string</property>
> <property name="nativeDataType">12</property>
> </structure>
> <structure>
> <property name="position">3</property>
> <property name="name">PRG_TYPE_CD</property>
> <property name="nativeName">PRG_TYPE_CD</property>
> <property name="dataType">string</property>
> <property name="nativeDataType">12</property>
> </structure>
> </list-property>
> <property name="queryText">select prg_id, prg_sts_cd, prg_type_cd
> from mpmsprod.t001program
> where prg_id > 300
> order by prg_type_cd, prg_id</property>
> </oda-data-set>
> <script-data-set name="scriptedDataSet" id="32">
> <list-property name="resultSetHints">
> <structure>
> <property name="position">1</property>
> <property name="name">PRG_ID</property>
> <property name="dataType">integer</property>
> </structure>
> <structure>
> <property name="position">2</property>
> <property name="name">PRG_TYPE_CD</property>
> <property name="dataType">string</property>
> </structure>
> <structure>
> <property name="position">3</property>
> <property name="name">PRG_STS_CD</property>
> <property name="dataType">string</property>
> </structure>
> <structure>
> <property name="position">4</property>
> <property name="name">programCount</property>
> <property name="dataType">integer</property>
> </structure>
> </list-property>
> <list-property name="columnHints">
> <structure>
> <property name="columnName">PRG_ID</property>
> <property name="displayName">Program ID</property>
> </structure>
> <structure>
> <property name="columnName">PRG_TYPE_CD</property>
> <property name="displayName">Program Type</property>
> </structure>
> <structure>
> <property name="columnName">PRG_STS_CD</property>
> <property name="displayName">Program Status</property>
> </structure>
> <structure>
> <property name="columnName">programCount</property>
> <property name="displayName"># of Rows</property>
> </structure>
> </list-property>
> <structure name="cachedMetaData">
> <list-property name="resultSet">
> <structure>
> <property name="position">1</property>
> <property name="name">PRG_ID</property>
> <property name="dataType">integer</property>
> </structure>
> <structure>
> <property name="position">2</property>
> <property name="name">PRG_TYPE_CD</property>
> <property name="dataType">string</property>
> </structure>
> <structure>
> <property name="position">3</property>
> <property name="name">PRG_STS_CD</property>
> <property name="dataType">string</property>
> </structure>
> <structure>
> <property name="position">4</property>
> <property name="name">programCount</property>
> <property name="dataType">integer</property>
> </structure>
> </list-property>
> </structure>
> <property name="dataSource">scriptedDataSource</property>
> <method name="fetch"><![CDATA[if(prgCount < globalvarList.size())
> {
> var data = globalvarList.get(prgCount);
>
> var prgId = data.prg_id;
>
> if (prgId > 400)
> { row["PRG_ID"] = data.prg_id;
> }
> else
> {
> row["PRG_ID"] = 2;
> }
> row["PRG_TYPE_CD"] = data.prg_type_cd;
> row["PRG_STS_CD"] =data.prg_sts_cd;
> row["programCount"] = globalvarList.size();
> prgCount++;
> return true;
> }
>
> row["programCount"] = globalvarList.size();
>
> return false;
>
> /*var prgCount = globalvarList.size();
> if(prgCount < globalvarList.size())
> {
> var data = globalvarList.get(customerCount);
>
> row["CUSTOMER_ID"] = data.customer_id;
> row["CUSTOMER_NAME"] = data.customer_name;
> row["PRODUCT_ID"] =data.product_id;
>
> customerCount++;
> return true;
> }
>
> return false; */]]></method>
> </script-data-set>
> </data-sets>
> <styles>
> <style name="report" id="4">
> <property name="fontFamily">"Verdana"</property>
> <property name="fontSize">10pt</property>
> </style>
> <style name="crosstab" 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-cell" 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">
> <property name="topMargin">0.25in</property>
> <property name="leftMargin">0.25in</property>
> <property name="bottomMargin">0.25in</property>
> <property name="rightMargin">0.25in</property>
> <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="9">
> <property name="width">100%</property>
> <property name="dataSet">db2DataSet</property>
> <list-property name="visibility">
> <structure>
> <property name="format">all</property>
> <expression name="valueExpr">true</expression>
> </structure>
> </list-property>
> <list-property name="boundDataColumns">
> <structure>
> <property name="name">PRG_ID</property>
> <property name="displayName">PRG_ID</property>
> <expression name="expression">dataSetRow["PRG_ID"]</expression>
> <property name="dataType">integer</property>
> </structure>
> <structure>
> <property name="name">PRG_STS_CD</property>
> <property name="displayName">PRG_STS_CD</property>
> <expression name="expression">dataSetRow["PRG_STS_CD"]</expression>
> <property name="dataType">string</property>
> </structure>
> <structure>
> <property name="name">PRG_TYPE_CD</property>
> <property name="displayName">PRG_TYPE_CD</property>
> <expression name="expression">dataSetRow["PRG_TYPE_CD"]</expression >
> <property name="dataType">string</property>
> </structure>
> </list-property>
> <column id="28">
> <property name="textAlign">center</property>
> </column>
> <column id="29">
> <property name="textAlign">center</property>
> </column>
> <column id="30">
> <property name="textAlign">center</property>
> </column>
> <header>
> <row id="10">
> <cell id="11">
> <label id="12">
> <text-property name="text">PRG_ID from db2DataSet</text-property>
> </label>
> </cell>
> <cell id="13">
> <label id="14">
> <text-property name="text">PRG_STS_CD from db2DataSet</text-property>
> </label>
> </cell>
> <cell id="15">
> <label id="16">
> <text-property name="text">PRG_TYPE_CD from db2DataSet</text-property>
> </label>
> </cell>
> </row>
> </header>
> <detail>
> <row id="17">
> <cell id="18">
> <data id="19">
> <property name="resultSetColumn">PRG_ID</property>
> </data>
> </cell>
> <cell id="20">
> <data id="21">
> <property name="resultSetColumn">PRG_STS_CD</property>
> </data>
> </cell>
> <cell id="22">
> <data id="23">
> <property name="resultSetColumn">PRG_TYPE_CD</property>
> </data>
> </cell>
> </row>
> </detail>
> <footer>
> <row id="24">
> <cell id="25"/>
> <cell id="26"/>
> <cell id="27"/>
> </row>
> </footer>
> </table>
> <table id="33">
> <property name="width">100%</property>
> <property name="dataSet">scriptedDataSet</property>
> <list-property name="boundDataColumns">
> <structure>
> <property name="name">PRG_ID</property>
> <property name="displayName">Program ID</property>
> <expression name="expression">dataSetRow["PRG_ID"]</expression>
> <property name="dataType">integer</property>
> </structure>
> <structure>
> <property name="name">PRG_TYPE_CD</property>
> <property name="displayName">Program Type</property>
> <expression name="expression">dataSetRow["PRG_TYPE_CD"]</expression >
> <property name="dataType">string</property>
> </structure>
> <structure>
> <property name="name">PRG_STS_CD</property>
> <property name="displayName">Program Status</property>
> <expression name="expression">dataSetRow["PRG_STS_CD"]</expression>
> <property name="dataType">string</property>
> </structure>
> <structure>
> <property name="name">programCount</property>
> <property name="displayName"># of Rows</property>
> <expression name="expression">dataSetRow["programCount"]</expression >
> <property name="dataType">integer</property>
> </structure>
> </list-property>
> <column id="52">
> <property name="textAlign">center</property>
> </column>
> <column id="53">
> <property name="textAlign">center</property>
> </column>
> <column id="54">
> <property name="textAlign">center</property>
> </column>
> <column id="58">
> <property name="textAlign">center</property>
> </column>
> <header>
> <row id="34">
> <cell id="35">
> <label id="36">
> <text-property name="text">Program ID</text-property>
> </label>
> </cell>
> <cell id="37">
> <label id="38">
> <text-property name="text">Program Type</text-property>
> </label>
> </cell>
> <cell id="39">
> <label id="40">
> <text-property name="text">Program Status</text-property>
> </label>
> </cell>
> <cell id="55">
> <label id="59">
> <text-property name="text"># of Rows</text-property>
> </label>
> </cell>
> </row>
> </header>
> <detail>
> <row id="41">
> <cell id="42">
> <data id="43">
> <property name="resultSetColumn">PRG_ID</property>
> </data>
> </cell>
> <cell id="44">
> <data id="45">
> <property name="resultSetColumn">PRG_TYPE_CD</property>
> </data>
> </cell>
> <cell id="46">
> <data id="47">
> <property name="resultSetColumn">PRG_STS_CD</property>
> </data>
> </cell>
> <cell id="56">
> <data id="60">
> <property name="resultSetColumn">programCount</property>
> </data>
> </cell>
> </row>
> </detail>
> <footer>
> <row id="48">
> <cell id="49"/>
> <cell id="50"/>
> <cell id="51"/>
> <cell id="57"/>
> </row>
> </footer>
> </table>
> </body>
> </report>
>
Re: Scripted dataset problem [message #642309 is a reply to message #641969] Tue, 30 November 2010 18:13 Go to previous messageGo to next message
Don Wood is currently offline Don WoodFriend
Messages: 32
Registered: February 2010
Location: Pennsylvania
Member
Jason,

I made the changes you suggested but received the same results...


[11/30/10 13:08:49:780 EST] 00000026 odaconsumer E org.eclipse.birt.data.engine.odaconsumer.ResultSet fetch Cannot fetch the next data row.
Cannot move down to next row in the result set.
SQL error #1: [jcc][t4][10120][10898][3.52.95] Invalid operation: result set is closed. ERRORCODE=-4470, SQLSTATE=null

org.eclipse.birt.report.data.oda.jdbc.JDBCException: Cannot move down to next row in the result set.
SQL error #1: [jcc][t4][10120][10898][3.52.95] Invalid operation: result set is closed. ERRORCODE=-4470, SQLSTATE=null
;
com.ibm.db2.jcc.a.SqlException: [jcc][t4][10120][10898][3.52.95] Invalid operation: result set is closed. ERRORCODE=-4470, SQLSTATE=null
at org.eclipse.birt.report.data.oda.jdbc.ResultSet.next(ResultS et.java:182)
at org.eclipse.datatools.connectivity.oda.consumer.helper.OdaRe sultSet.next(OdaResultSet.java:177)
at org.eclipse.birt.data.engine.odaconsumer.ResultSet.fetch(Res ultSet.java:139)
at org.eclipse.birt.data.engine.executor.cache.OdiAdapter.fetch (OdiAdapter.java:145)
at org.eclipse.birt.data.engine.executor.cache.RowResultSet.nex t(RowResultSet.java:102)
at org.eclipse.birt.data.engine.executor.transform.SimpleResult Set.next(SimpleResultSet.java:356)
at org.eclipse.birt.data.engine.impl.ResultIterator.hasNextRow( ResultIterator.java:480)
at org.eclipse.birt.data.engine.impl.ResultIterator.next(Result Iterator.java:419)
at org.eclipse.birt.data.engine.impl.ResultIterator.close(Resul tIterator.java:884)
at org.eclipse.birt.report.engine.data.dte.QueryResultSet.close (QueryResultSet.java:272)
at org.eclipse.birt.report.engine.executor.QueryItemExecutor.cl oseQuery(QueryItemExecutor.java:46)
at org.eclipse.birt.report.engine.executor.TableItemExecutor.cl ose(TableItemExecutor.java:107)
at org.eclipse.birt.report.engine.internal.executor.wrap.Wrappe dReportItemExecutor.close(WrappedReportItemExecutor.java:39)
at org.eclipse.birt.report.engine.internal.executor.emitter.Rep ortItemEmitterExecutor.close(ReportItemEmitterExecutor.java: 40)

etc......
Re: Scripted dataset problem [message #642317 is a reply to message #642309] Tue, 30 November 2010 18:52 Go to previous messageGo to next message
Jason Weathersby is currently offline Jason WeathersbyFriend
Messages: 9167
Registered: July 2009
Senior Member

Can you post the changed version?

Jason

On 11/30/2010 1:13 PM, Don wrote:
> Jason,
>
> I made the changes you suggested but received the same results...
>
>
> [11/30/10 13:08:49:780 EST] 00000026 odaconsumer E
> org.eclipse.birt.data.engine.odaconsumer.ResultSet fetch Cannot fetch
> the next data row.
> Cannot move down to next row in the result set.
> SQL error #1: [jcc][t4][10120][10898][3.52.95] Invalid operation: result
> set is closed. ERRORCODE=-4470, SQLSTATE=null
>
> org.eclipse.birt.report.data.oda.jdbc.JDBCException: Cannot move down to
> next row in the result set.
> SQL error #1: [jcc][t4][10120][10898][3.52.95] Invalid operation: result
> set is closed. ERRORCODE=-4470, SQLSTATE=null
> ;
> com.ibm.db2.jcc.a.SqlException: [jcc][t4][10120][10898][3.52.95] Invalid
> operation: result set is closed. ERRORCODE=-4470, SQLSTATE=null
> at org.eclipse.birt.report.data.oda.jdbc.ResultSet.next(ResultS
> et.java:182)
> at org.eclipse.datatools.connectivity.oda.consumer.helper.OdaRe
> sultSet.next(OdaResultSet.java:177)
> at org.eclipse.birt.data.engine.odaconsumer.ResultSet.fetch(Res
> ultSet.java:139)
> at org.eclipse.birt.data.engine.executor.cache.OdiAdapter.fetch
> (OdiAdapter.java:145)
> at org.eclipse.birt.data.engine.executor.cache.RowResultSet.nex
> t(RowResultSet.java:102)
> at org.eclipse.birt.data.engine.executor.transform.SimpleResult
> Set.next(SimpleResultSet.java:356)
> at org.eclipse.birt.data.engine.impl.ResultIterator.hasNextRow(
> ResultIterator.java:480)
> at org.eclipse.birt.data.engine.impl.ResultIterator.next(Result
> Iterator.java:419)
> at org.eclipse.birt.data.engine.impl.ResultIterator.close(Resul
> tIterator.java:884)
> at org.eclipse.birt.report.engine.data.dte.QueryResultSet.close
> (QueryResultSet.java:272)
> at org.eclipse.birt.report.engine.executor.QueryItemExecutor.cl
> oseQuery(QueryItemExecutor.java:46)
> at org.eclipse.birt.report.engine.executor.TableItemExecutor.cl
> ose(TableItemExecutor.java:107)
> at org.eclipse.birt.report.engine.internal.executor.wrap.Wrappe
> dReportItemExecutor.close(WrappedReportItemExecutor.java:39)
> at org.eclipse.birt.report.engine.internal.executor.emitter.Rep
> ortItemEmitterExecutor.close(ReportItemEmitterExecutor.java: 40)
>
> etc......
Re: Scripted dataset problem [message #642324 is a reply to message #641969] Tue, 30 November 2010 19:25 Go to previous messageGo to next message
Don Wood is currently offline Don WoodFriend
Messages: 32
Registered: February 2010
Location: Pennsylvania
Member
Jason,

Here's the XML for the changed report.


<?xml version="1.0" encoding="UTF-8"?>
<report xmlns="http://www.eclipse.org/birt/2005/design" version="3.2.17" id="1">
<property name="createdBy">Eclipse BIRT Designer Version 2.3.2.r232_20090202 Build &lt;2.3.2.v20090218-0730></property>
<property name="units">in</property>
<method name="initialize"><![CDATA[/*importPackage(Packages.java.util.*);
globalvarList = new java.util.ArrayList();
prgCount = 0;
*/]]></method>
<method name="beforeFactory"><![CDATA[importPackage(Packages.java.util.*);
globalvarList = new java.util.ArrayList();
prgCount = 0;
]]></method>
<property name="iconFile">/templates/blank_report.gif</property>
<property name="bidiLayoutOrientation">ltr</property>
<data-sources>
<oda-data-source extensionID="org.eclipse.birt.report.data.oda.jdbc" name="MPMSDB" id="7">
<property name="odaDriverClass">com.ibm.db2.jcc.DB2Driver</property >
<property name="odaURL">jdbc:db2://pddevgwdsnd2k01:50000/DSN</property>
<property name="odaUser">mpmspgm</property>
<encrypted-property name="odaPassword" encryptionID="base64">bXBtczAx</encrypted-property>
<property name="odaJndiName">jdbc/MPMS</property>
</oda-data-source>
<script-data-source name="scriptedDataSource" id="31"/>
</data-sources>
<data-sets>
<oda-data-set extensionID="org.eclipse.birt.report.data.oda.jdbc.JdbcSelectDataSet " name="db2DataSet" id="8">
<list-property name="columnHints">
<structure>
<property name="columnName">PRG_ID</property>
<property name="displayName">PRG_ID</property>
</structure>
<structure>
<property name="columnName">PRG_STS_CD</property>
<property name="displayName">PRG_STS_CD</property>
</structure>
<structure>
<property name="columnName">PRG_TYPE_CD</property>
<property name="displayName">PRG_TYPE_CD</property>
</structure>
</list-property>
<structure name="cachedMetaData">
<list-property name="resultSet">
<structure>
<property name="position">1</property>
<property name="name">PRG_ID</property>
<property name="dataType">integer</property>
</structure>
<structure>
<property name="position">2</property>
<property name="name">PRG_STS_CD</property>
<property name="dataType">string</property>
</structure>
<structure>
<property name="position">3</property>
<property name="name">PRG_TYPE_CD</property>
<property name="dataType">string</property>
</structure>
</list-property>
</structure>
<property name="dataSource">MPMSDB</property>
<method name="onFetch"><![CDATA[/*//list = new java.util.ArrayList();

var data={};
//data.prg_id = row["PRG_ID"];
//data.prg_type_cd = row["PRG_TYPE_CD"];
//data.prg_sts_cd = row["PRG_STS_CD"];

data.prg_id = row.PRG_ID;
data.prg_type_cd = row.PRG_TYPE_CD;
data.prg_sts_cd = row.PRG_STS_CD;

globalvarList.add(data);
//globalvarList = list;
*/]]></method>
<list-property name="resultSet">
<structure>
<property name="position">1</property>
<property name="name">PRG_ID</property>
<property name="nativeName">PRG_ID</property>
<property name="dataType">integer</property>
<property name="nativeDataType">4</property>
</structure>
<structure>
<property name="position">2</property>
<property name="name">PRG_STS_CD</property>
<property name="nativeName">PRG_STS_CD</property>
<property name="dataType">string</property>
<property name="nativeDataType">12</property>
</structure>
<structure>
<property name="position">3</property>
<property name="name">PRG_TYPE_CD</property>
<property name="nativeName">PRG_TYPE_CD</property>
<property name="dataType">string</property>
<property name="nativeDataType">12</property>
</structure>
</list-property>
<property name="queryText">select prg_id, prg_sts_cd, prg_type_cd
from mpmsprod.t001program
where prg_id > 300
order by prg_type_cd, prg_id</property>
</oda-data-set>
<script-data-set name="scriptedDataSet" id="32">
<list-property name="resultSetHints">
<structure>
<property name="position">1</property>
<property name="name">PRG_ID</property>
<property name="dataType">integer</property>
</structure>
<structure>
<property name="position">2</property>
<property name="name">PRG_TYPE_CD</property>
<property name="dataType">string</property>
</structure>
<structure>
<property name="position">3</property>
<property name="name">PRG_STS_CD</property>
<property name="dataType">string</property>
</structure>
<structure>
<property name="position">4</property>
<property name="name">programCount</property>
<property name="dataType">integer</property>
</structure>
</list-property>
<list-property name="columnHints">
<structure>
<property name="columnName">PRG_ID</property>
<property name="displayName">Program ID</property>
</structure>
<structure>
<property name="columnName">PRG_TYPE_CD</property>
<property name="displayName">Program Type</property>
</structure>
<structure>
<property name="columnName">PRG_STS_CD</property>
<property name="displayName">Program Status</property>
</structure>
<structure>
<property name="columnName">programCount</property>
<property name="displayName"># of Rows</property>
</structure>
</list-property>
<structure name="cachedMetaData">
<list-property name="resultSet">
<structure>
<property name="position">1</property>
<property name="name">PRG_ID</property>
<property name="dataType">integer</property>
</structure>
<structure>
<property name="position">2</property>
<property name="name">PRG_TYPE_CD</property>
<property name="dataType">string</property>
</structure>
<structure>
<property name="position">3</property>
<property name="name">PRG_STS_CD</property>
<property name="dataType">string</property>
</structure>
<structure>
<property name="position">4</property>
<property name="name">programCount</property>
<property name="dataType">integer</property>
</structure>
</list-property>
</structure>
<property name="dataSource">scriptedDataSource</property>
<method name="fetch"><![CDATA[if(prgCount < globalvarList.size())
{
var data = globalvarList.get(prgCount);

var prgId = data.prg_id;

if (prgId > 400)
{
row["PRG_ID"] = data.prg_id;
}
else
{
row["PRG_ID"] = 2;
}
row["PRG_TYPE_CD"] = data.prg_type_cd;
row["PRG_STS_CD"] =data.prg_sts_cd;
row["programCount"] = globalvarList.size();
prgCount++;
return true;
}
else
{
return false;
}
]]></method>
</script-data-set>
</data-sets>
<styles>
<style name="report" id="4">
<property name="fontFamily">"Verdana"</property>
<property name="fontSize">10pt</property>
</style>
<style name="crosstab" 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-cell" 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">
<property name="topMargin">0.25in</property>
<property name="leftMargin">0.25in</property>
<property name="bottomMargin">0.25in</property>
<property name="rightMargin">0.25in</property>
<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="9">
<property name="width">100%</property>
<property name="dataSet">db2DataSet</property>
<list-property name="visibility">
<structure>
<property name="format">all</property>
<expression name="valueExpr">true</expression>
</structure>
</list-property>
<list-property name="boundDataColumns">
<structure>
<property name="name">PRG_ID</property>
<property name="displayName">PRG_ID</property>
<expression name="expression">dataSetRow["PRG_ID"]</expression>
<property name="dataType">integer</property>
</structure>
<structure>
<property name="name">PRG_STS_CD</property>
<property name="displayName">PRG_STS_CD</property>
<expression name="expression">dataSetRow["PRG_STS_CD"]</expression>
<property name="dataType">string</property>
</structure>
<structure>
<property name="name">PRG_TYPE_CD</property>
<property name="displayName">PRG_TYPE_CD</property>
<expression name="expression">dataSetRow["PRG_TYPE_CD"]</expression >
<property name="dataType">string</property>
</structure>
</list-property>
<method name="onCreate"><![CDATA[var data={};

data.prg_id = this.getRowData().getColumnValue("PRG_ID");
data.prg_type_cd = this.getRowData().getColumnValue("PRG_TYPE_CD");
data.prg_sts_cd = this.getRowData().getColumnValue("PRG_STS_CD");

globalvarList.add(data);
]]></method>
<column id="28">
<property name="textAlign">center</property>
</column>
<column id="29">
<property name="textAlign">center</property>
</column>
<column id="30">
<property name="textAlign">center</property>
</column>
<header>
<row id="10">
<cell id="11">
<label id="12">
<text-property name="text">PRG_ID from db2DataSet</text-property>
</label>
</cell>
<cell id="13">
<label id="14">
<text-property name="text">PRG_STS_CD from db2DataSet</text-property>
</label>
</cell>
<cell id="15">
<label id="16">
<text-property name="text">PRG_TYPE_CD from db2DataSet</text-property>
</label>
</cell>
</row>
</header>
<detail>
<row id="17">
<cell id="18">
<data id="19">
<property name="resultSetColumn">PRG_ID</property>
</data>
</cell>
<cell id="20">
<data id="21">
<property name="resultSetColumn">PRG_STS_CD</property>
</data>
</cell>
<cell id="22">
<data id="23">
<property name="resultSetColumn">PRG_TYPE_CD</property>
</data>
</cell>
</row>
</detail>
<footer>
<row id="24">
<cell id="25"/>
<cell id="26"/>
<cell id="27"/>
</row>
</footer>
</table>
<table id="33">
<property name="width">100%</property>
<property name="dataSet">scriptedDataSet</property>
<list-property name="boundDataColumns">
<structure>
<property name="name">PRG_ID</property>
<property name="displayName">Program ID</property>
<expression name="expression">dataSetRow["PRG_ID"]</expression>
<property name="dataType">integer</property>
</structure>
<structure>
<property name="name">PRG_TYPE_CD</property>
<property name="displayName">Program Type</property>
<expression name="expression">dataSetRow["PRG_TYPE_CD"]</expression >
<property name="dataType">string</property>
</structure>
<structure>
<property name="name">PRG_STS_CD</property>
<property name="displayName">Program Status</property>
<expression name="expression">dataSetRow["PRG_STS_CD"]</expression>
<property name="dataType">string</property>
</structure>
<structure>
<property name="name">programCount</property>
<property name="displayName"># of Rows</property>
<expression name="expression">dataSetRow["programCount"]</expression >
<property name="dataType">integer</property>
</structure>
</list-property>
<column id="52">
<property name="textAlign">center</property>
</column>
<column id="53">
<property name="textAlign">center</property>
</column>
<column id="54">
<property name="textAlign">center</property>
</column>
<column id="58">
<property name="textAlign">center</property>
</column>
<header>
<row id="34">
<cell id="35">
<label id="36">
<text-property name="text">Program ID</text-property>
</label>
</cell>
<cell id="37">
<label id="38">
<text-property name="text">Program Type</text-property>
</label>
</cell>
<cell id="39">
<label id="40">
<text-property name="text">Program Status</text-property>
</label>
</cell>
<cell id="55">
<label id="59">
<text-property name="text"># of Rows</text-property>
</label>
</cell>
</row>
</header>
<detail>
<row id="41">
<cell id="42">
<data id="43">
<property name="resultSetColumn">PRG_ID</property>
</data>
</cell>
<cell id="44">
<data id="45">
<property name="resultSetColumn">PRG_TYPE_CD</property>
</data>
</cell>
<cell id="46">
<data id="47">
<property name="resultSetColumn">PRG_STS_CD</property>
</data>
</cell>
<cell id="56">
<data id="60">
<property name="resultSetColumn">programCount</property>
</data>
</cell>
</row>
</detail>
<footer>
<row id="48">
<cell id="49"/>
<cell id="50"/>
<cell id="51"/>
<cell id="57"/>
</row>
</footer>
</table>
</body>
</report>
Re: Scripted dataset problem [message #642565 is a reply to message #642324] Wed, 01 December 2010 19:11 Go to previous messageGo to next message
Jason Weathersby is currently offline Jason WeathersbyFriend
Messages: 9167
Registered: July 2009
Senior Member

Don,

Not sure this is the issue but you put the script on the table oncreate.
It needs to be on the table detail row oncreate.

You could write out a file in the row oncreate to verify the object is
being loaded.

importPackage( Packages.java.io );
out = new PrintWriter( new FileWriter( "c:/test/events.txt", true ) );
out.println( "oncreate event");
out.close();

Jason

On 11/30/2010 2:25 PM, Don wrote:
> Jason,
>
> Here's the XML for the changed report.
>
>
> <?xml version="1.0" encoding="UTF-8"?>
> <report xmlns="http://www.eclipse.org/birt/2005/design" version="3.2.17"
> id="1">
> <property name="createdBy">Eclipse BIRT Designer Version
> 2.3.2.r232_20090202 Build <2.3.2.v20090218-0730></property>
> <property name="units">in</property>
> <method name="initialize"><![CDATA[/*importPackage(Packages.java.util.*);
> globalvarList = new java.util.ArrayList();
> prgCount = 0;
> */]]></method>
> <method name="beforeFactory"><![CDATA[importPackage(Packages.java.util.*);
> globalvarList = new java.util.ArrayList();
> prgCount = 0;
> ]]></method>
> <property name="iconFile">/templates/blank_report.gif</property>
> <property name="bidiLayoutOrientation">ltr</property>
> <data-sources>
> <oda-data-source extensionID="org.eclipse.birt.report.data.oda.jdbc"
> name="MPMSDB" id="7">
> <property name="odaDriverClass">com.ibm.db2.jcc.DB2Driver</property >
> <property name="odaURL">jdbc:db2://pddevgwdsnd2k01:50000/DSN</property>
> <property name="odaUser">mpmspgm</property>
> <encrypted-property name="odaPassword"
> encryptionID="base64">bXBtczAx</encrypted-property>
> <property name="odaJndiName">jdbc/MPMS</property>
> </oda-data-source>
> <script-data-source name="scriptedDataSource" id="31"/>
> </data-sources>
> <data-sets>
> <oda-data-set
> extensionID="org.eclipse.birt.report.data.oda.jdbc.JdbcSelectDataSet "
> name="db2DataSet" id="8">
> <list-property name="columnHints">
> <structure>
> <property name="columnName">PRG_ID</property>
> <property name="displayName">PRG_ID</property>
> </structure>
> <structure>
> <property name="columnName">PRG_STS_CD</property>
> <property name="displayName">PRG_STS_CD</property>
> </structure>
> <structure>
> <property name="columnName">PRG_TYPE_CD</property>
> <property name="displayName">PRG_TYPE_CD</property>
> </structure>
> </list-property>
> <structure name="cachedMetaData">
> <list-property name="resultSet">
> <structure>
> <property name="position">1</property>
> <property name="name">PRG_ID</property>
> <property name="dataType">integer</property>
> </structure>
> <structure>
> <property name="position">2</property>
> <property name="name">PRG_STS_CD</property>
> <property name="dataType">string</property>
> </structure>
> <structure>
> <property name="position">3</property>
> <property name="name">PRG_TYPE_CD</property>
> <property name="dataType">string</property>
> </structure>
> </list-property>
> </structure>
> <property name="dataSource">MPMSDB</property>
> <method name="onFetch"><![CDATA[/*//list = new java.util.ArrayList();
>
> var data={};
> //data.prg_id = row["PRG_ID"];
> //data.prg_type_cd = row["PRG_TYPE_CD"];
> //data.prg_sts_cd = row["PRG_STS_CD"];
>
> data.prg_id = row.PRG_ID;
> data.prg_type_cd = row.PRG_TYPE_CD;
> data.prg_sts_cd = row.PRG_STS_CD;
>
> globalvarList.add(data);
> //globalvarList = list;
> */]]></method>
> <list-property name="resultSet">
> <structure>
> <property name="position">1</property>
> <property name="name">PRG_ID</property>
> <property name="nativeName">PRG_ID</property>
> <property name="dataType">integer</property>
> <property name="nativeDataType">4</property>
> </structure>
> <structure>
> <property name="position">2</property>
> <property name="name">PRG_STS_CD</property>
> <property name="nativeName">PRG_STS_CD</property>
> <property name="dataType">string</property>
> <property name="nativeDataType">12</property>
> </structure>
> <structure>
> <property name="position">3</property>
> <property name="name">PRG_TYPE_CD</property>
> <property name="nativeName">PRG_TYPE_CD</property>
> <property name="dataType">string</property>
> <property name="nativeDataType">12</property>
> </structure>
> </list-property>
> <property name="queryText">select prg_id, prg_sts_cd, prg_type_cd
> from mpmsprod.t001program
> where prg_id > 300
> order by prg_type_cd, prg_id</property>
> </oda-data-set>
> <script-data-set name="scriptedDataSet" id="32">
> <list-property name="resultSetHints">
> <structure>
> <property name="position">1</property>
> <property name="name">PRG_ID</property>
> <property name="dataType">integer</property>
> </structure>
> <structure>
> <property name="position">2</property>
> <property name="name">PRG_TYPE_CD</property>
> <property name="dataType">string</property>
> </structure>
> <structure>
> <property name="position">3</property>
> <property name="name">PRG_STS_CD</property>
> <property name="dataType">string</property>
> </structure>
> <structure>
> <property name="position">4</property>
> <property name="name">programCount</property>
> <property name="dataType">integer</property>
> </structure>
> </list-property>
> <list-property name="columnHints">
> <structure>
> <property name="columnName">PRG_ID</property>
> <property name="displayName">Program ID</property>
> </structure>
> <structure>
> <property name="columnName">PRG_TYPE_CD</property>
> <property name="displayName">Program Type</property>
> </structure>
> <structure>
> <property name="columnName">PRG_STS_CD</property>
> <property name="displayName">Program Status</property>
> </structure>
> <structure>
> <property name="columnName">programCount</property>
> <property name="displayName"># of Rows</property>
> </structure>
> </list-property>
> <structure name="cachedMetaData">
> <list-property name="resultSet">
> <structure>
> <property name="position">1</property>
> <property name="name">PRG_ID</property>
> <property name="dataType">integer</property>
> </structure>
> <structure>
> <property name="position">2</property>
> <property name="name">PRG_TYPE_CD</property>
> <property name="dataType">string</property>
> </structure>
> <structure>
> <property name="position">3</property>
> <property name="name">PRG_STS_CD</property>
> <property name="dataType">string</property>
> </structure>
> <structure>
> <property name="position">4</property>
> <property name="name">programCount</property>
> <property name="dataType">integer</property>
> </structure>
> </list-property>
> </structure>
> <property name="dataSource">scriptedDataSource</property>
> <method name="fetch"><![CDATA[if(prgCount < globalvarList.size())
> {
> var data = globalvarList.get(prgCount);
>
> var prgId = data.prg_id;
>
> if (prgId > 400)
> { row["PRG_ID"] = data.prg_id;
> }
> else
> {
> row["PRG_ID"] = 2;
> }
> row["PRG_TYPE_CD"] = data.prg_type_cd;
> row["PRG_STS_CD"] =data.prg_sts_cd;
> row["programCount"] = globalvarList.size();
> prgCount++;
> return true;
> }
> else
> {
> return false;
> }
> ]]></method>
> </script-data-set>
> </data-sets>
> <styles>
> <style name="report" id="4">
> <property name="fontFamily">"Verdana"</property>
> <property name="fontSize">10pt</property>
> </style>
> <style name="crosstab" 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-cell" 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">
> <property name="topMargin">0.25in</property>
> <property name="leftMargin">0.25in</property>
> <property name="bottomMargin">0.25in</property>
> <property name="rightMargin">0.25in</property>
> <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="9">
> <property name="width">100%</property>
> <property name="dataSet">db2DataSet</property>
> <list-property name="visibility">
> <structure>
> <property name="format">all</property>
> <expression name="valueExpr">true</expression>
> </structure>
> </list-property>
> <list-property name="boundDataColumns">
> <structure>
> <property name="name">PRG_ID</property>
> <property name="displayName">PRG_ID</property>
> <expression name="expression">dataSetRow["PRG_ID"]</expression>
> <property name="dataType">integer</property>
> </structure>
> <structure>
> <property name="name">PRG_STS_CD</property>
> <property name="displayName">PRG_STS_CD</property>
> <expression name="expression">dataSetRow["PRG_STS_CD"]</expression>
> <property name="dataType">string</property>
> </structure>
> <structure>
> <property name="name">PRG_TYPE_CD</property>
> <property name="displayName">PRG_TYPE_CD</property>
> <expression name="expression">dataSetRow["PRG_TYPE_CD"]</expression >
> <property name="dataType">string</property>
> </structure>
> </list-property>
> <method name="onCreate"><![CDATA[var data={};
>
> data.prg_id = this.getRowData().getColumnValue("PRG_ID");
> data.prg_type_cd = this.getRowData().getColumnValue("PRG_TYPE_CD");
> data.prg_sts_cd = this.getRowData().getColumnValue("PRG_STS_CD");
> globalvarList.add(data);
> ]]></method>
> <column id="28">
> <property name="textAlign">center</property>
> </column>
> <column id="29">
> <property name="textAlign">center</property>
> </column>
> <column id="30">
> <property name="textAlign">center</property>
> </column>
> <header>
> <row id="10">
> <cell id="11">
> <label id="12">
> <text-property name="text">PRG_ID from db2DataSet</text-property>
> </label>
> </cell>
> <cell id="13">
> <label id="14">
> <text-property name="text">PRG_STS_CD from db2DataSet</text-property>
> </label>
> </cell>
> <cell id="15">
> <label id="16">
> <text-property name="text">PRG_TYPE_CD from db2DataSet</text-property>
> </label>
> </cell>
> </row>
> </header>
> <detail>
> <row id="17">
> <cell id="18">
> <data id="19">
> <property name="resultSetColumn">PRG_ID</property>
> </data>
> </cell>
> <cell id="20">
> <data id="21">
> <property name="resultSetColumn">PRG_STS_CD</property>
> </data>
> </cell>
> <cell id="22">
> <data id="23">
> <property name="resultSetColumn">PRG_TYPE_CD</property>
> </data>
> </cell>
> </row>
> </detail>
> <footer>
> <row id="24">
> <cell id="25"/>
> <cell id="26"/>
> <cell id="27"/>
> </row>
> </footer>
> </table>
> <table id="33">
> <property name="width">100%</property>
> <property name="dataSet">scriptedDataSet</property>
> <list-property name="boundDataColumns">
> <structure>
> <property name="name">PRG_ID</property>
> <property name="displayName">Program ID</property>
> <expression name="expression">dataSetRow["PRG_ID"]</expression>
> <property name="dataType">integer</property>
> </structure>
> <structure>
> <property name="name">PRG_TYPE_CD</property>
> <property name="displayName">Program Type</property>
> <expression name="expression">dataSetRow["PRG_TYPE_CD"]</expression >
> <property name="dataType">string</property>
> </structure>
> <structure>
> <property name="name">PRG_STS_CD</property>
> <property name="displayName">Program Status</property>
> <expression name="expression">dataSetRow["PRG_STS_CD"]</expression>
> <property name="dataType">string</property>
> </structure>
> <structure>
> <property name="name">programCount</property>
> <property name="displayName"># of Rows</property>
> <expression name="expression">dataSetRow["programCount"]</expression >
> <property name="dataType">integer</property>
> </structure>
> </list-property>
> <column id="52">
> <property name="textAlign">center</property>
> </column>
> <column id="53">
> <property name="textAlign">center</property>
> </column>
> <column id="54">
> <property name="textAlign">center</property>
> </column>
> <column id="58">
> <property name="textAlign">center</property>
> </column>
> <header>
> <row id="34">
> <cell id="35">
> <label id="36">
> <text-property name="text">Program ID</text-property>
> </label>
> </cell>
> <cell id="37">
> <label id="38">
> <text-property name="text">Program Type</text-property>
> </label>
> </cell>
> <cell id="39">
> <label id="40">
> <text-property name="text">Program Status</text-property>
> </label>
> </cell>
> <cell id="55">
> <label id="59">
> <text-property name="text"># of Rows</text-property>
> </label>
> </cell>
> </row>
> </header>
> <detail>
> <row id="41">
> <cell id="42">
> <data id="43">
> <property name="resultSetColumn">PRG_ID</property>
> </data>
> </cell>
> <cell id="44">
> <data id="45">
> <property name="resultSetColumn">PRG_TYPE_CD</property>
> </data>
> </cell>
> <cell id="46">
> <data id="47">
> <property name="resultSetColumn">PRG_STS_CD</property>
> </data>
> </cell>
> <cell id="56">
> <data id="60">
> <property name="resultSetColumn">programCount</property>
> </data>
> </cell>
> </row>
> </detail>
> <footer>
> <row id="48">
> <cell id="49"/>
> <cell id="50"/>
> <cell id="51"/>
> <cell id="57"/>
> </row>
> </footer>
> </table>
> </body>
> </report>
>
Re: Scripted dataset problem [message #642728 is a reply to message #641969] Thu, 02 December 2010 14:23 Go to previous messageGo to next message
Don Wood is currently offline Don WoodFriend
Messages: 32
Registered: February 2010
Location: Pennsylvania
Member
Jason,

I moved the code from the onCreate of the table to the onCreate of the table row. Unfortunately, I received the same errors.

I also added the code to print to a text file on my c drive. This was populated when I ran the report so it is creating the table which is bound to the database-related dataset. Apparently it's failing when attempting to create either the scripted dataset or the table to which its bound.

Does this error occur in the BIRT 2.6 viewer?

It appears that our only alternative at this point (at least for this particular report) is to instantiate the engine in our app, run it, and embed the output in our jsp page. Would you agree?

Here's the xml for the changes I made.

<?xml version="1.0" encoding="UTF-8"?>
<report xmlns="http://www.eclipse.org/birt/2005/design" version="3.2.17" id="1">
<property name="createdBy">Eclipse BIRT Designer Version 2.3.2.r232_20090202 Build &lt;2.3.2.v20090218-0730></property>
<property name="units">in</property>
<method name="beforeFactory"><![CDATA[importPackage(Packages.java.util.*);
globalvarList = new java.util.ArrayList();
prgCount = 0;]]></method>
<property name="iconFile">/templates/blank_report.gif</property>
<property name="bidiLayoutOrientation">ltr</property>
<data-sources>
<oda-data-source extensionID="org.eclipse.birt.report.data.oda.jdbc" name="MPMSDB" id="7">
<property name="odaDriverClass">com.ibm.db2.jcc.DB2Driver</property >
<property name="odaURL">jdbc:db2://pddevgwdsnd2k01:50000/DSN</property>
<property name="odaUser">mpmspgm</property>
<encrypted-property name="odaPassword" encryptionID="base64">bXBtczAx</encrypted-property>
<property name="odaJndiName">jdbc/MPMS</property>
</oda-data-source>
<script-data-source name="scriptedDataSource" id="31"/>
</data-sources>
<data-sets>
<oda-data-set extensionID="org.eclipse.birt.report.data.oda.jdbc.JdbcSelectDataSet " name="db2DataSet" id="8">
<list-property name="columnHints">
<structure>
<property name="columnName">PRG_ID</property>
<property name="displayName">PRG_ID</property>
</structure>
<structure>
<property name="columnName">PRG_STS_CD</property>
<property name="displayName">PRG_STS_CD</property>
</structure>
<structure>
<property name="columnName">PRG_TYPE_CD</property>
<property name="displayName">PRG_TYPE_CD</property>
</structure>
</list-property>
<structure name="cachedMetaData">
<list-property name="resultSet">
<structure>
<property name="position">1</property>
<property name="name">PRG_ID</property>
<property name="dataType">integer</property>
</structure>
<structure>
<property name="position">2</property>
<property name="name">PRG_STS_CD</property>
<property name="dataType">string</property>
</structure>
<structure>
<property name="position">3</property>
<property name="name">PRG_TYPE_CD</property>
<property name="dataType">string</property>
</structure>
</list-property>
</structure>
<property name="dataSource">MPMSDB</property>
<list-property name="resultSet">
<structure>
<property name="position">1</property>
<property name="name">PRG_ID</property>
<property name="nativeName">PRG_ID</property>
<property name="dataType">integer</property>
<property name="nativeDataType">4</property>
</structure>
<structure>
<property name="position">2</property>
<property name="name">PRG_STS_CD</property>
<property name="nativeName">PRG_STS_CD</property>
<property name="dataType">string</property>
<property name="nativeDataType">12</property>
</structure>
<structure>
<property name="position">3</property>
<property name="name">PRG_TYPE_CD</property>
<property name="nativeName">PRG_TYPE_CD</property>
<property name="dataType">string</property>
<property name="nativeDataType">12</property>
</structure>
</list-property>
<property name="queryText">select prg_id, prg_sts_cd, prg_type_cd
from mpmsprod.t001program
where prg_id > 300
order by prg_type_cd, prg_id</property>
</oda-data-set>
<script-data-set name="scriptedDataSet" id="32">
<list-property name="resultSetHints">
<structure>
<property name="position">1</property>
<property name="name">PRG_ID</property>
<property name="dataType">integer</property>
</structure>
<structure>
<property name="position">2</property>
<property name="name">PRG_TYPE_CD</property>
<property name="dataType">string</property>
</structure>
<structure>
<property name="position">3</property>
<property name="name">PRG_STS_CD</property>
<property name="dataType">string</property>
</structure>
<structure>
<property name="position">4</property>
<property name="name">programCount</property>
<property name="dataType">integer</property>
</structure>
</list-property>
<list-property name="columnHints">
<structure>
<property name="columnName">PRG_ID</property>
<property name="displayName">Program ID</property>
</structure>
<structure>
<property name="columnName">PRG_TYPE_CD</property>
<property name="displayName">Program Type</property>
</structure>
<structure>
<property name="columnName">PRG_STS_CD</property>
<property name="displayName">Program Status</property>
</structure>
<structure>
<property name="columnName">programCount</property>
<property name="displayName"># of Rows</property>
</structure>
</list-property>
<structure name="cachedMetaData">
<list-property name="resultSet">
<structure>
<property name="position">1</property>
<property name="name">PRG_ID</property>
<property name="dataType">integer</property>
</structure>
<structure>
<property name="position">2</property>
<property name="name">PRG_TYPE_CD</property>
<property name="dataType">string</property>
</structure>
<structure>
<property name="position">3</property>
<property name="name">PRG_STS_CD</property>
<property name="dataType">string</property>
</structure>
<structure>
<property name="position">4</property>
<property name="name">programCount</property>
<property name="dataType">integer</property>
</structure>
</list-property>
</structure>
<property name="dataSource">scriptedDataSource</property>
<method name="fetch"><![CDATA[if(prgCount < globalvarList.size())
{
var data = globalvarList.get(prgCount);

var prgId = data.prg_id;

if (prgId > 400)
{
row["PRG_ID"] = data.prg_id;
}
else
{
row["PRG_ID"] = 2;
}
row["PRG_TYPE_CD"] = data.prg_type_cd;
row["PRG_STS_CD"] =data.prg_sts_cd;
row["programCount"] = globalvarList.size();
prgCount++;
return true;
}
else
{
return false;
}
]]></method>
</script-data-set>
</data-sets>
<styles>
<style name="report" id="4">
<property name="fontFamily">"Verdana"</property>
<property name="fontSize">10pt</property>
</style>
<style name="crosstab" 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-cell" 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">
<property name="topMargin">0.25in</property>
<property name="leftMargin">0.25in</property>
<property name="bottomMargin">0.25in</property>
<property name="rightMargin">0.25in</property>
<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="9">
<property name="width">100%</property>
<property name="dataSet">db2DataSet</property>
<list-property name="visibility">
<structure>
<property name="format">all</property>
<expression name="valueExpr">true</expression>
</structure>
</list-property>
<list-property name="boundDataColumns">
<structure>
<property name="name">PRG_ID</property>
<property name="displayName">PRG_ID</property>
<expression name="expression">dataSetRow["PRG_ID"]</expression>
<property name="dataType">integer</property>
</structure>
<structure>
<property name="name">PRG_STS_CD</property>
<property name="displayName">PRG_STS_CD</property>
<expression name="expression">dataSetRow["PRG_STS_CD"]</expression>
<property name="dataType">string</property>
</structure>
<structure>
<property name="name">PRG_TYPE_CD</property>
<property name="displayName">PRG_TYPE_CD</property>
<expression name="expression">dataSetRow["PRG_TYPE_CD"]</expression >
<property name="dataType">string</property>
</structure>
</list-property>
<method name="onCreate"><![CDATA[/*var data={};

data.prg_id = this.getRowData().getColumnValue("PRG_ID");
data.prg_type_cd = this.getRowData().getColumnValue("PRG_TYPE_CD");
data.prg_sts_cd = this.getRowData().getColumnValue("PRG_STS_CD");

globalvarList.add(data);
*/]]></method>
<column id="28">
<property name="textAlign">center</property>
</column>
<column id="29">
<property name="textAlign">center</property>
</column>
<column id="30">
<property name="textAlign">center</property>
</column>
<header>
<row id="10">
<cell id="11">
<label id="12">
<text-property name="text">PRG_ID from db2DataSet</text-property>
</label>
</cell>
<cell id="13">
<label id="14">
<text-property name="text">PRG_STS_CD from db2DataSet</text-property>
</label>
</cell>
<cell id="15">
<label id="16">
<text-property name="text">PRG_TYPE_CD from db2DataSet</text-property>
</label>
</cell>
</row>
</header>
<detail>
<row id="17">
<method name="onCreate"><![CDATA[var data={};

data.prg_id = row.PRG_ID;
data.prg_type_cd = row.PRG_TYPE_CD;
data.prg_sts_cd = row.PRG_STS_CD;

globalvarList.add(data);

importPackage( Packages.java.io );
out = new PrintWriter( new FileWriter( "c:/birttest/events.txt", true ) );
out.println( "oncreate event");
out.close();
]]></method>
<cell id="18">
<data id="19">
<property name="resultSetColumn">PRG_ID</property>
</data>
</cell>
<cell id="20">
<data id="21">
<property name="resultSetColumn">PRG_STS_CD</property>
</data>
</cell>
<cell id="22">
<data id="23">
<property name="resultSetColumn">PRG_TYPE_CD</property>
</data>
</cell>
</row>
</detail>
<footer>
<row id="24">
<cell id="25"/>
<cell id="26"/>
<cell id="27"/>
</row>
</footer>
</table>
<table id="33">
<property name="width">100%</property>
<property name="dataSet">scriptedDataSet</property>
<list-property name="boundDataColumns">
<structure>
<property name="name">PRG_ID</property>
<property name="displayName">Program ID</property>
<expression name="expression">dataSetRow["PRG_ID"]</expression>
<property name="dataType">integer</property>
</structure>
<structure>
<property name="name">PRG_TYPE_CD</property>
<property name="displayName">Program Type</property>
<expression name="expression">dataSetRow["PRG_TYPE_CD"]</expression >
<property name="dataType">string</property>
</structure>
<structure>
<property name="name">PRG_STS_CD</property>
<property name="displayName">Program Status</property>
<expression name="expression">dataSetRow["PRG_STS_CD"]</expression>
<property name="dataType">string</property>
</structure>
<structure>
<property name="name">programCount</property>
<property name="displayName"># of Rows</property>
<expression name="expression">dataSetRow["programCount"]</expression >
<property name="dataType">integer</property>
</structure>
</list-property>
<column id="52">
<property name="textAlign">center</property>
</column>
<column id="53">
<property name="textAlign">center</property>
</column>
<column id="54">
<property name="textAlign">center</property>
</column>
<column id="58">
<property name="textAlign">center</property>
</column>
<header>
<row id="34">
<cell id="35">
<label id="36">
<text-property name="text">Program ID</text-property>
</label>
</cell>
<cell id="37">
<label id="38">
<text-property name="text">Program Type</text-property>
</label>
</cell>
<cell id="39">
<label id="40">
<text-property name="text">Program Status</text-property>
</label>
</cell>
<cell id="55">
<label id="59">
<text-property name="text"># of Rows</text-property>
</label>
</cell>
</row>
</header>
<detail>
<row id="41">
<cell id="42">
<data id="43">
<property name="resultSetColumn">PRG_ID</property>
</data>
</cell>
<cell id="44">
<data id="45">
<property name="resultSetColumn">PRG_TYPE_CD</property>
</data>
</cell>
<cell id="46">
<data id="47">
<property name="resultSetColumn">PRG_STS_CD</property>
</data>
</cell>
<cell id="56">
<data id="60">
<property name="resultSetColumn">programCount</property>
</data>
</cell>
</row>
</detail>
<footer>
<row id="48">
<cell id="49"/>
<cell id="50"/>
<cell id="51"/>
<cell id="57"/>
</row>
</footer>
</table>
</body>
</report>
Re: Scripted dataset problem [message #642761 is a reply to message #642728] Thu, 02 December 2010 15:51 Go to previous messageGo to next message
Jason Weathersby is currently offline Jason WeathersbyFriend
Messages: 9167
Registered: July 2009
Senior Member

Don,

Load the attached example and try to run it. It is similar to your
example and it worked on my install.

Jason

<?xml version="1.0" encoding="UTF-8"?>
<report xmlns="http://www.eclipse.org/birt/2005/design" version="3.2.17"
id="1">
<property name="createdBy">Eclipse BIRT Designer Version
2.3.2.r232_20090202 Build &lt;2.3.2.v20090218-0730></property>
<property name="units">in</property>
<method
name="beforeFactory"><![CDATA[importPackage(Packages.java.util.*);
globalvarList = new java.util.ArrayList();
prgCount = 0;]]></method>
<property name="iconFile">/templates/blank_report.gif</property>
<property name="bidiLayoutOrientation">ltr</property>
<data-sources>
<oda-data-source
extensionID="org.eclipse.birt.report.data.oda.jdbc" name="Data Source"
id="7">
<text-property name="displayName"></text-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>
<property name="OdaConnProfileName"></property>
</oda-data-source>
<script-data-source name="Scripted" id="8"/>
</data-sources>
<data-sets>
<oda-data-set
extensionID="org.eclipse.birt.report.data.oda.jdbc.JdbcSelectDataSet "
name="Data Set" id="9">
<list-property name="columnHints">
<structure>
<property name="columnName">ORDERNUMBER</property>
<property name="displayName">ORDERNUMBER</property>
</structure>
<structure>
<property name="columnName">PRODUCTCODE</property>
<property name="displayName">PRODUCTCODE</property>
</structure>
<structure>
<property name="columnName">QUANTITYORDERED</property>
<property name="displayName">QUANTITYORDERED</property>
</structure>
<structure>
<property name="columnName">PRICEEACH</property>
<property name="displayName">PRICEEACH</property>
</structure>
<structure>
<property name="columnName">ORDERLINENUMBER</property>
<property name="displayName">ORDERLINENUMBER</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>
<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>
<property name="queryText">select *
from orderdetails
where ordernumber = 10101</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:resultSetDefinitions>
</design:ResultSets>
</model:DesignValues>
]]></xml-property>
</oda-data-set>
<script-data-set name="ScriptedDataSet" id="44">
<list-property name="resultSetHints">
<structure>
<property name="position">0</property>
<property name="name">ON</property>
<property name="dataType">integer</property>
</structure>
<structure>
<property name="position">1</property>
<property name="name">PC</property>
<property name="dataType">string</property>
</structure>
<structure>
<property name="position">2</property>
<property name="name">QO</property>
<property name="dataType">integer</property>
</structure>
</list-property>
<list-property name="columnHints">
<structure>
<property name="columnName">ON</property>
</structure>
<structure>
<property name="columnName">PC</property>
</structure>
<structure>
<property name="columnName">QO</property>
</structure>
</list-property>
<structure name="cachedMetaData">
<list-property name="resultSet">
<structure>
<property name="position">1</property>
<property name="name">ON</property>
<property name="dataType">integer</property>
</structure>
<structure>
<property name="position">2</property>
<property name="name">PC</property>
<property name="dataType">string</property>
</structure>
<structure>
<property name="position">3</property>
<property name="name">QO</property>
<property name="dataType">integer</property>
</structure>
</list-property>
</structure>
<property name="dataSource">Scripted</property>
<method name="fetch"><![CDATA[if(prgCount <
globalvarList.size())
{
var data = globalvarList.get(prgCount);
row["ON"] = data[0];
row["PC"] =data[1];
row["QO"] = data[2];
prgCount++;
return true;
}
else
{
return false;
}]]></method>
</script-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">
<property name="topMargin">0.25in</property>
<property name="leftMargin">0.25in</property>
<property name="bottomMargin">0.25in</property>
<property name="rightMargin">0.25in</property>
<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="10">
<property name="width">100%</property>
<property name="dataSet">Data Set</property>
<list-property name="boundDataColumns">
<structure>
<property name="name">ORDERNUMBER</property>
<property name="displayName">ORDERNUMBER</property>
<expression
name="expression">dataSetRow["ORDERNUMBER"]</expression >
<property name="dataType">integer</property>
</structure>
<structure>
<property name="name">PRODUCTCODE</property>
<property name="displayName">PRODUCTCODE</property>
<expression
name="expression">dataSetRow["PRODUCTCODE"]</expression >
<property name="dataType">string</property>
</structure>
<structure>
<property name="name">QUANTITYORDERED</property>
<property name="displayName">QUANTITYORDERED</property>
<expression
name="expression">dataSetRow["QUANTITYORDERED"]</expression >
<property name="dataType">integer</property>
</structure>
<structure>
<property name="name">PRICEEACH</property>
<property name="displayName">PRICEEACH</property>
<expression
name="expression">dataSetRow["PRICEEACH"]</expression>
<property name="dataType">float</property>
</structure>
<structure>
<property name="name">ORDERLINENUMBER</property>
<property name="displayName">ORDERLINENUMBER</property>
<expression
name="expression">dataSetRow["ORDERLINENUMBER"]</expression >
<property name="dataType">integer</property>
</structure>
</list-property>
<column id="39"/>
<column id="40"/>
<column id="41"/>
<column id="42"/>
<column id="43"/>
<header>
<row id="11">
<cell id="12">
<label id="13">
<text-property
name="text">ORDERNUMBER</text-property>
</label>
</cell>
<cell id="14">
<label id="15">
<text-property
name="text">PRODUCTCODE</text-property>
</label>
</cell>
<cell id="16">
<label id="17">
<text-property
name="text">QUANTITYORDERED</text-property>
</label>
</cell>
<cell id="18">
<label id="19">
<text-property
name="text">PRICEEACH</text-property>
</label>
</cell>
<cell id="20">
<label id="21">
<text-property
name="text">ORDERLINENUMBER</text-property>
</label>
</cell>
</row>
</header>
<detail>
<row id="22">
<method name="onCreate"><![CDATA[var data={};

data[0] = this.getRowData().getColumnValue("ORDERNUMBER");
data[1] = this.getRowData().getColumnValue("PRODUCTCODE");
data[2] = this.getRowData().getColumnValue("QUANTITYORDERED");
globalvarList.add(data);]]></method>
<cell id="23">
<data id="24">
<property
name="resultSetColumn">ORDERNUMBER</property>
</data>
</cell>
<cell id="25">
<data id="26">
<property
name="resultSetColumn">PRODUCTCODE</property>
</data>
</cell>
<cell id="27">
<data id="28">
<property
name="resultSetColumn">QUANTITYORDERED</property>
</data>
</cell>
<cell id="29">
<data id="30">
<property
name="resultSetColumn">PRICEEACH</property>
</data>
</cell>
<cell id="31">
<data id="32">
<property
name="resultSetColumn">ORDERLINENUMBER</property>
</data>
</cell>
</row>
</detail>
<footer>
<row id="33">
<cell id="34"/>
<cell id="35"/>
<cell id="36"/>
<cell id="37"/>
<cell id="38"/>
</row>
</footer>
</table>
<table id="45">
<property name="width">100%</property>
<property name="dataSet">ScriptedDataSet</property>
<list-property name="boundDataColumns">
<structure>
<property name="name">ON</property>
<property name="displayName">ON</property>
<expression
name="expression">dataSetRow["ON"]</expression>
<property name="dataType">integer</property>
</structure>
<structure>
<property name="name">PC</property>
<property name="displayName">PC</property>
<expression
name="expression">dataSetRow["PC"]</expression>
<property name="dataType">string</property>
</structure>
<structure>
<property name="name">QO</property>
<property name="displayName">QO</property>
<expression
name="expression">dataSetRow["QO"]</expression>
<property name="dataType">integer</property>
</structure>
</list-property>
<column id="64"/>
<column id="65"/>
<column id="66"/>
<header>
<row id="46">
<cell id="47">
<label id="48">
<text-property name="text">ON</text-property>
</label>
</cell>
<cell id="49">
<label id="50">
<text-property name="text">PC</text-property>
</label>
</cell>
<cell id="51">
<label id="52">
<text-property name="text">QO</text-property>
</label>
</cell>
</row>
</header>
<detail>
<row id="53">
<cell id="54">
<data id="55">
<property name="resultSetColumn">ON</property>
</data>
</cell>
<cell id="56">
<data id="57">
<property name="resultSetColumn">PC</property>
</data>
</cell>
<cell id="58">
<data id="59">
<property name="resultSetColumn">QO</property>
</data>
</cell>
</row>
</detail>
<footer>
<row id="60">
<cell id="61"/>
<cell id="62"/>
<cell id="63"/>
</row>
</footer>
</table>
</body>
</report>


On 12/2/2010 9:23 AM, Don wrote:
> Jason,
>
> I moved the code from the onCreate of the table to the onCreate of the
> table row. Unfortunately, I received the same errors.
>
> I also added the code to print to a text file on my c drive. This was
> populated when I ran the report so it is creating the table which is
> bound to the database-related dataset. Apparently it's failing when
> attempting to create either the scripted dataset or the table to which
> its bound.
>
> Does this error occur in the BIRT 2.6 viewer?
> It appears that our only alternative at this point (at least for this
> particular report) is to instantiate the engine in our app, run it, and
> embed the output in our jsp page. Would you agree?
>
> Here's the xml for the changes I made.
>
> <?xml version="1.0" encoding="UTF-8"?>
> <report xmlns="http://www.eclipse.org/birt/2005/design" version="3.2.17"
> id="1">
> <property name="createdBy">Eclipse BIRT Designer Version
> 2.3.2.r232_20090202 Build <2.3.2.v20090218-0730></property>
> <property name="units">in</property>
> <method name="beforeFactory"><![CDATA[importPackage(Packages.java.util.*);
> globalvarList = new java.util.ArrayList();
> prgCount = 0;]]></method>
> <property name="iconFile">/templates/blank_report.gif</property>
> <property name="bidiLayoutOrientation">ltr</property>
> <data-sources>
> <oda-data-source extensionID="org.eclipse.birt.report.data.oda.jdbc"
> name="MPMSDB" id="7">
> <property name="odaDriverClass">com.ibm.db2.jcc.DB2Driver</property >
> <property name="odaURL">jdbc:db2://pddevgwdsnd2k01:50000/DSN</property>
> <property name="odaUser">mpmspgm</property>
> <encrypted-property name="odaPassword"
> encryptionID="base64">bXBtczAx</encrypted-property>
> <property name="odaJndiName">jdbc/MPMS</property>
> </oda-data-source>
> <script-data-source name="scriptedDataSource" id="31"/>
> </data-sources>
> <data-sets>
> <oda-data-set
> extensionID="org.eclipse.birt.report.data.oda.jdbc.JdbcSelectDataSet "
> name="db2DataSet" id="8">
> <list-property name="columnHints">
> <structure>
> <property name="columnName">PRG_ID</property>
> <property name="displayName">PRG_ID</property>
> </structure>
> <structure>
> <property name="columnName">PRG_STS_CD</property>
> <property name="displayName">PRG_STS_CD</property>
> </structure>
> <structure>
> <property name="columnName">PRG_TYPE_CD</property>
> <property name="displayName">PRG_TYPE_CD</property>
> </structure>
> </list-property>
> <structure name="cachedMetaData">
> <list-property name="resultSet">
> <structure>
> <property name="position">1</property>
> <property name="name">PRG_ID</property>
> <property name="dataType">integer</property>
> </structure>
> <structure>
> <property name="position">2</property>
> <property name="name">PRG_STS_CD</property>
> <property name="dataType">string</property>
> </structure>
> <structure>
> <property name="position">3</property>
> <property name="name">PRG_TYPE_CD</property>
> <property name="dataType">string</property>
> </structure>
> </list-property>
> </structure>
> <property name="dataSource">MPMSDB</property>
> <list-property name="resultSet">
> <structure>
> <property name="position">1</property>
> <property name="name">PRG_ID</property>
> <property name="nativeName">PRG_ID</property>
> <property name="dataType">integer</property>
> <property name="nativeDataType">4</property>
> </structure>
> <structure>
> <property name="position">2</property>
> <property name="name">PRG_STS_CD</property>
> <property name="nativeName">PRG_STS_CD</property>
> <property name="dataType">string</property>
> <property name="nativeDataType">12</property>
> </structure>
> <structure>
> <property name="position">3</property>
> <property name="name">PRG_TYPE_CD</property>
> <property name="nativeName">PRG_TYPE_CD</property>
> <property name="dataType">string</property>
> <property name="nativeDataType">12</property>
> </structure>
> </list-property>
> <property name="queryText">select prg_id, prg_sts_cd, prg_type_cd
> from mpmsprod.t001program
> where prg_id > 300
> order by prg_type_cd, prg_id</property>
> </oda-data-set>
> <script-data-set name="scriptedDataSet" id="32">
> <list-property name="resultSetHints">
> <structure>
> <property name="position">1</property>
> <property name="name">PRG_ID</property>
> <property name="dataType">integer</property>
> </structure>
> <structure>
> <property name="position">2</property>
> <property name="name">PRG_TYPE_CD</property>
> <property name="dataType">string</property>
> </structure>
> <structure>
> <property name="position">3</property>
> <property name="name">PRG_STS_CD</property>
> <property name="dataType">string</property>
> </structure>
> <structure>
> <property name="position">4</property>
> <property name="name">programCount</property>
> <property name="dataType">integer</property>
> </structure>
> </list-property>
> <list-property name="columnHints">
> <structure>
> <property name="columnName">PRG_ID</property>
> <property name="displayName">Program ID</property>
> </structure>
> <structure>
> <property name="columnName">PRG_TYPE_CD</property>
> <property name="displayName">Program Type</property>
> </structure>
> <structure>
> <property name="columnName">PRG_STS_CD</property>
> <property name="displayName">Program Status</property>
> </structure>
> <structure>
> <property name="columnName">programCount</property>
> <property name="displayName"># of Rows</property>
> </structure>
> </list-property>
> <structure name="cachedMetaData">
> <list-property name="resultSet">
> <structure>
> <property name="position">1</property>
> <property name="name">PRG_ID</property>
> <property name="dataType">integer</property>
> </structure>
> <structure>
> <property name="position">2</property>
> <property name="name">PRG_TYPE_CD</property>
> <property name="dataType">string</property>
> </structure>
> <structure>
> <property name="position">3</property>
> <property name="name">PRG_STS_CD</property>
> <property name="dataType">string</property>
> </structure>
> <structure>
> <property name="position">4</property>
> <property name="name">programCount</property>
> <property name="dataType">integer</property>
> </structure>
> </list-property>
> </structure>
> <property name="dataSource">scriptedDataSource</property>
> <method name="fetch"><![CDATA[if(prgCount < globalvarList.size())
> {
> var data = globalvarList.get(prgCount);
>
> var prgId = data.prg_id;
>
> if (prgId > 400)
> { row["PRG_ID"] = data.prg_id;
> }
> else
> {
> row["PRG_ID"] = 2;
> }
> row["PRG_TYPE_CD"] = data.prg_type_cd;
> row["PRG_STS_CD"] =data.prg_sts_cd;
> row["programCount"] = globalvarList.size();
> prgCount++;
> return true;
> }
> else
> {
> return false;
> }
> ]]></method>
> </script-data-set>
> </data-sets>
> <styles>
> <style name="report" id="4">
> <property name="fontFamily">"Verdana"</property>
> <property name="fontSize">10pt</property>
> </style>
> <style name="crosstab" 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-cell" 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">
> <property name="topMargin">0.25in</property>
> <property name="leftMargin">0.25in</property>
> <property name="bottomMargin">0.25in</property>
> <property name="rightMargin">0.25in</property>
> <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="9">
> <property name="width">100%</property>
> <property name="dataSet">db2DataSet</property>
> <list-property name="visibility">
> <structure>
> <property name="format">all</property>
> <expression name="valueExpr">true</expression>
> </structure>
> </list-property>
> <list-property name="boundDataColumns">
> <structure>
> <property name="name">PRG_ID</property>
> <property name="displayName">PRG_ID</property>
> <expression name="expression">dataSetRow["PRG_ID"]</expression>
> <property name="dataType">integer</property>
> </structure>
> <structure>
> <property name="name">PRG_STS_CD</property>
> <property name="displayName">PRG_STS_CD</property>
> <expression name="expression">dataSetRow["PRG_STS_CD"]</expression>
> <property name="dataType">string</property>
> </structure>
> <structure>
> <property name="name">PRG_TYPE_CD</property>
> <property name="displayName">PRG_TYPE_CD</property>
> <expression name="expression">dataSetRow["PRG_TYPE_CD"]</expression >
> <property name="dataType">string</property>
> </structure>
> </list-property>
> <method name="onCreate"><![CDATA[/*var data={};
>
> data.prg_id = this.getRowData().getColumnValue("PRG_ID");
> data.prg_type_cd = this.getRowData().getColumnValue("PRG_TYPE_CD");
> data.prg_sts_cd = this.getRowData().getColumnValue("PRG_STS_CD");
> globalvarList.add(data);
> */]]></method>
> <column id="28">
> <property name="textAlign">center</property>
> </column>
> <column id="29">
> <property name="textAlign">center</property>
> </column>
> <column id="30">
> <property name="textAlign">center</property>
> </column>
> <header>
> <row id="10">
> <cell id="11">
> <label id="12">
> <text-property name="text">PRG_ID from db2DataSet</text-property>
> </label>
> </cell>
> <cell id="13">
> <label id="14">
> <text-property name="text">PRG_STS_CD from db2DataSet</text-property>
> </label>
> </cell>
> <cell id="15">
> <label id="16">
> <text-property name="text">PRG_TYPE_CD from db2DataSet</text-property>
> </label>
> </cell>
> </row>
> </header>
> <detail>
> <row id="17">
> <method name="onCreate"><![CDATA[var data={};
>
> data.prg_id = row.PRG_ID;
> data.prg_type_cd = row.PRG_TYPE_CD;
> data.prg_sts_cd = row.PRG_STS_CD;
>
> globalvarList.add(data);
>
> importPackage( Packages.java.io );
> out = new PrintWriter( new FileWriter( "c:/birttest/events.txt", true ) );
> out.println( "oncreate event");
> out.close();
> ]]></method>
> <cell id="18">
> <data id="19">
> <property name="resultSetColumn">PRG_ID</property>
> </data>
> </cell>
> <cell id="20">
> <data id="21">
> <property name="resultSetColumn">PRG_STS_CD</property>
> </data>
> </cell>
> <cell id="22">
> <data id="23">
> <property name="resultSetColumn">PRG_TYPE_CD</property>
> </data>
> </cell>
> </row>
> </detail>
> <footer>
> <row id="24">
> <cell id="25"/>
> <cell id="26"/>
> <cell id="27"/>
> </row>
> </footer>
> </table>
> <table id="33">
> <property name="width">100%</property>
> <property name="dataSet">scriptedDataSet</property>
> <list-property name="boundDataColumns">
> <structure>
> <property name="name">PRG_ID</property>
> <property name="displayName">Program ID</property>
> <expression name="expression">dataSetRow["PRG_ID"]</expression>
> <property name="dataType">integer</property>
> </structure>
> <structure>
> <property name="name">PRG_TYPE_CD</property>
> <property name="displayName">Program Type</property>
> <expression name="expression">dataSetRow["PRG_TYPE_CD"]</expression >
> <property name="dataType">string</property>
> </structure>
> <structure>
> <property name="name">PRG_STS_CD</property>
> <property name="displayName">Program Status</property>
> <expression name="expression">dataSetRow["PRG_STS_CD"]</expression>
> <property name="dataType">string</property>
> </structure>
> <structure>
> <property name="name">programCount</property>
> <property name="displayName"># of Rows</property>
> <expression name="expression">dataSetRow["programCount"]</expression >
> <property name="dataType">integer</property>
> </structure>
> </list-property>
> <column id="52">
> <property name="textAlign">center</property>
> </column>
> <column id="53">
> <property name="textAlign">center</property>
> </column>
> <column id="54">
> <property name="textAlign">center</property>
> </column>
> <column id="58">
> <property name="textAlign">center</property>
> </column>
> <header>
> <row id="34">
> <cell id="35">
> <label id="36">
> <text-property name="text">Program ID</text-property>
> </label>
> </cell>
> <cell id="37">
> <label id="38">
> <text-property name="text">Program Type</text-property>
> </label>
> </cell>
> <cell id="39">
> <label id="40">
> <text-property name="text">Program Status</text-property>
> </label>
> </cell>
> <cell id="55">
> <label id="59">
> <text-property name="text"># of Rows</text-property>
> </label>
> </cell>
> </row>
> </header>
> <detail>
> <row id="41">
> <cell id="42">
> <data id="43">
> <property name="resultSetColumn">PRG_ID</property>
> </data>
> </cell>
> <cell id="44">
> <data id="45">
> <property name="resultSetColumn">PRG_TYPE_CD</property>
> </data>
> </cell>
> <cell id="46">
> <data id="47">
> <property name="resultSetColumn">PRG_STS_CD</property>
> </data>
> </cell>
> <cell id="56">
> <data id="60">
> <property name="resultSetColumn">programCount</property>
> </data>
> </cell>
> </row>
> </detail>
> <footer>
> <row id="48">
> <cell id="49"/>
> <cell id="50"/>
> <cell id="51"/>
> <cell id="57"/>
> </row>
> </footer>
> </table>
> </body>
> </report>
>
Re: Scripted dataset problem [message #642940 is a reply to message #641969] Fri, 03 December 2010 12:52 Go to previous messageGo to next message
Don Wood is currently offline Don WoodFriend
Messages: 32
Registered: February 2010
Location: Pennsylvania
Member
Jason,

I loaded your version of the report and it worked.

That being said, do you know why my version won't work? There are few differences between the two, the main one being the datasource. My report is using DB2 and yours is using the database packaged with BIRT. Do you think this could be the cause?

I skimmed down through the source of both reports and there are few differences. I noticed that your report had a XML property called designerValues. Mine didn't have this but I don't know whether this matters.

Do you have any thoughts regarding why my version won't work? Any other suggestions?

I really do appreciate your time.

Thanks,
Don
Re: Scripted dataset problem [message #642975 is a reply to message #642940] Fri, 03 December 2010 14:59 Go to previous messageGo to next message
Jason Weathersby is currently offline Jason WeathersbyFriend
Messages: 9167
Registered: July 2009
Senior Member

The designer values are added be the designer and are not needed when
deployed.

I do not think this has to do with the db version but I could be wrong.
My guess would be the way the data object is loaded in Rhino (JS engine
that BIRT uses). notice that I set the values like data[0], data[1]....

I think if you make that change it make work on yours.

Jason

On 12/3/2010 7:52 AM, Don wrote:
> Jason,
>
> I loaded your version of the report and it worked.
> That being said, do you know why my version won't work? There are few
> differences between the two, the main one being the datasource. My
> report is using DB2 and yours is using the database packaged with BIRT.
> Do you think this could be the cause?
>
> I skimmed down through the source of both reports and there are few
> differences. I noticed that your report had a XML property called
> designerValues. Mine didn't have this but I don't know whether this
> matters.
>
> Do you have any thoughts regarding why my version won't work? Any other
> suggestions?
>
> I really do appreciate your time.
>
> Thanks,
> Don
Re: Scripted dataset problem [message #643303 is a reply to message #641969] Mon, 06 December 2010 13:11 Go to previous messageGo to next message
Don Wood is currently offline Don WoodFriend
Messages: 32
Registered: February 2010
Location: Pennsylvania
Member
Jason,

I tried what you suggested...I went back to my version of the report and changed the Javascript structure to data[0], data[1], etc instead of data[name1], data[name2], etc. When I ran, I received the same results, i.e., it failed.

I then tried the following.
1. I changed the datasource to the sampledb.
2. I changed the querytext to retrieve data from the order table as in the following:
select ordernumber as prg_id, status as prg_sts_cd, status as prg_type_cd
from orders
order by ordernumber


When I ran this, it worked. So, it does appear the there's something going on with the viewer's ability to handle the combination of DB2 tables and scripted datasets.

Any more thoughts?

Again, many thanks for taking the time to consider this.

-Don


Here's the XML for the report.
<?xml version="1.0" encoding="UTF-8"?>
<report xmlns="http://www.eclipse.org/birt/2005/design" version="3.2.17" id="1">
<property name="createdBy">Eclipse BIRT Designer Version 2.3.2.r232_20090202 Build &lt;2.3.2.v20090218-0730></property>
<property name="units">in</property>
<method name="beforeFactory"><![CDATA[importPackage(Packages.java.util.*);
globalvarList = new java.util.ArrayList();
prgCount = 0;]]></method>
<property name="iconFile">/templates/blank_report.gif</property>
<property name="bidiLayoutOrientation">ltr</property>
<data-sources>
<oda-data-source extensionID="org.eclipse.birt.report.data.oda.jdbc" name="MPMSDB" id="7">
<property name="odaDriverClass">org.eclipse.birt.report.data.oda.sampledb.Driver </property>
<property name="odaURL">jdbc:classicmodels:sampledb</property>
</oda-data-source>
<script-data-source name="scriptedDataSource" id="31"/>
</data-sources>
<data-sets>
<oda-data-set extensionID="org.eclipse.birt.report.data.oda.jdbc.JdbcSelectDataSet " name="db2DataSet" id="8">
<list-property name="columnHints">
<structure>
<property name="columnName">PRG_ID</property>
<property name="displayName">PRG_ID</property>
</structure>
<structure>
<property name="columnName">PRG_STS_CD</property>
<property name="displayName">PRG_STS_CD</property>
</structure>
<structure>
<property name="columnName">PRG_TYPE_CD</property>
<property name="displayName">PRG_TYPE_CD</property>
</structure>
</list-property>
<structure name="cachedMetaData">
<list-property name="resultSet">
<structure>
<property name="position">1</property>
<property name="name">PRG_ID</property>
<property name="dataType">integer</property>
</structure>
<structure>
<property name="position">2</property>
<property name="name">PRG_STS_CD</property>
<property name="dataType">string</property>
</structure>
<structure>
<property name="position">3</property>
<property name="name">PRG_TYPE_CD</property>
<property name="dataType">string</property>
</structure>
</list-property>
</structure>
<property name="dataSource">MPMSDB</property>
<list-property name="resultSet">
<structure>
<property name="position">1</property>
<property name="name">PRG_ID</property>
<property name="nativeName">PRG_ID</property>
<property name="dataType">integer</property>
<property name="nativeDataType">4</property>
</structure>
<structure>
<property name="position">2</property>
<property name="name">PRG_STS_CD</property>
<property name="nativeName">PRG_STS_CD</property>
<property name="dataType">string</property>
<property name="nativeDataType">12</property>
</structure>
<structure>
<property name="position">3</property>
<property name="name">PRG_TYPE_CD</property>
<property name="nativeName">PRG_TYPE_CD</property>
<property name="dataType">string</property>
<property name="nativeDataType">12</property>
</structure>
</list-property>
<property name="queryText">select ordernumber as prg_id, status as prg_sts_cd, status as prg_type_cd
from orders
order by ordernumber</property>
</oda-data-set>
<script-data-set name="scriptedDataSet" id="32">
<list-property name="resultSetHints">
<structure>
<property name="position">1</property>
<property name="name">PRG_ID</property>
<property name="dataType">integer</property>
</structure>
<structure>
<property name="position">2</property>
<property name="name">PRG_TYPE_CD</property>
<property name="dataType">string</property>
</structure>
<structure>
<property name="position">3</property>
<property name="name">PRG_STS_CD</property>
<property name="dataType">string</property>
</structure>
<structure>
<property name="position">4</property>
<property name="name">programCount</property>
<property name="dataType">integer</property>
</structure>
</list-property>
<list-property name="columnHints">
<structure>
<property name="columnName">PRG_ID</property>
<property name="displayName">Program ID</property>
</structure>
<structure>
<property name="columnName">PRG_TYPE_CD</property>
<property name="displayName">Program Type</property>
</structure>
<structure>
<property name="columnName">PRG_STS_CD</property>
<property name="displayName">Program Status</property>
</structure>
<structure>
<property name="columnName">programCount</property>
<property name="displayName"># of Rows</property>
</structure>
</list-property>
<structure name="cachedMetaData">
<list-property name="resultSet">
<structure>
<property name="position">1</property>
<property name="name">PRG_ID</property>
<property name="dataType">integer</property>
</structure>
<structure>
<property name="position">2</property>
<property name="name">PRG_TYPE_CD</property>
<property name="dataType">string</property>
</structure>
<structure>
<property name="position">3</property>
<property name="name">PRG_STS_CD</property>
<property name="dataType">string</property>
</structure>
<structure>
<property name="position">4</property>
<property name="name">programCount</property>
<property name="dataType">integer</property>
</structure>
</list-property>
</structure>
<property name="dataSource">scriptedDataSource</property>
<method name="fetch"><![CDATA[if(prgCount < globalvarList.size())
{
var data = globalvarList.get(prgCount);

var prgId = data.prg_id;

if (prgId > 400)
{
// row["PRG_ID"] = data.prg_id;
row["PRG_ID"] = data[0];
}
else
{
// row["PRG_ID"] = 2;
row["PRG_ID"] = 2;
}
// row["PRG_TYPE_CD"] = data.prg_type_cd;
// row["PRG_STS_CD"] =data.prg_sts_cd;
// row["programCount"] = globalvarList.size();
row["PRG_TYPE_CD"] = data[1];
row["PRG_STS_CD"] =data[2];
row["programCount"] = globalvarList.size();
prgCount++;
return true;
}
else
{
return false;
}
]]></method>
</script-data-set>
</data-sets>
<styles>
<style name="report" id="4">
<property name="fontFamily">"Verdana"</property>
<property name="fontSize">10pt</property>
</style>
<style name="crosstab" 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-cell" 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">
<property name="topMargin">0.25in</property>
<property name="leftMargin">0.25in</property>
<property name="bottomMargin">0.25in</property>
<property name="rightMargin">0.25in</property>
<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="9">
<property name="width">100%</property>
<property name="dataSet">db2DataSet</property>
<list-property name="visibility">
<structure>
<property name="format">all</property>
<expression name="valueExpr">true</expression>
</structure>
</list-property>
<list-property name="boundDataColumns">
<structure>
<property name="name">PRG_ID</property>
<property name="displayName">PRG_ID</property>
<expression name="expression">dataSetRow["PRG_ID"]</expression>
<property name="dataType">integer</property>
</structure>
<structure>
<property name="name">PRG_STS_CD</property>
<property name="displayName">PRG_STS_CD</property>
<expression name="expression">dataSetRow["PRG_STS_CD"]</expression>
<property name="dataType">string</property>
</structure>
<structure>
<property name="name">PRG_TYPE_CD</property>
<property name="displayName">PRG_TYPE_CD</property>
<expression name="expression">dataSetRow["PRG_TYPE_CD"]</expression >
<property name="dataType">string</property>
</structure>
</list-property>
<method name="onCreate"><![CDATA[/*var data={};

data.prg_id = this.getRowData().getColumnValue("PRG_ID");
data.prg_type_cd = this.getRowData().getColumnValue("PRG_TYPE_CD");
data.prg_sts_cd = this.getRowData().getColumnValue("PRG_STS_CD");

globalvarList.add(data);
*/]]></method>
<column id="28">
<property name="textAlign">center</property>
</column>
<column id="29">
<property name="textAlign">center</property>
</column>
<column id="30">
<property name="textAlign">center</property>
</column>
<header>
<row id="10">
<cell id="11">
<label id="12">
<text-property name="text">PRG_ID from db2DataSet</text-property>
</label>
</cell>
<cell id="13">
<label id="14">
<text-property name="text">PRG_STS_CD from db2DataSet</text-property>
</label>
</cell>
<cell id="15">
<label id="16">
<text-property name="text">PRG_TYPE_CD from db2DataSet</text-property>
</label>
</cell>
</row>
</header>
<detail>
<row id="17">
<method name="onCreate"><![CDATA[var data={};

//data.prg_id = row.PRG_ID;
//data.prg_type_cd = row.PRG_TYPE_CD;
//data.prg_sts_cd = row.PRG_STS_CD;

data[0] = this.getRowData().getColumnValue("PRG_ID");
data[1] = this.getRowData().getColumnValue("PRG_TYPE_CD");
data[2] = this.getRowData().getColumnValue("PRG_STS_CD");


globalvarList.add(data);

importPackage( Packages.java.io );
out = new PrintWriter( new FileWriter( "c:/birttest/events.txt", true ) );
out.println( "oncreate event");
out.close();
]]></method>
<cell id="18">
<data id="19">
<property name="resultSetColumn">PRG_ID</property>
</data>
</cell>
<cell id="20">
<data id="21">
<property name="resultSetColumn">PRG_STS_CD</property>
</data>
</cell>
<cell id="22">
<data id="23">
<property name="resultSetColumn">PRG_TYPE_CD</property>
</data>
</cell>
</row>
</detail>
<footer>
<row id="24">
<cell id="25"/>
<cell id="26"/>
<cell id="27"/>
</row>
</footer>
</table>
<table id="33">
<property name="width">100%</property>
<property name="dataSet">scriptedDataSet</property>
<list-property name="boundDataColumns">
<structure>
<property name="name">PRG_ID</property>
<property name="displayName">Program ID</property>
<expression name="expression">dataSetRow["PRG_ID"]</expression>
<property name="dataType">integer</property>
</structure>
<structure>
<property name="name">PRG_TYPE_CD</property>
<property name="displayName">Program Type</property>
<expression name="expression">dataSetRow["PRG_TYPE_CD"]</expression >
<property name="dataType">string</property>
</structure>
<structure>
<property name="name">PRG_STS_CD</property>
<property name="displayName">Program Status</property>
<expression name="expression">dataSetRow["PRG_STS_CD"]</expression>
<property name="dataType">string</property>
</structure>
<structure>
<property name="name">programCount</property>
<property name="displayName"># of Rows</property>
<expression name="expression">dataSetRow["programCount"]</expression >
<property name="dataType">integer</property>
</structure>
</list-property>
<column id="52">
<property name="textAlign">center</property>
</column>
<column id="53">
<property name="textAlign">center</property>
</column>
<column id="54">
<property name="textAlign">center</property>
</column>
<column id="58">
<property name="textAlign">center</property>
</column>
<header>
<row id="34">
<cell id="35">
<label id="36">
<text-property name="text">Program ID</text-property>
</label>
</cell>
<cell id="37">
<label id="38">
<text-property name="text">Program Type</text-property>
</label>
</cell>
<cell id="39">
<label id="40">
<text-property name="text">Program Status</text-property>
</label>
</cell>
<cell id="55">
<label id="59">
<text-property name="text"># of Rows</text-property>
</label>
</cell>
</row>
</header>
<detail>
<row id="41">
<cell id="42">
<data id="43">
<property name="resultSetColumn">PRG_ID</property>
</data>
</cell>
<cell id="44">
<data id="45">
<property name="resultSetColumn">PRG_TYPE_CD</property>
</data>
</cell>
<cell id="46">
<data id="47">
<property name="resultSetColumn">PRG_STS_CD</property>
</data>
</cell>
<cell id="56">
<data id="60">
<property name="resultSetColumn">programCount</property>
</data>
</cell>
</row>
</detail>
<footer>
<row id="48">
<cell id="49"/>
<cell id="50"/>
<cell id="51"/>
<cell id="57"/>
</row>
</footer>
</table>
</body>
</report>
Re: Scripted dataset problem [message #643408 is a reply to message #643303] Mon, 06 December 2010 18:53 Go to previous messageGo to next message
Jason Weathersby is currently offline Jason WeathersbyFriend
Messages: 9167
Registered: July 2009
Senior Member

This seems odd. Are any of the values coming back as null?

Jason

On 12/6/2010 8:11 AM, Don wrote:
> Jason,
>
> I tried what you suggested...I went back to my version of the report and
> changed the Javascript structure to data[0], data[1], etc instead of
> data[name1], data[name2], etc. When I ran, I received the same results,
> i.e., it failed.
>
> I then tried the following.
> 1. I changed the datasource to the sampledb.
> 2. I changed the querytext to retrieve data from the order table as in
> the following:
> select ordernumber as prg_id, status as prg_sts_cd, status as prg_type_cd
> from orders
> order by ordernumber
>
>
> When I ran this, it worked. So, it does appear the there's something
> going on with the viewer's ability to handle the combination of DB2
> tables and scripted datasets.
>
> Any more thoughts?
>
> Again, many thanks for taking the time to consider this.
>
> -Don
>
>
> Here's the XML for the report.
> <?xml version="1.0" encoding="UTF-8"?>
> <report xmlns="http://www.eclipse.org/birt/2005/design" version="3.2.17"
> id="1">
> <property name="createdBy">Eclipse BIRT Designer Version
> 2.3.2.r232_20090202 Build <2.3.2.v20090218-0730></property>
> <property name="units">in</property>
> <method name="beforeFactory"><![CDATA[importPackage(Packages.java.util.*);
> globalvarList = new java.util.ArrayList();
> prgCount = 0;]]></method>
> <property name="iconFile">/templates/blank_report.gif</property>
> <property name="bidiLayoutOrientation">ltr</property>
> <data-sources>
> <oda-data-source extensionID="org.eclipse.birt.report.data.oda.jdbc"
> name="MPMSDB" id="7">
> <property
> name="odaDriverClass">org.eclipse.birt.report.data.oda.sampledb.Driver
> </property>
> <property name="odaURL">jdbc:classicmodels:sampledb</property>
> </oda-data-source>
> <script-data-source name="scriptedDataSource" id="31"/>
> </data-sources>
> <data-sets>
> <oda-data-set
> extensionID="org.eclipse.birt.report.data.oda.jdbc.JdbcSelectDataSet "
> name="db2DataSet" id="8">
> <list-property name="columnHints">
> <structure>
> <property name="columnName">PRG_ID</property>
> <property name="displayName">PRG_ID</property>
> </structure>
> <structure>
> <property name="columnName">PRG_STS_CD</property>
> <property name="displayName">PRG_STS_CD</property>
> </structure>
> <structure>
> <property name="columnName">PRG_TYPE_CD</property>
> <property name="displayName">PRG_TYPE_CD</property>
> </structure>
> </list-property>
> <structure name="cachedMetaData">
> <list-property name="resultSet">
> <structure>
> <property name="position">1</property>
> <property name="name">PRG_ID</property>
> <property name="dataType">integer</property>
> </structure>
> <structure>
> <property name="position">2</property>
> <property name="name">PRG_STS_CD</property>
> <property name="dataType">string</property>
> </structure>
> <structure>
> <property name="position">3</property>
> <property name="name">PRG_TYPE_CD</property>
> <property name="dataType">string</property>
> </structure>
> </list-property>
> </structure>
> <property name="dataSource">MPMSDB</property>
> <list-property name="resultSet">
> <structure>
> <property name="position">1</property>
> <property name="name">PRG_ID</property>
> <property name="nativeName">PRG_ID</property>
> <property name="dataType">integer</property>
> <property name="nativeDataType">4</property>
> </structure>
> <structure>
> <property name="position">2</property>
> <property name="name">PRG_STS_CD</property>
> <property name="nativeName">PRG_STS_CD</property>
> <property name="dataType">string</property>
> <property name="nativeDataType">12</property>
> </structure>
> <structure>
> <property name="position">3</property>
> <property name="name">PRG_TYPE_CD</property>
> <property name="nativeName">PRG_TYPE_CD</property>
> <property name="dataType">string</property>
> <property name="nativeDataType">12</property>
> </structure>
> </list-property>
> <property name="queryText">select ordernumber as prg_id, status as
> prg_sts_cd, status as prg_type_cd
> from orders
> order by ordernumber</property>
> </oda-data-set>
> <script-data-set name="scriptedDataSet" id="32">
> <list-property name="resultSetHints">
> <structure>
> <property name="position">1</property>
> <property name="name">PRG_ID</property>
> <property name="dataType">integer</property>
> </structure>
> <structure>
> <property name="position">2</property>
> <property name="name">PRG_TYPE_CD</property>
> <property name="dataType">string</property>
> </structure>
> <structure>
> <property name="position">3</property>
> <property name="name">PRG_STS_CD</property>
> <property name="dataType">string</property>
> </structure>
> <structure>
> <property name="position">4</property>
> <property name="name">programCount</property>
> <property name="dataType">integer</property>
> </structure>
> </list-property>
> <list-property name="columnHints">
> <structure>
> <property name="columnName">PRG_ID</property>
> <property name="displayName">Program ID</property>
> </structure>
> <structure>
> <property name="columnName">PRG_TYPE_CD</property>
> <property name="displayName">Program Type</property>
> </structure>
> <structure>
> <property name="columnName">PRG_STS_CD</property>
> <property name="displayName">Program Status</property>
> </structure>
> <structure>
> <property name="columnName">programCount</property>
> <property name="displayName"># of Rows</property>
> </structure>
> </list-property>
> <structure name="cachedMetaData">
> <list-property name="resultSet">
> <structure>
> <property name="position">1</property>
> <property name="name">PRG_ID</property>
> <property name="dataType">integer</property>
> </structure>
> <structure>
> <property name="position">2</property>
> <property name="name">PRG_TYPE_CD</property>
> <property name="dataType">string</property>
> </structure>
> <structure>
> <property name="position">3</property>
> <property name="name">PRG_STS_CD</property>
> <property name="dataType">string</property>
> </structure>
> <structure>
> <property name="position">4</property>
> <property name="name">programCount</property>
> <property name="dataType">integer</property>
> </structure>
> </list-property>
> </structure>
> <property name="dataSource">scriptedDataSource</property>
> <method name="fetch"><![CDATA[if(prgCount < globalvarList.size())
> {
> var data = globalvarList.get(prgCount);
>
> var prgId = data.prg_id;
>
> if (prgId > 400)
> { // row["PRG_ID"] = data.prg_id;
> row["PRG_ID"] = data[0];
> }
> else
> {
> // row["PRG_ID"] = 2;
> row["PRG_ID"] = 2;
> }
> // row["PRG_TYPE_CD"] = data.prg_type_cd;
> // row["PRG_STS_CD"] =data.prg_sts_cd;
> // row["programCount"] = globalvarList.size();
> row["PRG_TYPE_CD"] = data[1];
> row["PRG_STS_CD"] =data[2];
> row["programCount"] = globalvarList.size();
> prgCount++;
> return true;
> }
> else
> {
> return false;
> }
> ]]></method>
> </script-data-set>
> </data-sets>
> <styles>
> <style name="report" id="4">
> <property name="fontFamily">"Verdana"</property>
> <property name="fontSize">10pt</property>
> </style>
> <style name="crosstab" 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-cell" 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">
> <property name="topMargin">0.25in</property>
> <property name="leftMargin">0.25in</property>
> <property name="bottomMargin">0.25in</property>
> <property name="rightMargin">0.25in</property>
> <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="9">
> <property name="width">100%</property>
> <property name="dataSet">db2DataSet</property>
> <list-property name="visibility">
> <structure>
> <property name="format">all</property>
> <expression name="valueExpr">true</expression>
> </structure>
> </list-property>
> <list-property name="boundDataColumns">
> <structure>
> <property name="name">PRG_ID</property>
> <property name="displayName">PRG_ID</property>
> <expression name="expression">dataSetRow["PRG_ID"]</expression>
> <property name="dataType">integer</property>
> </structure>
> <structure>
> <property name="name">PRG_STS_CD</property>
> <property name="displayName">PRG_STS_CD</property>
> <expression name="expression">dataSetRow["PRG_STS_CD"]</expression>
> <property name="dataType">string</property>
> </structure>
> <structure>
> <property name="name">PRG_TYPE_CD</property>
> <property name="displayName">PRG_TYPE_CD</property>
> <expression name="expression">dataSetRow["PRG_TYPE_CD"]</expression >
> <property name="dataType">string</property>
> </structure>
> </list-property>
> <method name="onCreate"><![CDATA[/*var data={};
>
> data.prg_id = this.getRowData().getColumnValue("PRG_ID");
> data.prg_type_cd = this.getRowData().getColumnValue("PRG_TYPE_CD");
> data.prg_sts_cd = this.getRowData().getColumnValue("PRG_STS_CD");
> globalvarList.add(data);
> */]]></method>
> <column id="28">
> <property name="textAlign">center</property>
> </column>
> <column id="29">
> <property name="textAlign">center</property>
> </column>
> <column id="30">
> <property name="textAlign">center</property>
> </column>
> <header>
> <row id="10">
> <cell id="11">
> <label id="12">
> <text-property name="text">PRG_ID from db2DataSet</text-property>
> </label>
> </cell>
> <cell id="13">
> <label id="14">
> <text-property name="text">PRG_STS_CD from db2DataSet</text-property>
> </label>
> </cell>
> <cell id="15">
> <label id="16">
> <text-property name="text">PRG_TYPE_CD from db2DataSet</text-property>
> </label>
> </cell>
> </row>
> </header>
> <detail>
> <row id="17">
> <method name="onCreate"><![CDATA[var data={};
>
> //data.prg_id = row.PRG_ID;
> //data.prg_type_cd = row.PRG_TYPE_CD;
> //data.prg_sts_cd = row.PRG_STS_CD;
>
> data[0] = this.getRowData().getColumnValue("PRG_ID");
> data[1] = this.getRowData().getColumnValue("PRG_TYPE_CD");
> data[2] = this.getRowData().getColumnValue("PRG_STS_CD");
>
>
> globalvarList.add(data);
>
> importPackage( Packages.java.io );
> out = new PrintWriter( new FileWriter( "c:/birttest/events.txt", true ) );
> out.println( "oncreate event");
> out.close();
> ]]></method>
> <cell id="18">
> <data id="19">
> <property name="resultSetColumn">PRG_ID</property>
> </data>
> </cell>
> <cell id="20">
> <data id="21">
> <property name="resultSetColumn">PRG_STS_CD</property>
> </data>
> </cell>
> <cell id="22">
> <data id="23">
> <property name="resultSetColumn">PRG_TYPE_CD</property>
> </data>
> </cell>
> </row>
> </detail>
> <footer>
> <row id="24">
> <cell id="25"/>
> <cell id="26"/>
> <cell id="27"/>
> </row>
> </footer>
> </table>
> <table id="33">
> <property name="width">100%</property>
> <property name="dataSet">scriptedDataSet</property>
> <list-property name="boundDataColumns">
> <structure>
> <property name="name">PRG_ID</property>
> <property name="displayName">Program ID</property>
> <expression name="expression">dataSetRow["PRG_ID"]</expression>
> <property name="dataType">integer</property>
> </structure>
> <structure>
> <property name="name">PRG_TYPE_CD</property>
> <property name="displayName">Program Type</property>
> <expression name="expression">dataSetRow["PRG_TYPE_CD"]</expression >
> <property name="dataType">string</property>
> </structure>
> <structure>
> <property name="name">PRG_STS_CD</property>
> <property name="displayName">Program Status</property>
> <expression name="expression">dataSetRow["PRG_STS_CD"]</expression>
> <property name="dataType">string</property>
> </structure>
> <structure>
> <property name="name">programCount</property>
> <property name="displayName"># of Rows</property>
> <expression name="expression">dataSetRow["programCount"]</expression >
> <property name="dataType">integer</property>
> </structure>
> </list-property>
> <column id="52">
> <property name="textAlign">center</property>
> </column>
> <column id="53">
> <property name="textAlign">center</property>
> </column>
> <column id="54">
> <property name="textAlign">center</property>
> </column>
> <column id="58">
> <property name="textAlign">center</property>
> </column>
> <header>
> <row id="34">
> <cell id="35">
> <label id="36">
> <text-property name="text">Program ID</text-property>
> </label>
> </cell>
> <cell id="37">
> <label id="38">
> <text-property name="text">Program Type</text-property>
> </label>
> </cell>
> <cell id="39">
> <label id="40">
> <text-property name="text">Program Status</text-property>
> </label>
> </cell>
> <cell id="55">
> <label id="59">
> <text-property name="text"># of Rows</text-property>
> </label>
> </cell>
> </row>
> </header>
> <detail>
> <row id="41">
> <cell id="42">
> <data id="43">
> <property name="resultSetColumn">PRG_ID</property>
> </data>
> </cell>
> <cell id="44">
> <data id="45">
> <property name="resultSetColumn">PRG_TYPE_CD</property>
> </data>
> </cell>
> <cell id="46">
> <data id="47">
> <property name="resultSetColumn">PRG_STS_CD</property>
> </data>
> </cell>
> <cell id="56">
> <data id="60">
> <property name="resultSetColumn">programCount</property>
> </data>
> </cell>
> </row>
> </detail>
> <footer>
> <row id="48">
> <cell id="49"/>
> <cell id="50"/>
> <cell id="51"/>
> <cell id="57"/>
> </row>
> </footer>
> </table>
> </body>
> </report>
>
Re: Scripted dataset problem [message #643855 is a reply to message #641969] Wed, 08 December 2010 13:53 Go to previous messageGo to next message
Don Wood is currently offline Don WoodFriend
Messages: 32
Registered: February 2010
Location: Pennsylvania
Member
Jason,

I re-ran my original query and none of the data is null.

I've included the data below.

-Don

316 E STIP
375 E STIP
413 E STIP
470 A STIP
317 E TIP
318 E TIP
319 E TIP
320 E TIP
321 E TIP
322 E TIP
323 E TIP
324 E TIP
325 E TIP
326 E TIP
327 E TIP
328 E TIP
329 E TIP
330 E TIP
331 E TIP
332 E TIP
333 E TIP
334 E TIP
335 E TIP
336 E TIP
337 E TIP
338 E TIP
339 E TIP
340 E TIP
341 E TIP
376 E TIP
377 E TIP
378 E TIP
379 E TIP
380 E TIP
381 E TIP
382 E TIP
383 E TIP
384 E TIP
385 E TIP
386 E TIP
387 E TIP
388 E TIP
389 E TIP
390 E TIP
391 E TIP
392 E TIP
393 E TIP
394 E TIP
395 E TIP
396 E TIP
397 E TIP
398 E TIP
399 E TIP
400 E TIP
401 E TIP
414 E TIP
415 E TIP
416 E TIP
417 E TIP
418 E TIP
419 E TIP
420 E TIP
421 E TIP
422 E TIP
423 E TIP
424 E TIP
425 E TIP
426 E TIP
427 E TIP
428 E TIP
429 E TIP
430 E TIP
431 E TIP
432 E TIP
433 E TIP
434 E TIP
435 E TIP
436 E TIP
437 E TIP
438 E TIP
439 E TIP
471 A TIP
472 A TIP
473 A TIP
474 A TIP
475 A TIP
476 A TIP
477 A TIP
478 A TIP
479 A TIP
480 A TIP
481 A TIP
482 A TIP
483 A TIP
484 A TIP
485 A TIP
486 A TIP
487 A TIP
488 A TIP
489 A TIP
490 A TIP
491 A TIP
492 A TIP
493 A TIP
494 A TIP
495 A TIP
496 A TIP
315 E TYP
374 E TYP
412 E TYP
469 A TYP
Re: Scripted dataset problem [message #643907 is a reply to message #643855] Wed, 08 December 2010 16:27 Go to previous messageGo to next message
Jason Weathersby is currently offline Jason WeathersbyFriend
Messages: 9167
Registered: July 2009
Senior Member

Don

can you try and change the query to only return one row from DB2?
ie put a where clause to return the 316 row.

Jason

On 12/8/2010 8:53 AM, Don wrote:
> Jason,
>
> I re-ran my original query and none of the data is null.
>
> I've included the data below.
>
> -Don
>
> 316 E STIP
> 375 E STIP
> 413 E STIP
> 470 A STIP
> 317 E TIP
> 318 E TIP
> 319 E TIP
> 320 E TIP
> 321 E TIP
> 322 E TIP
> 323 E TIP
> 324 E TIP
> 325 E TIP
> 326 E TIP
> 327 E TIP
> 328 E TIP
> 329 E TIP
> 330 E TIP
> 331 E TIP
> 332 E TIP
> 333 E TIP
> 334 E TIP
> 335 E TIP
> 336 E TIP
> 337 E TIP
> 338 E TIP
> 339 E TIP
> 340 E TIP
> 341 E TIP
> 376 E TIP
> 377 E TIP
> 378 E TIP
> 379 E TIP
> 380 E TIP
> 381 E TIP
> 382 E TIP
> 383 E TIP
> 384 E TIP
> 385 E TIP
> 386 E TIP
> 387 E TIP
> 388 E TIP
> 389 E TIP
> 390 E TIP
> 391 E TIP
> 392 E TIP
> 393 E TIP
> 394 E TIP
> 395 E TIP
> 396 E TIP
> 397 E TIP
> 398 E TIP
> 399 E TIP
> 400 E TIP
> 401 E TIP
> 414 E TIP
> 415 E TIP
> 416 E TIP
> 417 E TIP
> 418 E TIP
> 419 E TIP
> 420 E TIP
> 421 E TIP
> 422 E TIP
> 423 E TIP
> 424 E TIP
> 425 E TIP
> 426 E TIP
> 427 E TIP
> 428 E TIP
> 429 E TIP
> 430 E TIP
> 431 E TIP
> 432 E TIP
> 433 E TIP
> 434 E TIP
> 435 E TIP
> 436 E TIP
> 437 E TIP
> 438 E TIP
> 439 E TIP
> 471 A TIP
> 472 A TIP
> 473 A TIP
> 474 A TIP
> 475 A TIP
> 476 A TIP
> 477 A TIP
> 478 A TIP
> 479 A TIP
> 480 A TIP
> 481 A TIP
> 482 A TIP
> 483 A TIP
> 484 A TIP
> 485 A TIP
> 486 A TIP
> 487 A TIP
> 488 A TIP
> 489 A TIP
> 490 A TIP
> 491 A TIP
> 492 A TIP
> 493 A TIP
> 494 A TIP
> 495 A TIP
> 496 A TIP
> 315 E TYP
> 374 E TYP
> 412 E TYP
> 469 A TYP
Re: Scripted dataset problem [message #643950 is a reply to message #641969] Wed, 08 December 2010 19:23 Go to previous messageGo to next message
Don Wood is currently offline Don WoodFriend
Messages: 32
Registered: February 2010
Location: Pennsylvania
Member
Jason,

I've changed the report's query to return only one row and still have the same error as seen immediately below.

Below that is the XML for the report.

[12/8/10 14:08:37:012 EST] 0000002c FFDCJanitor I com.ibm.ws.ffdc.impl.FFDCJanitor doCleanupIfNeeded FFDCJANITOR_DELETED_FILES
[12/8/10 14:08:37:200 EST] 0000002c DMAdapter I com.ibm.ws.ffdc.impl.DMAdapter getAnalysisEngine FFDC1009I: Analysis Engine using data base: C:\Program Files\IBM\SDP\runtimes\base_v7\profiles\was70profile2\proper ties\logbr\ffdc\adv\ffdcdb.xml
[12/8/10 14:08:37:262 EST] 0000002c FfdcProvider I com.ibm.ws.ffdc.impl.FfdcProvider logIncident FFDC1003I: FFDC Incident emitted on C:\Program Files\IBM\SDP\runtimes\base_v7\profiles\was70profile2\logs\f fdc\server1_34363436_10.12.08_14.08.37.012508218332435959114 4.txt com.ibm.ws.rsadapter.jdbc.WSJdbcResultSet.next 2624
[12/8/10 14:08:37:356 EST] 0000002c odaconsumer E org.eclipse.birt.data.engine.odaconsumer.ResultSet fetch Cannot fetch the next data row.
Cannot move down to next row in the result set.
SQL error #1: [jcc][t4][10120][10898][3.52.95] Invalid operation: result set is closed. ERRORCODE=-4470, SQLSTATE=null

org.eclipse.birt.report.data.oda.jdbc.JDBCException: Cannot move down to next row in the result set.
SQL error #1: [jcc][t4][10120][10898][3.52.95] Invalid operation: result set is closed. ERRORCODE=-4470, SQLSTATE=null
;
com.ibm.db2.jcc.a.SqlException: [jcc][t4][10120][10898][3.52.95] Invalid operation: result set is closed. ERRORCODE=-4470, SQLSTATE=null
at org.eclipse.birt.report.data.oda.jdbc.ResultSet.next(ResultS et.java:182)
at org.eclipse.datatools.connectivity.oda.consumer.helper.OdaRe sultSet.next(OdaResultSet.java:177)
at org.eclipse.birt.data.engine.odaconsumer.ResultSet.fetch(Res ultSet.java:139)
at org.eclipse.birt.data.engine.executor.cache.OdiAdapter.fetch (OdiAdapter.java:145)
at org.eclipse.birt.data.engine.executor.cache.RowResultSet.nex t(RowResultSet.java:102)
at org.eclipse.birt.data.engine.executor.transform.SimpleResult Set.next(SimpleResultSet.java:356)
at org.eclipse.birt.data.engine.impl.ResultIterator.hasNextRow( ResultIterator.java:480)
at org.eclipse.birt.data.engine.impl.ResultIterator.next(Result Iterator.java:419)
at org.eclipse.birt.data.engine.impl.ResultIterator.close(Resul tIterator.java:884)
at org.eclipse.birt.report.engine.data.dte.QueryResultSet.close (QueryResultSet.java:272)
etc...



Here is the report:

<?xml version="1.0" encoding="UTF-8"?>
<report xmlns="http://www.eclipse.org/birt/2005/design" version="3.2.17" id="1">
<property name="createdBy">Eclipse BIRT Designer Version 2.3.2.r232_20090202 Build &lt;2.3.2.v20090218-0730></property>
<property name="units">in</property>
<method name="beforeFactory"><![CDATA[importPackage(Packages.java.util.*);
globalvarList = new java.util.ArrayList();
prgCount = 0;]]></method>
<property name="iconFile">/templates/blank_report.gif</property>
<property name="bidiLayoutOrientation">ltr</property>
<data-sources>
<oda-data-source extensionID="org.eclipse.birt.report.data.oda.jdbc" name="MPMSDB" id="7">
<property name="odaDriverClass">com.ibm.db2.jcc.DB2Driver</property >
<property name="odaURL">jdbc:db2://pddevgwdsnd2k01:50000/DSN</property>
<property name="odaUser">mpmspgm</property>
<encrypted-property name="odaPassword" encryptionID="base64">bXBtczAx</encrypted-property>
<property name="odaJndiName">jdbc/MPMS</property>
</oda-data-source>
<script-data-source name="scriptedDataSource" id="31"/>
</data-sources>
<data-sets>
<oda-data-set extensionID="org.eclipse.birt.report.data.oda.jdbc.JdbcSelectDataSet " name="db2DataSet" id="8">
<list-property name="columnHints">
<structure>
<property name="columnName">PRG_ID</property>
<property name="displayName">PRG_ID</property>
</structure>
<structure>
<property name="columnName">PRG_STS_CD</property>
<property name="displayName">PRG_STS_CD</property>
</structure>
<structure>
<property name="columnName">PRG_TYPE_CD</property>
<property name="displayName">PRG_TYPE_CD</property>
</structure>
</list-property>
<structure name="cachedMetaData">
<list-property name="resultSet">
<structure>
<property name="position">1</property>
<property name="name">PRG_ID</property>
<property name="dataType">integer</property>
</structure>
<structure>
<property name="position">2</property>
<property name="name">PRG_STS_CD</property>
<property name="dataType">string</property>
</structure>
<structure>
<property name="position">3</property>
<property name="name">PRG_TYPE_CD</property>
<property name="dataType">string</property>
</structure>
</list-property>
</structure>
<property name="dataSource">MPMSDB</property>
<list-property name="resultSet">
<structure>
<property name="position">1</property>
<property name="name">PRG_ID</property>
<property name="nativeName">PRG_ID</property>
<property name="dataType">integer</property>
<property name="nativeDataType">4</property>
</structure>
<structure>
<property name="position">2</property>
<property name="name">PRG_STS_CD</property>
<property name="nativeName">PRG_STS_CD</property>
<property name="dataType">string</property>
<property name="nativeDataType">12</property>
</structure>
<structure>
<property name="position">3</property>
<property name="name">PRG_TYPE_CD</property>
<property name="nativeName">PRG_TYPE_CD</property>
<property name="dataType">string</property>
<property name="nativeDataType">12</property>
</structure>
</list-property>
<property name="queryText">select prg_id, prg_sts_cd, prg_type_cd
from mpmsprod.t001program
where prg_id = 232


/* select ordernumber as prg_id, status as prg_sts_cd, status as prg_type_cd
from orders
order by ordernumber */</property>
</oda-data-set>
<script-data-set name="scriptedDataSet" id="32">
<list-property name="resultSetHints">
<structure>
<property name="position">1</property>
<property name="name">PRG_ID</property>
<property name="dataType">integer</property>
</structure>
<structure>
<property name="position">2</property>
<property name="name">PRG_TYPE_CD</property>
<property name="dataType">string</property>
</structure>
<structure>
<property name="position">3</property>
<property name="name">PRG_STS_CD</property>
<property name="dataType">string</property>
</structure>
<structure>
<property name="position">4</property>
<property name="name">programCount</property>
<property name="dataType">integer</property>
</structure>
</list-property>
<list-property name="columnHints">
<structure>
<property name="columnName">PRG_ID</property>
<property name="displayName">Program ID</property>
</structure>
<structure>
<property name="columnName">PRG_TYPE_CD</property>
<property name="displayName">Program Type</property>
</structure>
<structure>
<property name="columnName">PRG_STS_CD</property>
<property name="displayName">Program Status</property>
</structure>
<structure>
<property name="columnName">programCount</property>
<property name="displayName"># of Rows</property>
</structure>
</list-property>
<structure name="cachedMetaData">
<list-property name="resultSet">
<structure>
<property name="position">1</property>
<property name="name">PRG_ID</property>
<property name="dataType">integer</property>
</structure>
<structure>
<property name="position">2</property>
<property name="name">PRG_TYPE_CD</property>
<property name="dataType">string</property>
</structure>
<structure>
<property name="position">3</property>
<property name="name">PRG_STS_CD</property>
<property name="dataType">string</property>
</structure>
<structure>
<property name="position">4</property>
<property name="name">programCount</property>
<property name="dataType">integer</property>
</structure>
</list-property>
</structure>
<property name="dataSource">scriptedDataSource</property>
<method name="fetch"><![CDATA[if(prgCount < globalvarList.size())
{
var data = globalvarList.get(prgCount);

var prgId = data.prg_id;

if (prgId > 400)
{
// row["PRG_ID"] = data.prg_id;
row["PRG_ID"] = data[0];
}
else
{
// row["PRG_ID"] = 2;
row["PRG_ID"] = 2;
}
// row["PRG_TYPE_CD"] = data.prg_type_cd;
// row["PRG_STS_CD"] =data.prg_sts_cd;
// row["programCount"] = globalvarList.size();
row["PRG_TYPE_CD"] = data[1];
row["PRG_STS_CD"] =data[2];
row["programCount"] = globalvarList.size();
prgCount++;
return true;
}
else
{
return false;
}
]]></method>
</script-data-set>
</data-sets>
<styles>
<style name="report" id="4">
<property name="fontFamily">"Verdana"</property>
<property name="fontSize">10pt</property>
</style>
<style name="crosstab" 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-cell" 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">
<property name="topMargin">0.25in</property>
<property name="leftMargin">0.25in</property>
<property name="bottomMargin">0.25in</property>
<property name="rightMargin">0.25in</property>
<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="9">
<property name="width">100%</property>
<property name="dataSet">db2DataSet</property>
<list-property name="visibility">
<structure>
<property name="format">all</property>
<expression name="valueExpr">true</expression>
</structure>
</list-property>
<list-property name="boundDataColumns">
<structure>
<property name="name">PRG_ID</property>
<property name="displayName">PRG_ID</property>
<expression name="expression">dataSetRow["PRG_ID"]</expression>
<property name="dataType">integer</property>
</structure>
<structure>
<property name="name">PRG_STS_CD</property>
<property name="displayName">PRG_STS_CD</property>
<expression name="expression">dataSetRow["PRG_STS_CD"]</expression>
<property name="dataType">string</property>
</structure>
<structure>
<property name="name">PRG_TYPE_CD</property>
<property name="displayName">PRG_TYPE_CD</property>
<expression name="expression">dataSetRow["PRG_TYPE_CD"]</expression >
<property name="dataType">string</property>
</structure>
</list-property>
<method name="onCreate"><![CDATA[/*var data={};

data.prg_id = this.getRowData().getColumnValue("PRG_ID");
data.prg_type_cd = this.getRowData().getColumnValue("PRG_TYPE_CD");
data.prg_sts_cd = this.getRowData().getColumnValue("PRG_STS_CD");

globalvarList.add(data);
*/]]></method>
<column id="28">
<property name="textAlign">center</property>
</column>
<column id="29">
<property name="textAlign">center</property>
</column>
<column id="30">
<property name="textAlign">center</property>
</column>
<header>
<row id="10">
<cell id="11">
<label id="12">
<text-property name="text">PRG_ID from db2DataSet</text-property>
</label>
</cell>
<cell id="13">
<label id="14">
<text-property name="text">PRG_STS_CD from db2DataSet</text-property>
</label>
</cell>
<cell id="15">
<label id="16">
<text-property name="text">PRG_TYPE_CD from db2DataSet</text-property>
</label>
</cell>
</row>
</header>
<detail>
<row id="17">
<method name="onCreate"><![CDATA[var data={};

//data.prg_id = row.PRG_ID;
//data.prg_type_cd = row.PRG_TYPE_CD;
//data.prg_sts_cd = row.PRG_STS_CD;

data[0] = this.getRowData().getColumnValue("PRG_ID");
data[1] = this.getRowData().getColumnValue("PRG_TYPE_CD");
data[2] = this.getRowData().getColumnValue("PRG_STS_CD");


globalvarList.add(data);

importPackage( Packages.java.io );
out = new PrintWriter( new FileWriter( "c:/birttest/events.txt", true ) );
out.println( "oncreate event");
out.close();
]]></method>
<cell id="18">
<data id="19">
<property name="resultSetColumn">PRG_ID</property>
</data>
</cell>
<cell id="20">
<data id="21">
<property name="resultSetColumn">PRG_STS_CD</property>
</data>
</cell>
<cell id="22">
<data id="23">
<property name="resultSetColumn">PRG_TYPE_CD</property>
</data>
</cell>
</row>
</detail>
<footer>
<row id="24">
<cell id="25"/>
<cell id="26"/>
<cell id="27"/>
</row>
</footer>
</table>
<table id="33">
<property name="width">100%</property>
<property name="dataSet">scriptedDataSet</property>
<list-property name="boundDataColumns">
<structure>
<property name="name">PRG_ID</property>
<property name="displayName">Program ID</property>
<expression name="expression">dataSetRow["PRG_ID"]</expression>
<property name="dataType">integer</property>
</structure>
<structure>
<property name="name">PRG_TYPE_CD</property>
<property name="displayName">Program Type</property>
<expression name="expression">dataSetRow["PRG_TYPE_CD"]</expression >
<property name="dataType">string</property>
</structure>
<structure>
<property name="name">PRG_STS_CD</property>
<property name="displayName">Program Status</property>
<expression name="expression">dataSetRow["PRG_STS_CD"]</expression>
<property name="dataType">string</property>
</structure>
<structure>
<property name="name">programCount</property>
<property name="displayName"># of Rows</property>
<expression name="expression">dataSetRow["programCount"]</expression >
<property name="dataType">integer</property>
</structure>
</list-property>
<column id="52">
<property name="textAlign">center</property>
</column>
<column id="53">
<property name="textAlign">center</property>
</column>
<column id="54">
<property name="textAlign">center</property>
</column>
<column id="58">
<property name="textAlign">center</property>
</column>
<header>
<row id="34">
<cell id="35">
<label id="36">
<text-property name="text">Program ID</text-property>
</label>
</cell>
<cell id="37">
<label id="38">
<text-property name="text">Program Type</text-property>
</label>
</cell>
<cell id="39">
<label id="40">
<text-property name="text">Program Status</text-property>
</label>
</cell>
<cell id="55">
<label id="59">
<text-property name="text"># of Rows</text-property>
</label>
</cell>
</row>
</header>
<detail>
<row id="41">
<cell id="42">
<data id="43">
<property name="resultSetColumn">PRG_ID</property>
</data>
</cell>
<cell id="44">
<data id="45">
<property name="resultSetColumn">PRG_TYPE_CD</property>
</data>
</cell>
<cell id="46">
<data id="47">
<property name="resultSetColumn">PRG_STS_CD</property>
</data>
</cell>
<cell id="56">
<data id="60">
<property name="resultSetColumn">programCount</property>
</data>
</cell>
</row>
</detail>
<footer>
<row id="48">
<cell id="49"/>
<cell id="50"/>
<cell id="51"/>
<cell id="57"/>
</row>
</footer>
</table>
</body>
</report>
Re: Scripted dataset problem [message #643961 is a reply to message #643950] Wed, 08 December 2010 20:10 Go to previous messageGo to next message
Jason Weathersby is currently offline Jason WeathersbyFriend
Messages: 9167
Registered: July 2009
Senior Member

Don,

I am not certain why this is happening but
can you create another dataset that selects one row that is different
from the first and then put a table tied to this dataset after the
scripted dataset table? I want to see why BIRT is closing the connection.

Jason

On 12/8/2010 2:23 PM, Don wrote:
> Jason,
>
> I've changed the report's query to return only one row and still have
> the same error as seen immediately below.
>
> Below that is the XML for the report.
>
> [12/8/10 14:08:37:012 EST] 0000002c FFDCJanitor I
> com.ibm.ws.ffdc.impl.FFDCJanitor doCleanupIfNeeded
> FFDCJANITOR_DELETED_FILES
> [12/8/10 14:08:37:200 EST] 0000002c DMAdapter I
> com.ibm.ws.ffdc.impl.DMAdapter getAnalysisEngine FFDC1009I: Analysis
> Engine using data base: C:\Program
> Files\IBM\SDP\runtimes\base_v7\profiles\was70profile2\proper
> ties\logbr\ffdc\adv\ffdcdb.xml
> [12/8/10 14:08:37:262 EST] 0000002c FfdcProvider I
> com.ibm.ws.ffdc.impl.FfdcProvider logIncident FFDC1003I: FFDC Incident
> emitted on C:\Program
> Files\IBM\SDP\runtimes\base_v7\profiles\was70profile2\logs\f
> fdc\server1_34363436_10.12.08_14.08.37.012508218332435959114 4.txt
> com.ibm.ws.rsadapter.jdbc.WSJdbcResultSet.next 2624
> [12/8/10 14:08:37:356 EST] 0000002c odaconsumer E
> org.eclipse.birt.data.engine.odaconsumer.ResultSet fetch Cannot fetch
> the next data row.
> Cannot move down to next row in the result set.
> SQL error #1: [jcc][t4][10120][10898][3.52.95] Invalid operation: result
> set is closed. ERRORCODE=-4470, SQLSTATE=null
>
> org.eclipse.birt.report.data.oda.jdbc.JDBCException: Cannot move down to
> next row in the result set.
> SQL error #1: [jcc][t4][10120][10898][3.52.95] Invalid operation: result
> set is closed. ERRORCODE=-4470, SQLSTATE=null
> ;
> com.ibm.db2.jcc.a.SqlException: [jcc][t4][10120][10898][3.52.95] Invalid
> operation: result set is closed. ERRORCODE=-4470, SQLSTATE=null
> at org.eclipse.birt.report.data.oda.jdbc.ResultSet.next(ResultS
> et.java:182)
> at org.eclipse.datatools.connectivity.oda.consumer.helper.OdaRe
> sultSet.next(OdaResultSet.java:177)
> at org.eclipse.birt.data.engine.odaconsumer.ResultSet.fetch(Res
> ultSet.java:139)
> at org.eclipse.birt.data.engine.executor.cache.OdiAdapter.fetch
> (OdiAdapter.java:145)
> at org.eclipse.birt.data.engine.executor.cache.RowResultSet.nex
> t(RowResultSet.java:102)
> at org.eclipse.birt.data.engine.executor.transform.SimpleResult
> Set.next(SimpleResultSet.java:356)
> at org.eclipse.birt.data.engine.impl.ResultIterator.hasNextRow(
> ResultIterator.java:480)
> at org.eclipse.birt.data.engine.impl.ResultIterator.next(Result
> Iterator.java:419)
> at org.eclipse.birt.data.engine.impl.ResultIterator.close(Resul
> tIterator.java:884)
> at org.eclipse.birt.report.engine.data.dte.QueryResultSet.close
> (QueryResultSet.java:272)
> etc...
>
>
>
> Here is the report:
>
> <?xml version="1.0" encoding="UTF-8"?>
> <report xmlns="http://www.eclipse.org/birt/2005/design" version="3.2.17"
> id="1">
> <property name="createdBy">Eclipse BIRT Designer Version
> 2.3.2.r232_20090202 Build <2.3.2.v20090218-0730></property>
> <property name="units">in</property>
> <method name="beforeFactory"><![CDATA[importPackage(Packages.java.util.*);
> globalvarList = new java.util.ArrayList();
> prgCount = 0;]]></method>
> <property name="iconFile">/templates/blank_report.gif</property>
> <property name="bidiLayoutOrientation">ltr</property>
> <data-sources>
> <oda-data-source extensionID="org.eclipse.birt.report.data.oda.jdbc"
> name="MPMSDB" id="7">
> <property name="odaDriverClass">com.ibm.db2.jcc.DB2Driver</property >
> <property name="odaURL">jdbc:db2://pddevgwdsnd2k01:50000/DSN</property>
> <property name="odaUser">mpmspgm</property>
> <encrypted-property name="odaPassword"
> encryptionID="base64">bXBtczAx</encrypted-property>
> <property name="odaJndiName">jdbc/MPMS</property>
> </oda-data-source>
> <script-data-source name="scriptedDataSource" id="31"/>
> </data-sources>
> <data-sets>
> <oda-data-set
> extensionID="org.eclipse.birt.report.data.oda.jdbc.JdbcSelectDataSet "
> name="db2DataSet" id="8">
> <list-property name="columnHints">
> <structure>
> <property name="columnName">PRG_ID</property>
> <property name="displayName">PRG_ID</property>
> </structure>
> <structure>
> <property name="columnName">PRG_STS_CD</property>
> <property name="displayName">PRG_STS_CD</property>
> </structure>
> <structure>
> <property name="columnName">PRG_TYPE_CD</property>
> <property name="displayName">PRG_TYPE_CD</property>
> </structure>
> </list-property>
> <structure name="cachedMetaData">
> <list-property name="resultSet">
> <structure>
> <property name="position">1</property>
> <property name="name">PRG_ID</property>
> <property name="dataType">integer</property>
> </structure>
> <structure>
> <property name="position">2</property>
> <property name="name">PRG_STS_CD</property>
> <property name="dataType">string</property>
> </structure>
> <structure>
> <property name="position">3</property>
> <property name="name">PRG_TYPE_CD</property>
> <property name="dataType">string</property>
> </structure>
> </list-property>
> </structure>
> <property name="dataSource">MPMSDB</property>
> <list-property name="resultSet">
> <structure>
> <property name="position">1</property>
> <property name="name">PRG_ID</property>
> <property name="nativeName">PRG_ID</property>
> <property name="dataType">integer</property>
> <property name="nativeDataType">4</property>
> </structure>
> <structure>
> <property name="position">2</property>
> <property name="name">PRG_STS_CD</property>
> <property name="nativeName">PRG_STS_CD</property>
> <property name="dataType">string</property>
> <property name="nativeDataType">12</property>
> </structure>
> <structure>
> <property name="position">3</property>
> <property name="name">PRG_TYPE_CD</property>
> <property name="nativeName">PRG_TYPE_CD</property>
> <property name="dataType">string</property>
> <property name="nativeDataType">12</property>
> </structure>
> </list-property>
> <property name="queryText">select prg_id, prg_sts_cd, prg_type_cd
> from mpmsprod.t001program
> where prg_id = 232
>
>
> /* select ordernumber as prg_id, status as prg_sts_cd, status as
> prg_type_cd
> from orders
> order by ordernumber */</property>
> </oda-data-set>
> <script-data-set name="scriptedDataSet" id="32">
> <list-property name="resultSetHints">
> <structure>
> <property name="position">1</property>
> <property name="name">PRG_ID</property>
> <property name="dataType">integer</property>
> </structure>
> <structure>
> <property name="position">2</property>
> <property name="name">PRG_TYPE_CD</property>
> <property name="dataType">string</property>
> </structure>
> <structure>
> <property name="position">3</property>
> <property name="name">PRG_STS_CD</property>
> <property name="dataType">string</property>
> </structure>
> <structure>
> <property name="position">4</property>
> <property name="name">programCount</property>
> <property name="dataType">integer</property>
> </structure>
> </list-property>
> <list-property name="columnHints">
> <structure>
> <property name="columnName">PRG_ID</property>
> <property name="displayName">Program ID</property>
> </structure>
> <structure>
> <property name="columnName">PRG_TYPE_CD</property>
> <property name="displayName">Program Type</property>
> </structure>
> <structure>
> <property name="columnName">PRG_STS_CD</property>
> <property name="displayName">Program Status</property>
> </structure>
> <structure>
> <property name="columnName">programCount</property>
> <property name="displayName"># of Rows</property>
> </structure>
> </list-property>
> <structure name="cachedMetaData">
> <list-property name="resultSet">
> <structure>
> <property name="position">1</property>
> <property name="name">PRG_ID</property>
> <property name="dataType">integer</property>
> </structure>
> <structure>
> <property name="position">2</property>
> <property name="name">PRG_TYPE_CD</property>
> <property name="dataType">string</property>
> </structure>
> <structure>
> <property name="position">3</property>
> <property name="name">PRG_STS_CD</property>
> <property name="dataType">string</property>
> </structure>
> <structure>
> <property name="position">4</property>
> <property name="name">programCount</property>
> <property name="dataType">integer</property>
> </structure>
> </list-property>
> </structure>
> <property name="dataSource">scriptedDataSource</property>
> <method name="fetch"><![CDATA[if(prgCount < globalvarList.size())
> {
> var data = globalvarList.get(prgCount);
>
> var prgId = data.prg_id;
>
> if (prgId > 400)
> { // row["PRG_ID"] = data.prg_id;
> row["PRG_ID"] = data[0];
> }
> else
> {
> // row["PRG_ID"] = 2;
> row["PRG_ID"] = 2;
> }
> // row["PRG_TYPE_CD"] = data.prg_type_cd;
> // row["PRG_STS_CD"] =data.prg_sts_cd;
> // row["programCount"] = globalvarList.size();
> row["PRG_TYPE_CD"] = data[1];
> row["PRG_STS_CD"] =data[2];
> row["programCount"] = globalvarList.size();
> prgCount++;
> return true;
> }
> else
> {
> return false;
> }
> ]]></method>
> </script-data-set>
> </data-sets>
> <styles>
> <style name="report" id="4">
> <property name="fontFamily">"Verdana"</property>
> <property name="fontSize">10pt</property>
> </style>
> <style name="crosstab" 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-cell" 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">
> <property name="topMargin">0.25in</property>
> <property name="leftMargin">0.25in</property>
> <property name="bottomMargin">0.25in</property>
> <property name="rightMargin">0.25in</property>
> <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="9">
> <property name="width">100%</property>
> <property name="dataSet">db2DataSet</property>
> <list-property name="visibility">
> <structure>
> <property name="format">all</property>
> <expression name="valueExpr">true</expression>
> </structure>
> </list-property>
> <list-property name="boundDataColumns">
> <structure>
> <property name="name">PRG_ID</property>
> <property name="displayName">PRG_ID</property>
> <expression name="expression">dataSetRow["PRG_ID"]</expression>
> <property name="dataType">integer</property>
> </structure>
> <structure>
> <property name="name">PRG_STS_CD</property>
> <property name="displayName">PRG_STS_CD</property>
> <expression name="expression">dataSetRow["PRG_STS_CD"]</expression>
> <property name="dataType">string</property>
> </structure>
> <structure>
> <property name="name">PRG_TYPE_CD</property>
> <property name="displayName">PRG_TYPE_CD</property>
> <expression name="expression">dataSetRow["PRG_TYPE_CD"]</expression >
> <property name="dataType">string</property>
> </structure>
> </list-property>
> <method name="onCreate"><![CDATA[/*var data={};
>
> data.prg_id = this.getRowData().getColumnValue("PRG_ID");
> data.prg_type_cd = this.getRowData().getColumnValue("PRG_TYPE_CD");
> data.prg_sts_cd = this.getRowData().getColumnValue("PRG_STS_CD");
> globalvarList.add(data);
> */]]></method>
> <column id="28">
> <property name="textAlign">center</property>
> </column>
> <column id="29">
> <property name="textAlign">center</property>
> </column>
> <column id="30">
> <property name="textAlign">center</property>
> </column>
> <header>
> <row id="10">
> <cell id="11">
> <label id="12">
> <text-property name="text">PRG_ID from db2DataSet</text-property>
> </label>
> </cell>
> <cell id="13">
> <label id="14">
> <text-property name="text">PRG_STS_CD from db2DataSet</text-property>
> </label>
> </cell>
> <cell id="15">
> <label id="16">
> <text-property name="text">PRG_TYPE_CD from db2DataSet</text-property>
> </label>
> </cell>
> </row>
> </header>
> <detail>
> <row id="17">
> <method name="onCreate"><![CDATA[var data={};
>
> //data.prg_id = row.PRG_ID;
> //data.prg_type_cd = row.PRG_TYPE_CD;
> //data.prg_sts_cd = row.PRG_STS_CD;
>
> data[0] = this.getRowData().getColumnValue("PRG_ID");
> data[1] = this.getRowData().getColumnValue("PRG_TYPE_CD");
> data[2] = this.getRowData().getColumnValue("PRG_STS_CD");
>
>
> globalvarList.add(data);
>
> importPackage( Packages.java.io );
> out = new PrintWriter( new FileWriter( "c:/birttest/events.txt", true ) );
> out.println( "oncreate event");
> out.close();
> ]]></method>
> <cell id="18">
> <data id="19">
> <property name="resultSetColumn">PRG_ID</property>
> </data>
> </cell>
> <cell id="20">
> <data id="21">
> <property name="resultSetColumn">PRG_STS_CD</property>
> </data>
> </cell>
> <cell id="22">
> <data id="23">
> <property name="resultSetColumn">PRG_TYPE_CD</property>
> </data>
> </cell>
> </row>
> </detail>
> <footer>
> <row id="24">
> <cell id="25"/>
> <cell id="26"/>
> <cell id="27"/>
> </row>
> </footer>
> </table>
> <table id="33">
> <property name="width">100%</property>
> <property name="dataSet">scriptedDataSet</property>
> <list-property name="boundDataColumns">
> <structure>
> <property name="name">PRG_ID</property>
> <property name="displayName">Program ID</property>
> <expression name="expression">dataSetRow["PRG_ID"]</expression>
> <property name="dataType">integer</property>
> </structure>
> <structure>
> <property name="name">PRG_TYPE_CD</property>
> <property name="displayName">Program Type</property>
> <expression name="expression">dataSetRow["PRG_TYPE_CD"]</expression >
> <property name="dataType">string</property>
> </structure>
> <structure>
> <property name="name">PRG_STS_CD</property>
> <property name="displayName">Program Status</property>
> <expression name="expression">dataSetRow["PRG_STS_CD"]</expression>
> <property name="dataType">string</property>
> </structure>
> <structure>
> <property name="name">programCount</property>
> <property name="displayName"># of Rows</property>
> <expression name="expression">dataSetRow["programCount"]</expression >
> <property name="dataType">integer</property>
> </structure>
> </list-property>
> <column id="52">
> <property name="textAlign">center</property>
> </column>
> <column id="53">
> <property name="textAlign">center</property>
> </column>
> <column id="54">
> <property name="textAlign">center</property>
> </column>
> <column id="58">
> <property name="textAlign">center</property>
> </column>
> <header>
> <row id="34">
> <cell id="35">
> <label id="36">
> <text-property name="text">Program ID</text-property>
> </label>
> </cell>
> <cell id="37">
> <label id="38">
> <text-property name="text">Program Type</text-property>
> </label>
> </cell>
> <cell id="39">
> <label id="40">
> <text-property name="text">Program Status</text-property>
> </label>
> </cell>
> <cell id="55">
> <label id="59">
> <text-property name="text"># of Rows</text-property>
> </label>
> </cell>
> </row>
> </header>
> <detail>
> <row id="41">
> <cell id="42">
> <data id="43">
> <property name="resultSetColumn">PRG_ID</property>
> </data>
> </cell>
> <cell id="44">
> <data id="45">
> <property name="resultSetColumn">PRG_TYPE_CD</property>
> </data>
> </cell>
> <cell id="46">
> <data id="47">
> <property name="resultSetColumn">PRG_STS_CD</property>
> </data>
> </cell>
> <cell id="56">
> <data id="60">
> <property name="resultSetColumn">programCount</property>
> </data>
> </cell>
> </row>
> </detail>
> <footer>
> <row id="48">
> <cell id="49"/>
> <cell id="50"/>
> <cell id="51"/>
> <cell id="57"/>
> </row>
> </footer>
> </table>
> </body>
> </report>
>
Re: Scripted dataset problem [message #644082 is a reply to message #641969] Thu, 09 December 2010 12:02 Go to previous messageGo to next message
Don Wood is currently offline Don WoodFriend
Messages: 32
Registered: February 2010
Location: Pennsylvania
Member
Jason,

I've created a new dataset which is selecting another row and I've added a table to the report following the table using the scripted dataset. The results were the same. I've included below, first part of the error and then the XML for the report.

ERROR
[12/9/10 6:46:20:679 EST] 00000023 odaconsumer E org.eclipse.birt.data.engine.odaconsumer.ResultSet fetch Cannot fetch the next data row.
Cannot move down to next row in the result set.
SQL error #1: [jcc][t4][10120][10898][3.52.95] Invalid operation: result set is closed. ERRORCODE=-4470, SQLSTATE=null

org.eclipse.birt.report.data.oda.jdbc.JDBCException: Cannot move down to next row in the result set.
SQL error #1: [jcc][t4][10120][10898][3.52.95] Invalid operation: result set is closed. ERRORCODE=-4470, SQLSTATE=null
;
com.ibm.db2.jcc.a.SqlException: [jcc][t4][10120][10898][3.52.95] Invalid operation: result set is closed. ERRORCODE=-4470, SQLSTATE=null
at org.eclipse.birt.report.data.oda.jdbc.ResultSet.next(ResultS et.java:182)
at org.eclipse.datatools.connectivity.oda.consumer.helper.OdaRe sultSet.next(OdaResultSet.java:177)
at org.eclipse.birt.data.engine.odaconsumer.ResultSet.fetch(Res ultSet.java:139)
at org.eclipse.birt.data.engine.executor.cache.OdiAdapter.fetch (OdiAdapter.java:145)
at org.eclipse.birt.data.engine.executor.cache.RowResultSet.nex t(RowResultSet.java:102)
at org.eclipse.birt.data.engine.executor.transform.SimpleResult Set.next(SimpleResultSet.java:356)
at org.eclipse.birt.data.engine.impl.ResultIterator.hasNextRow( ResultIterator.java:480)
at org.eclipse.birt.data.engine.impl.ResultIterator.next(Result Iterator.java:419)
at org.eclipse.birt.data.engine.impl.ResultIterator.close(Resul tIterator.java:884)
at org.eclipse.birt.report.engine.data.dte.QueryResultSet.close (QueryResultSet.java:272)
at org.eclipse.birt.report.engine.executor.QueryItemExecutor.cl oseQuery(QueryItemExecutor.java:46)
at org.eclipse.birt.report.engine.executor.TableItemExecutor.cl ose(TableItemExecutor.java:107)
at org.eclipse.birt.report.engine.internal.executor.wrap.Wrappe dReportItemExecutor.close(WrappedReportItemExecutor.java:39)
at org.eclipse.birt.report.engine.internal.executor.emitter.Rep ortItemEmitterExecutor.close(ReportItemEmitterExecutor.java: 40)
at org.eclipse.birt.report.engine.internal.executor.wrap.Wrappe dReportItemExecutor.close(WrappedReportItemExecutor.java:39)
at org.eclipse.birt.report.engine.internal.executor.dup.Suppres sDuplicateItemExecutor.close(SuppressDuplicateItemExecutor.j ava:35)
at org.eclipse.birt.report.engine.layout.html.HTMLBlockStacking LM.layoutNodes(HTMLBlockStackingLM.java:83)
at org.eclipse.birt.report.engine.layout.html.HTMLPageLM.layout (HTMLPageLM.java:90)
at org.eclipse.birt.report.engine.layout.html.HTMLReportLayoutE ngine.layout(HTMLReportLayoutEngine.java:101)
at org.eclipse.birt.report.engine.presentation.ReportDocumentBu ilder.build(ReportDocumentBuilder.java:211)
at org.eclipse.birt.report.engine.api.impl.RunTask.doRun(RunTas k.java:237)
at org.eclipse.birt.report.engine.api.impl.RunTask.run(RunTask. java:90)


XML FOR REPORT
<?xml version="1.0" encoding="UTF-8"?>
<report xmlns="http://www.eclipse.org/birt/2005/design" version="3.2.17" id="1">
<property name="createdBy">Eclipse BIRT Designer Version 2.3.2.r232_20090202 Build &lt;2.3.2.v20090218-0730></property>
<property name="units">in</property>
<method name="beforeFactory"><![CDATA[importPackage(Packages.java.util.*);
globalvarList = new java.util.ArrayList();
prgCount = 0;]]></method>
<property name="iconFile">/templates/blank_report.gif</property>
<property name="bidiLayoutOrientation">ltr</property>
<data-sources>
<oda-data-source extensionID="org.eclipse.birt.report.data.oda.jdbc" name="MPMSDB" id="7">
<property name="odaDriverClass">com.ibm.db2.jcc.DB2Driver</property >
<property name="odaURL">jdbc:db2://pddevgwdsnd2k01:50000/DSN</property>
<property name="odaUser">mpmspgm</property>
<encrypted-property name="odaPassword" encryptionID="base64">bXBtczAx</encrypted-property>
<property name="odaJndiName">jdbc/MPMS</property>
</oda-data-source>
<script-data-source name="scriptedDataSource" id="31"/>
</data-sources>
<data-sets>
<oda-data-set extensionID="org.eclipse.birt.report.data.oda.jdbc.JdbcSelectDataSet " name="db2DataSet" id="8">
<list-property name="columnHints">
<structure>
<property name="columnName">PRG_ID</property>
<property name="displayName">PRG_ID</property>
</structure>
<structure>
<property name="columnName">PRG_STS_CD</property>
<property name="displayName">PRG_STS_CD</property>
</structure>
<structure>
<property name="columnName">PRG_TYPE_CD</property>
<property name="displayName">PRG_TYPE_CD</property>
</structure>
</list-property>
<structure name="cachedMetaData">
<list-property name="resultSet">
<structure>
<property name="position">1</property>
<property name="name">PRG_ID</property>
<property name="dataType">integer</property>
</structure>
<structure>
<property name="position">2</property>
<property name="name">PRG_STS_CD</property>
<property name="dataType">string</property>
</structure>
<structure>
<property name="position">3</property>
<property name="name">PRG_TYPE_CD</property>
<property name="dataType">string</property>
</structure>
</list-property>
</structure>
<property name="dataSource">MPMSDB</property>
<list-property name="resultSet">
<structure>
<property name="position">1</property>
<property name="name">PRG_ID</property>
<property name="nativeName">PRG_ID</property>
<property name="dataType">integer</property>
<property name="nativeDataType">4</property>
</structure>
<structure>
<property name="position">2</property>
<property name="name">PRG_STS_CD</property>
<property name="nativeName">PRG_STS_CD</property>
<property name="dataType">string</property>
<property name="nativeDataType">12</property>
</structure>
<structure>
<property name="position">3</property>
<property name="name">PRG_TYPE_CD</property>
<property name="nativeName">PRG_TYPE_CD</property>
<property name="dataType">string</property>
<property name="nativeDataType">12</property>
</structure>
</list-property>
<property name="queryText">select prg_id, prg_sts_cd, prg_type_cd
from mpmsprod.t001program
where prg_id = 232


/* select ordernumber as prg_id, status as prg_sts_cd, status as prg_type_cd
from orders
order by ordernumber */</property>
</oda-data-set>
<script-data-set name="scriptedDataSet" id="32">
<list-property name="resultSetHints">
<structure>
<property name="position">1</property>
<property name="name">PRG_ID</property>
<property name="dataType">integer</property>
</structure>
<structure>
<property name="position">2</property>
<property name="name">PRG_TYPE_CD</property>
<property name="dataType">string</property>
</structure>
<structure>
<property name="position">3</property>
<property name="name">PRG_STS_CD</property>
<property name="dataType">string</property>
</structure>
<structure>
<property name="position">4</property>
<property name="name">programCount</property>
<property name="dataType">integer</property>
</structure>
</list-property>
<list-property name="columnHints">
<structure>
<property name="columnName">PRG_ID</property>
<property name="displayName">Program ID</property>
</structure>
<structure>
<property name="columnName">PRG_TYPE_CD</property>
<property name="displayName">Program Type</property>
</structure>
<structure>
<property name="columnName">PRG_STS_CD</property>
<property name="displayName">Program Status</property>
</structure>
<structure>
<property name="columnName">programCount</property>
<property name="displayName"># of Rows</property>
</structure>
</list-property>
<structure name="cachedMetaData">
<list-property name="resultSet">
<structure>
<property name="position">1</property>
<property name="name">PRG_ID</property>
<property name="dataType">integer</property>
</structure>
<structure>
<property name="position">2</property>
<property name="name">PRG_TYPE_CD</property>
<property name="dataType">string</property>
</structure>
<structure>
<property name="position">3</property>
<property name="name">PRG_STS_CD</property>
<property name="dataType">string</property>
</structure>
<structure>
<property name="position">4</property>
<property name="name">programCount</property>
<property name="dataType">integer</property>
</structure>
</list-property>
</structure>
<property name="dataSource">scriptedDataSource</property>
<method name="fetch"><![CDATA[if(prgCount < globalvarList.size())
{
var data = globalvarList.get(prgCount);

var prgId = data.prg_id;

if (prgId > 400)
{
// row["PRG_ID"] = data.prg_id;
row["PRG_ID"] = data[0];
}
else
{
// row["PRG_ID"] = 2;
row["PRG_ID"] = 2;
}
// row["PRG_TYPE_CD"] = data.prg_type_cd;
// row["PRG_STS_CD"] =data.prg_sts_cd;
// row["programCount"] = globalvarList.size();
row["PRG_TYPE_CD"] = data[1];
row["PRG_STS_CD"] =data[2];
row["programCount"] = globalvarList.size();
prgCount++;
return true;
}
else
{
return false;
}
]]></method>
</script-data-set>
<oda-data-set extensionID="org.eclipse.birt.report.data.oda.jdbc.JdbcSelectDataSet " name="db2DataSet1" id="61">
<list-property name="columnHints">
<structure>
<property name="columnName">PRG_ID</property>
<property name="displayName">PRG_ID</property>
</structure>
<structure>
<property name="columnName">PRG_STS_CD</property>
<property name="displayName">PRG_STS_CD</property>
</structure>
<structure>
<property name="columnName">PRG_TYPE_CD</property>
<property name="displayName">PRG_TYPE_CD</property>
</structure>
</list-property>
<structure name="cachedMetaData">
<list-property name="resultSet">
<structure>
<property name="position">1</property>
<property name="name">PRG_ID</property>
<property name="dataType">integer</property>
</structure>
<structure>
<property name="position">2</property>
<property name="name">PRG_STS_CD</property>
<property name="dataType">string</property>
</structure>
<structure>
<property name="position">3</property>
<property name="name">PRG_TYPE_CD</property>
<property name="dataType">string</property>
</structure>
</list-property>
</structure>
<property name="dataSource">MPMSDB</property>
<list-property name="resultSet">
<structure>
<property name="position">1</property>
<property name="name">PRG_ID</property>
<property name="nativeName">PRG_ID</property>
<property name="dataType">integer</property>
<property name="nativeDataType">4</property>
</structure>
<structure>
<property name="position">2</property>
<property name="name">PRG_STS_CD</property>
<property name="nativeName">PRG_STS_CD</property>
<property name="dataType">string</property>
<property name="nativeDataType">12</property>
</structure>
<structure>
<property name="position">3</property>
<property name="name">PRG_TYPE_CD</property>
<property name="nativeName">PRG_TYPE_CD</property>
<property name="dataType">string</property>
<property name="nativeDataType">12</property>
</structure>
</list-property>
<property name="queryText">select prg_id, prg_sts_cd, prg_type_cd
from mpmsprod.t001program
where prg_id = 316


/* select ordernumber as prg_id, status as prg_sts_cd, status as prg_type_cd
from orders
order by ordernumber */</property>
</oda-data-set>
</data-sets>
<styles>
<style name="report" id="4">
<property name="fontFamily">"Verdana"</property>
<property name="fontSize">10pt</property>
</style>
<style name="crosstab" 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-cell" 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">
<property name="topMargin">0.25in</property>
<property name="leftMargin">0.25in</property>
<property name="bottomMargin">0.25in</property>
<property name="rightMargin">0.25in</property>
<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="9">
<property name="width">100%</property>
<property name="dataSet">db2DataSet</property>
<list-property name="visibility">
<structure>
<property name="format">all</property>
<expression name="valueExpr">true</expression>
</structure>
</list-property>
<list-property name="boundDataColumns">
<structure>
<property name="name">PRG_ID</property>
<property name="displayName">PRG_ID</property>
<expression name="expression">dataSetRow["PRG_ID"]</expression>
<property name="dataType">integer</property>
</structure>
<structure>
<property name="name">PRG_STS_CD</property>
<property name="displayName">PRG_STS_CD</property>
<expression name="expression">dataSetRow["PRG_STS_CD"]</expression>
<property name="dataType">string</property>
</structure>
<structure>
<property name="name">PRG_TYPE_CD</property>
<property name="displayName">PRG_TYPE_CD</property>
<expression name="expression">dataSetRow["PRG_TYPE_CD"]</expression >
<property name="dataType">string</property>
</structure>
</list-property>
<method name="onCreate"><![CDATA[/*var data={};

data.prg_id = this.getRowData().getColumnValue("PRG_ID");
data.prg_type_cd = this.getRowData().getColumnValue("PRG_TYPE_CD");
data.prg_sts_cd = this.getRowData().getColumnValue("PRG_STS_CD");

globalvarList.add(data);
*/]]></method>
<column id="28">
<property name="textAlign">center</property>
</column>
<column id="29">
<property name="textAlign">center</property>
</column>
<column id="30">
<property name="textAlign">center</property>
</column>
<header>
<row id="10">
<cell id="11">
<label id="12">
<text-property name="text">PRG_ID from db2DataSet</text-property>
</label>
</cell>
<cell id="13">
<label id="14">
<text-property name="text">PRG_STS_CD from db2DataSet</text-property>
</label>
</cell>
<cell id="15">
<label id="16">
<text-property name="text">PRG_TYPE_CD from db2DataSet</text-property>
</label>
</cell>
</row>
</header>
<detail>
<row id="17">
<method name="onCreate"><![CDATA[var data={};

//data.prg_id = row.PRG_ID;
//data.prg_type_cd = row.PRG_TYPE_CD;
//data.prg_sts_cd = row.PRG_STS_CD;

data[0] = this.getRowData().getColumnValue("PRG_ID");
data[1] = this.getRowData().getColumnValue("PRG_TYPE_CD");
data[2] = this.getRowData().getColumnValue("PRG_STS_CD");


globalvarList.add(data);

importPackage( Packages.java.io );
out = new PrintWriter( new FileWriter( "c:/birttest/events.txt", true ) );
out.println( "oncreate event");
out.close();
]]></method>
<cell id="18">
<data id="19">
<property name="resultSetColumn">PRG_ID</property>
</data>
</cell>
<cell id="20">
<data id="21">
<property name="resultSetColumn">PRG_STS_CD</property>
</data>
</cell>
<cell id="22">
<data id="23">
<property name="resultSetColumn">PRG_TYPE_CD</property>
</data>
</cell>
</row>
</detail>
<footer>
<row id="24">
<cell id="25"/>
<cell id="26"/>
<cell id="27"/>
</row>
</footer>
</table>
<table id="33">
<property name="width">100%</property>
<property name="dataSet">scriptedDataSet</property>
<list-property name="boundDataColumns">
<structure>
<property name="name">PRG_ID</property>
<property name="displayName">Program ID</property>
<expression name="expression">dataSetRow["PRG_ID"]</expression>
<property name="dataType">integer</property>
</structure>
<structure>
<property name="name">PRG_TYPE_CD</property>
<property name="displayName">Program Type</property>
<expression name="expression">dataSetRow["PRG_TYPE_CD"]</expression >
<property name="dataType">string</property>
</structure>
<structure>
<property name="name">PRG_STS_CD</property>
<property name="displayName">Program Status</property>
<expression name="expression">dataSetRow["PRG_STS_CD"]</expression>
<property name="dataType">string</property>
</structure>
<structure>
<property name="name">programCount</property>
<property name="displayName"># of Rows</property>
<expression name="expression">dataSetRow["programCount"]</expression >
<property name="dataType">integer</property>
</structure>
</list-property>
<column id="52">
<property name="textAlign">center</property>
</column>
<column id="53">
<property name="textAlign">center</property>
</column>
<column id="54">
<property name="textAlign">center</property>
</column>
<column id="58">
<property name="textAlign">center</property>
</column>
<header>
<row id="34">
<cell id="35">
<label id="36">
<text-property name="text">Program ID</text-property>
</label>
</cell>
<cell id="37">
<label id="38">
<text-property name="text">Program Type</text-property>
</label>
</cell>
<cell id="39">
<label id="40">
<text-property name="text">Program Status</text-property>
</label>
</cell>
<cell id="55">
<label id="59">
<text-property name="text"># of Rows</text-property>
</label>
</cell>
</row>
</header>
<detail>
<row id="41">
<cell id="42">
<data id="43">
<property name="resultSetColumn">PRG_ID</property>
</data>
</cell>
<cell id="44">
<data id="45">
<property name="resultSetColumn">PRG_TYPE_CD</property>
</data>
</cell>
<cell id="46">
<data id="47">
<property name="resultSetColumn">PRG_STS_CD</property>
</data>
</cell>
<cell id="56">
<data id="60">
<property name="resultSetColumn">programCount</property>
</data>
</cell>
</row>
</detail>
<footer>
<row id="48">
<cell id="49"/>
<cell id="50"/>
<cell id="51"/>
<cell id="57"/>
</row>
</footer>
</table>
<table id="62">
<property name="width">100%</property>
<property name="dataSet">db2DataSet1</property>
<list-property name="boundDataColumns">
<structure>
<property name="name">PRG_ID</property>
<property name="displayName">PRG_ID</property>
<expression name="expression">dataSetRow["PRG_ID"]</expression>
<property name="dataType">integer</property>
</structure>
<structure>
<property name="name">PRG_STS_CD</property>
<property name="displayName">PRG_STS_CD</property>
<expression name="expression">dataSetRow["PRG_STS_CD"]</expression>
<property name="dataType">string</property>
</structure>
<structure>
<property name="name">PRG_TYPE_CD</property>
<property name="displayName">PRG_TYPE_CD</property>
<expression name="expression">dataSetRow["PRG_TYPE_CD"]</expression >
<property name="dataType">string</property>
</structure>
</list-property>
<column id="81">
<property name="width">2.375in</property>
</column>
<column id="82"/>
<column id="83"/>
<header>
<row id="63">
<cell id="64">
<label id="65">
<property name="textAlign">center</property>
<text-property name="text">PRG_ID_from_2nd_DB2_dataset</text-property>
</label>
</cell>
<cell id="66">
<label id="67">
<property name="textAlign">center</property>
<text-property name="text">PRG_STS_CD_from_2nd_DB2_dataset</text-property >
</label>
</cell>
<cell id="68">
<label id="69">
<property name="textAlign">center</property>
<text-property name="text">PRG_TYPE_CD_from_2nd_DB2_dataset</text-property >
</label>
</cell>
</row>
</header>
<detail>
<row id="70">
<cell id="71">
<data id="72">
<property name="textAlign">center</property>
<property name="resultSetColumn">PRG_ID</property>
</data>
</cell>
<cell id="73">
<data id="74">
<property name="textAlign">center</property>
<property name="resultSetColumn">PRG_STS_CD</property>
</data>
</cell>
<cell id="75">
<data id="76">
<property name="textAlign">center</property>
<property name="resultSetColumn">PRG_TYPE_CD</property>
</data>
</cell>
</row>
</detail>
<footer>
<row id="77">
<cell id="78"/>
<cell id="79"/>
<cell id="80"/>
</row>
</footer>
</table>
</body>
</report>
Re: Scripted dataset problem [message #644177 is a reply to message #644082] Thu, 09 December 2010 17:50 Go to previous messageGo to next message
Jason Weathersby is currently offline Jason WeathersbyFriend
Messages: 9167
Registered: July 2009
Senior Member

Don,

Is there any chance you could log a bug for this?

Jason

On 12/9/2010 7:03 AM, Don wrote:
> Jason,
>
> I've created a new dataset which is selecting another row and I've added
> a table to the report following the table using the scripted dataset.
> The results were the same. I've included below, first part of the error
> and then the XML for the report.
>
> ERROR
> [12/9/10 6:46:20:679 EST] 00000023 odaconsumer E
> org.eclipse.birt.data.engine.odaconsumer.ResultSet fetch Cannot fetch
> the next data row.
> Cannot move down to next row in the result set.
> SQL error #1: [jcc][t4][10120][10898][3.52.95] Invalid operation: result
> set is closed. ERRORCODE=-4470, SQLSTATE=null
>
> org.eclipse.birt.report.data.oda.jdbc.JDBCException: Cannot move down to
> next row in the result set.
> SQL error #1: [jcc][t4][10120][10898][3.52.95] Invalid operation: result
> set is closed. ERRORCODE=-4470, SQLSTATE=null
> ;
> com.ibm.db2.jcc.a.SqlException: [jcc][t4][10120][10898][3.52.95] Invalid
> operation: result set is closed. ERRORCODE=-4470, SQLSTATE=null
> at org.eclipse.birt.report.data.oda.jdbc.ResultSet.next(ResultS
> et.java:182)
> at org.eclipse.datatools.connectivity.oda.consumer.helper.OdaRe
> sultSet.next(OdaResultSet.java:177)
> at org.eclipse.birt.data.engine.odaconsumer.ResultSet.fetch(Res
> ultSet.java:139)
> at org.eclipse.birt.data.engine.executor.cache.OdiAdapter.fetch
> (OdiAdapter.java:145)
> at org.eclipse.birt.data.engine.executor.cache.RowResultSet.nex
> t(RowResultSet.java:102)
> at org.eclipse.birt.data.engine.executor.transform.SimpleResult
> Set.next(SimpleResultSet.java:356)
> at org.eclipse.birt.data.engine.impl.ResultIterator.hasNextRow(
> ResultIterator.java:480)
> at org.eclipse.birt.data.engine.impl.ResultIterator.next(Result
> Iterator.java:419)
> at org.eclipse.birt.data.engine.impl.ResultIterator.close(Resul
> tIterator.java:884)
> at org.eclipse.birt.report.engine.data.dte.QueryResultSet.close
> (QueryResultSet.java:272)
> at org.eclipse.birt.report.engine.executor.QueryItemExecutor.cl
> oseQuery(QueryItemExecutor.java:46)
> at org.eclipse.birt.report.engine.executor.TableItemExecutor.cl
> ose(TableItemExecutor.java:107)
> at org.eclipse.birt.report.engine.internal.executor.wrap.Wrappe
> dReportItemExecutor.close(WrappedReportItemExecutor.java:39)
> at org.eclipse.birt.report.engine.internal.executor.emitter.Rep
> ortItemEmitterExecutor.close(ReportItemEmitterExecutor.java: 40)
> at org.eclipse.birt.report.engine.internal.executor.wrap.Wrappe
> dReportItemExecutor.close(WrappedReportItemExecutor.java:39)
> at org.eclipse.birt.report.engine.internal.executor.dup.Suppres
> sDuplicateItemExecutor.close(SuppressDuplicateItemExecutor.j ava:35)
> at org.eclipse.birt.report.engine.layout.html.HTMLBlockStacking
> LM.layoutNodes(HTMLBlockStackingLM.java:83)
> at org.eclipse.birt.report.engine.layout.html.HTMLPageLM.layout
> (HTMLPageLM.java:90)
> at org.eclipse.birt.report.engine.layout.html.HTMLReportLayoutE
> ngine.layout(HTMLReportLayoutEngine.java:101)
> at org.eclipse.birt.report.engine.presentation.ReportDocumentBu
> ilder.build(ReportDocumentBuilder.java:211)
> at org.eclipse.birt.report.engine.api.impl.RunTask.doRun(RunTas k.java:237)
> at org.eclipse.birt.report.engine.api.impl.RunTask.run(RunTask. java:90)
>
>
> XML FOR REPORT
> <?xml version="1.0" encoding="UTF-8"?>
> <report xmlns="http://www.eclipse.org/birt/2005/design" version="3.2.17"
> id="1">
> <property name="createdBy">Eclipse BIRT Designer Version
> 2.3.2.r232_20090202 Build <2.3.2.v20090218-0730></property>
> <property name="units">in</property>
> <method name="beforeFactory"><![CDATA[importPackage(Packages.java.util.*);
> globalvarList = new java.util.ArrayList();
> prgCount = 0;]]></method>
> <property name="iconFile">/templates/blank_report.gif</property>
> <property name="bidiLayoutOrientation">ltr</property>
> <data-sources>
> <oda-data-source extensionID="org.eclipse.birt.report.data.oda.jdbc"
> name="MPMSDB" id="7">
> <property name="odaDriverClass">com.ibm.db2.jcc.DB2Driver</property >
> <property name="odaURL">jdbc:db2://pddevgwdsnd2k01:50000/DSN</property>
> <property name="odaUser">mpmspgm</property>
> <encrypted-property name="odaPassword"
> encryptionID="base64">bXBtczAx</encrypted-property>
> <property name="odaJndiName">jdbc/MPMS</property>
> </oda-data-source>
> <script-data-source name="scriptedDataSource" id="31"/>
> </data-sources>
> <data-sets>
> <oda-data-set
> extensionID="org.eclipse.birt.report.data.oda.jdbc.JdbcSelectDataSet "
> name="db2DataSet" id="8">
> <list-property name="columnHints">
> <structure>
> <property name="columnName">PRG_ID</property>
> <property name="displayName">PRG_ID</property>
> </structure>
> <structure>
> <property name="columnName">PRG_STS_CD</property>
> <property name="displayName">PRG_STS_CD</property>
> </structure>
> <structure>
> <property name="columnName">PRG_TYPE_CD</property>
> <property name="displayName">PRG_TYPE_CD</property>
> </structure>
> </list-property>
> <structure name="cachedMetaData">
> <list-property name="resultSet">
> <structure>
> <property name="position">1</property>
> <property name="name">PRG_ID</property>
> <property name="dataType">integer</property>
> </structure>
> <structure>
> <property name="position">2</property>
> <property name="name">PRG_STS_CD</property>
> <property name="dataType">string</property>
> </structure>
> <structure>
> <property name="position">3</property>
> <property name="name">PRG_TYPE_CD</property>
> <property name="dataType">string</property>
> </structure>
> </list-property>
> </structure>
> <property name="dataSource">MPMSDB</property>
> <list-property name="resultSet">
> <structure>
> <property name="position">1</property>
> <property name="name">PRG_ID</property>
> <property name="nativeName">PRG_ID</property>
> <property name="dataType">integer</property>
> <property name="nativeDataType">4</property>
> </structure>
> <structure>
> <property name="position">2</property>
> <property name="name">PRG_STS_CD</property>
> <property name="nativeName">PRG_STS_CD</property>
> <property name="dataType">string</property>
> <property name="nativeDataType">12</property>
> </structure>
> <structure>
> <property name="position">3</property>
> <property name="name">PRG_TYPE_CD</property>
> <property name="nativeName">PRG_TYPE_CD</property>
> <property name="dataType">string</property>
> <property name="nativeDataType">12</property>
> </structure>
> </list-property>
> <property name="queryText">select prg_id, prg_sts_cd, prg_type_cd
> from mpmsprod.t001program
> where prg_id = 232
>
>
> /* select ordernumber as prg_id, status as prg_sts_cd, status as
> prg_type_cd
> from orders
> order by ordernumber */</property>
> </oda-data-set>
> <script-data-set name="scriptedDataSet" id="32">
> <list-property name="resultSetHints">
> <structure>
> <property name="position">1</property>
> <property name="name">PRG_ID</property>
> <property name="dataType">integer</property>
> </structure>
> <structure>
> <property name="position">2</property>
> <property name="name">PRG_TYPE_CD</property>
> <property name="dataType">string</property>
> </structure>
> <structure>
> <property name="position">3</property>
> <property name="name">PRG_STS_CD</property>
> <property name="dataType">string</property>
> </structure>
> <structure>
> <property name="position">4</property>
> <property name="name">programCount</property>
> <property name="dataType">integer</property>
> </structure>
> </list-property>
> <list-property name="columnHints">
> <structure>
> <property name="columnName">PRG_ID</property>
> <property name="displayName">Program ID</property>
> </structure>
> <structure>
> <property name="columnName">PRG_TYPE_CD</property>
> <property name="displayName">Program Type</property>
> </structure>
> <structure>
> <property name="columnName">PRG_STS_CD</property>
> <property name="displayName">Program Status</property>
> </structure>
> <structure>
> <property name="columnName">programCount</property>
> <property name="displayName"># of Rows</property>
> </structure>
> </list-property>
> <structure name="cachedMetaData">
> <list-property name="resultSet">
> <structure>
> <property name="position">1</property>
> <property name="name">PRG_ID</property>
> <property name="dataType">integer</property>
> </structure>
> <structure>
> <property name="position">2</property>
> <property name="name">PRG_TYPE_CD</property>
> <property name="dataType">string</property>
> </structure>
> <structure>
> <property name="position">3</property>
> <property name="name">PRG_STS_CD</property>
> <property name="dataType">string</property>
> </structure>
> <structure>
> <property name="position">4</property>
> <property name="name">programCount</property>
> <property name="dataType">integer</property>
> </structure>
> </list-property>
> </structure>
> <property name="dataSource">scriptedDataSource</property>
> <method name="fetch"><![CDATA[if(prgCount < globalvarList.size())
> {
> var data = globalvarList.get(prgCount);
>
> var prgId = data.prg_id;
>
> if (prgId > 400)
> { // row["PRG_ID"] = data.prg_id;
> row["PRG_ID"] = data[0];
> }
> else
> {
> // row["PRG_ID"] = 2;
> row["PRG_ID"] = 2;
> }
> // row["PRG_TYPE_CD"] = data.prg_type_cd;
> // row["PRG_STS_CD"] =data.prg_sts_cd;
> // row["programCount"] = globalvarList.size();
> row["PRG_TYPE_CD"] = data[1];
> row["PRG_STS_CD"] =data[2];
> row["programCount"] = globalvarList.size();
> prgCount++;
> return true;
> }
> else
> {
> return false;
> }
> ]]></method>
> </script-data-set>
> <oda-data-set
> extensionID="org.eclipse.birt.report.data.oda.jdbc.JdbcSelectDataSet "
> name="db2DataSet1" id="61">
> <list-property name="columnHints">
> <structure>
> <property name="columnName">PRG_ID</property>
> <property name="displayName">PRG_ID</property>
> </structure>
> <structure>
> <property name="columnName">PRG_STS_CD</property>
> <property name="displayName">PRG_STS_CD</property>
> </structure>
> <structure>
> <property name="columnName">PRG_TYPE_CD</property>
> <property name="displayName">PRG_TYPE_CD</property>
> </structure>
> </list-property>
> <structure name="cachedMetaData">
> <list-property name="resultSet">
> <structure>
> <property name="position">1</property>
> <property name="name">PRG_ID</property>
> <property name="dataType">integer</property>
> </structure>
> <structure>
> <property name="position">2</property>
> <property name="name">PRG_STS_CD</property>
> <property name="dataType">string</property>
> </structure>
> <structure>
> <property name="position">3</property>
> <property name="name">PRG_TYPE_CD</property>
> <property name="dataType">string</property>
> </structure>
> </list-property>
> </structure>
> <property name="dataSource">MPMSDB</property>
> <list-property name="resultSet">
> <structure>
> <property name="position">1</property>
> <property name="name">PRG_ID</property>
> <property name="nativeName">PRG_ID</property>
> <property name="dataType">integer</property>
> <property name="nativeDataType">4</property>
> </structure>
> <structure>
> <property name="position">2</property>
> <property name="name">PRG_STS_CD</property>
> <property name="nativeName">PRG_STS_CD</property>
> <property name="dataType">string</property>
> <property name="nativeDataType">12</property>
> </structure>
> <structure>
> <property name="position">3</property>
> <property name="name">PRG_TYPE_CD</property>
> <property name="nativeName">PRG_TYPE_CD</property>
> <property name="dataType">string</property>
> <property name="nativeDataType">12</property>
> </structure>
> </list-property>
> <property name="queryText">select prg_id, prg_sts_cd, prg_type_cd
> from mpmsprod.t001program
> where prg_id = 316
>
>
> /* select ordernumber as prg_id, status as prg_sts_cd, status as
> prg_type_cd
> from orders
> order by ordernumber */</property>
> </oda-data-set>
> </data-sets>
> <styles>
> <style name="report" id="4">
> <property name="fontFamily">"Verdana"</property>
> <property name="fontSize">10pt</property>
> </style>
> <style name="crosstab" 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-cell" 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">
> <property name="topMargin">0.25in</property>
> <property name="leftMargin">0.25in</property>
> <property name="bottomMargin">0.25in</property>
> <property name="rightMargin">0.25in</property>
> <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="9">
> <property name="width">100%</property>
> <property name="dataSet">db2DataSet</property>
> <list-property name="visibility">
> <structure>
> <property name="format">all</property>
> <expression name="valueExpr">true</expression>
> </structure>
> </list-property>
> <list-property name="boundDataColumns">
> <structure>
> <property name="name">PRG_ID</property>
> <property name="displayName">PRG_ID</property>
> <expression name="expression">dataSetRow["PRG_ID"]</expression>
> <property name="dataType">integer</property>
> </structure>
> <structure>
> <property name="name">PRG_STS_CD</property>
> <property name="displayName">PRG_STS_CD</property>
> <expression name="expression">dataSetRow["PRG_STS_CD"]</expression>
> <property name="dataType">string</property>
> </structure>
> <structure>
> <property name="name">PRG_TYPE_CD</property>
> <property name="displayName">PRG_TYPE_CD</property>
> <expression name="expression">dataSetRow["PRG_TYPE_CD"]</expression >
> <property name="dataType">string</property>
> </structure>
> </list-property>
> <method name="onCreate"><![CDATA[/*var data={};
>
> data.prg_id = this.getRowData().getColumnValue("PRG_ID");
> data.prg_type_cd = this.getRowData().getColumnValue("PRG_TYPE_CD");
> data.prg_sts_cd = this.getRowData().getColumnValue("PRG_STS_CD");
> globalvarList.add(data);
> */]]></method>
> <column id="28">
> <property name="textAlign">center</property>
> </column>
> <column id="29">
> <property name="textAlign">center</property>
> </column>
> <column id="30">
> <property name="textAlign">center</property>
> </column>
> <header>
> <row id="10">
> <cell id="11">
> <label id="12">
> <text-property name="text">PRG_ID from db2DataSet</text-property>
> </label>
> </cell>
> <cell id="13">
> <label id="14">
> <text-property name="text">PRG_STS_CD from db2DataSet</text-property>
> </label>
> </cell>
> <cell id="15">
> <label id="16">
> <text-property name="text">PRG_TYPE_CD from db2DataSet</text-property>
> </label>
> </cell>
> </row>
> </header>
> <detail>
> <row id="17">
> <method name="onCreate"><![CDATA[var data={};
>
> //data.prg_id = row.PRG_ID;
> //data.prg_type_cd = row.PRG_TYPE_CD;
> //data.prg_sts_cd = row.PRG_STS_CD;
>
> data[0] = this.getRowData().getColumnValue("PRG_ID");
> data[1] = this.getRowData().getColumnValue("PRG_TYPE_CD");
> data[2] = this.getRowData().getColumnValue("PRG_STS_CD");
>
>
> globalvarList.add(data);
>
> importPackage( Packages.java.io );
> out = new PrintWriter( new FileWriter( "c:/birttest/events.txt", true ) );
> out.println( "oncreate event");
> out.close();
> ]]></method>
> <cell id="18">
> <data id="19">
> <property name="resultSetColumn">PRG_ID</property>
> </data>
> </cell>
> <cell id="20">
> <data id="21">
> <property name="resultSetColumn">PRG_STS_CD</property>
> </data>
> </cell>
> <cell id="22">
> <data id="23">
> <property name="resultSetColumn">PRG_TYPE_CD</property>
> </data>
> </cell>
> </row>
> </detail>
> <footer>
> <row id="24">
> <cell id="25"/>
> <cell id="26"/>
> <cell id="27"/>
> </row>
> </footer>
> </table>
> <table id="33">
> <property name="width">100%</property>
> <property name="dataSet">scriptedDataSet</property>
> <list-property name="boundDataColumns">
> <structure>
> <property name="name">PRG_ID</property>
> <property name="displayName">Program ID</property>
> <expression name="expression">dataSetRow["PRG_ID"]</expression>
> <property name="dataType">integer</property>
> </structure>
> <structure>
> <property name="name">PRG_TYPE_CD</property>
> <property name="displayName">Program Type</property>
> <expression name="expression">dataSetRow["PRG_TYPE_CD"]</expression >
> <property name="dataType">string</property>
> </structure>
> <structure>
> <property name="name">PRG_STS_CD</property>
> <property name="displayName">Program Status</property>
> <expression name="expression">dataSetRow["PRG_STS_CD"]</expression>
> <property name="dataType">string</property>
> </structure>
> <structure>
> <property name="name">programCount</property>
> <property name="displayName"># of Rows</property>
> <expression name="expression">dataSetRow["programCount"]</expression >
> <property name="dataType">integer</property>
> </structure>
> </list-property>
> <column id="52">
> <property name="textAlign">center</property>
> </column>
> <column id="53">
> <property name="textAlign">center</property>
> </column>
> <column id="54">
> <property name="textAlign">center</property>
> </column>
> <column id="58">
> <property name="textAlign">center</property>
> </column>
> <header>
> <row id="34">
> <cell id="35">
> <label id="36">
> <text-property name="text">Program ID</text-property>
> </label>
> </cell>
> <cell id="37">
> <label id="38">
> <text-property name="text">Program Type</text-property>
> </label>
> </cell>
> <cell id="39">
> <label id="40">
> <text-property name="text">Program Status</text-property>
> </label>
> </cell>
> <cell id="55">
> <label id="59">
> <text-property name="text"># of Rows</text-property>
> </label>
> </cell>
> </row>
> </header>
> <detail>
> <row id="41">
> <cell id="42">
> <data id="43">
> <property name="resultSetColumn">PRG_ID</property>
> </data>
> </cell>
> <cell id="44">
> <data id="45">
> <property name="resultSetColumn">PRG_TYPE_CD</property>
> </data>
> </cell>
> <cell id="46">
> <data id="47">
> <property name="resultSetColumn">PRG_STS_CD</property>
> </data>
> </cell>
> <cell id="56">
> <data id="60">
> <property name="resultSetColumn">programCount</property>
> </data>
> </cell>
> </row>
> </detail>
> <footer>
> <row id="48">
> <cell id="49"/>
> <cell id="50"/>
> <cell id="51"/>
> <cell id="57"/>
> </row>
> </footer>
> </table>
> <table id="62">
> <property name="width">100%</property>
> <property name="dataSet">db2DataSet1</property>
> <list-property name="boundDataColumns">
> <structure>
> <property name="name">PRG_ID</property>
> <property name="displayName">PRG_ID</property>
> <expression name="expression">dataSetRow["PRG_ID"]</expression>
> <property name="dataType">integer</property>
> </structure>
> <structure>
> <property name="name">PRG_STS_CD</property>
> <property name="displayName">PRG_STS_CD</property>
> <expression name="expression">dataSetRow["PRG_STS_CD"]</expression>
> <property name="dataType">string</property>
> </structure>
> <structure>
> <property name="name">PRG_TYPE_CD</property>
> <property name="displayName">PRG_TYPE_CD</property>
> <expression name="expression">dataSetRow["PRG_TYPE_CD"]</expression >
> <property name="dataType">string</property>
> </structure>
> </list-property>
> <column id="81">
> <property name="width">2.375in</property>
> </column>
> <column id="82"/>
> <column id="83"/>
> <header>
> <row id="63">
> <cell id="64">
> <label id="65">
> <property name="textAlign">center</property>
> <text-property name="text">PRG_ID_from_2nd_DB2_dataset</text-property>
> </label>
> </cell>
> <cell id="66">
> <label id="67">
> <property name="textAlign">center</property>
> <text-property name="text">PRG_STS_CD_from_2nd_DB2_dataset</text-property >
> </label>
> </cell>
> <cell id="68">
> <label id="69">
> <property name="textAlign">center</property>
> <text-property
> name="text">PRG_TYPE_CD_from_2nd_DB2_dataset</text-property >
> </label>
> </cell>
> </row>
> </header>
> <detail>
> <row id="70">
> <cell id="71">
> <data id="72">
> <property name="textAlign">center</property>
> <property name="resultSetColumn">PRG_ID</property>
> </data>
> </cell>
> <cell id="73">
> <data id="74">
> <property name="textAlign">center</property>
> <property name="resultSetColumn">PRG_STS_CD</property>
> </data>
> </cell>
> <cell id="75">
> <data id="76">
> <property name="textAlign">center</property>
> <property name="resultSetColumn">PRG_TYPE_CD</property>
> </data>
> </cell>
> </row>
> </detail>
> <footer>
> <row id="77">
> <cell id="78"/>
> <cell id="79"/>
> <cell id="80"/>
> </row>
> </footer>
> </table>
> </body>
> </report>
>
Re: Scripted dataset problem [message #644684 is a reply to message #644177] Mon, 13 December 2010 18:49 Go to previous message
Don Wood is currently offline Don WoodFriend
Messages: 32
Registered: February 2010
Location: Pennsylvania
Member
Jason,

Thanks for your help. Too bad that we couldn't figure out a work around. Anyway, I entered a bug. The link is below.

https://bugs.eclipse.org/bugs/show_bug.cgi?id=332462

https://bugs.eclipse.org/bugs/show_bug.cgi?id=332462

-Don
Previous Topic:Unable to build a dataset
Next Topic:Radar Chart doesn't work in Standalone Program
Goto Forum:
  


Current Time: Fri Nov 28 03:23:53 GMT 2014

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

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