Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » BIRT » [SOLVED] Cannot get the type for parameter: 1(Error in Data Sets)
[SOLVED] Cannot get the type for parameter: 1 [message #911933] Wed, 12 September 2012 15:59 Go to next message
Blaine Mising name is currently offline Blaine Mising name
Messages: 25
Registered: December 2010
Junior Member
I'm doing a test report. My report connects to an Oracle database. The connection works fine, because It can show tables in DATASET configuration.

I create a parameter "MYParameter1". This parameter is a Text Box and String as Data Type.

I created a Dataset called DATASET1 with this query: select TRIM(SUBSTR(EVENTO.CLAVE,1,Cool) from evento where evento.clave=?

I configured de DATASET1 with a parameter associated to MYParameter1.

When I modify de DATASET1 or preview/run the report after introduce the parameter this error appears:

An exception occurred during processing. Please see the following message for details:
Failed to prepare the query execution for the data set: DATASET1
Cannot get the type for parameter: 1.
org.eclipse.birt.report.data.oda.jdbc.JDBCException: Cannot get parameter type.


What am I doing wrong?

This is the report xml source:

<?xml version="1.0" encoding="UTF-8"?>
<report xmlns="http://www.eclipse.org/birt/2005/design" version="3.2.23" id="1">
<property name="createdBy">Eclipse BIRT Designer Version 4.2.0.v20120611 Build &lt;4.2.0.v20120612-1721></property>
<property name="units">in</property>
<property name="iconFile">/templates/blank_report.gif</property>
<property name="bidiLayoutOrientation">ltr</property>
<property name="imageDPI">96</property>
<parameters>
<scalar-parameter name="MYParameter1" id="8">
<property name="valueType">static</property>
<property name="dataType">string</property>
<property name="distinct">true</property>
<list-property name="selectionList"/>
<property name="paramType">simple</property>
<property name="controlType">text-box</property>
<structure name="format">
<property name="category">Unformatted</property>
</structure>
</scalar-parameter>
</parameters>
<data-sources>
<oda-data-source extensionID="org.eclipse.birt.report.data.oda.jdbc" name="Data Source" id="7">
<list-property name="privateDriverProperties">
<ex-property>
<name>metadataBidiFormatStr</name>
<value>ILYNN</value>
</ex-property>
<ex-property>
<name>disabledMetadataBidiFormatStr</name>
</ex-property>
<ex-property>
<name>contentBidiFormatStr</name>
<value>ILYNN</value>
</ex-property>
<ex-property>
<name>disabledContentBidiFormatStr</name>
</ex-property>
</list-property>
<property name="odaDriverClass">oracle.jdbc.OracleDriver</property>
<property name="odaURL">jdbc:oracle:thin:@192.168.200.130:1521:test</property>
<property name="odaUser">testing</property>
<encrypted-property name="odaPassword" encryptionID="base64">ZXNpcA==</encrypted-property>
</oda-data-source>
</data-sources>
<data-sets>
<oda-data-set extensionID="org.eclipse.birt.report.data.oda.jdbc.JdbcSelectDataSet" name="DATASET1" id="10">
<property name="nullsOrdering">nulls lowest</property>
<list-property name="parameters">
<structure>
<property name="name">param_1</property>
<property name="paramName">MYParameter1</property>
<property name="dataType">string</property>
<property name="position">1</property>
<property name="isInput">true</property>
<property name="isOutput">false</property>
</structure>
</list-property>
<structure name="cachedMetaData"/>
<property name="dataSource">Data Source</property>
<xml-property name="queryText"><![CDATA[select TRIM(SUBSTR(EVENTO.CLAVE,1,Cool) from evento where EVENTO.CLAVE=?]]></xml-property>
<xml-property name="designerValues"><![CDATA[<?xml version="1.0" encoding="UTF-8"?>
<model:DesignValues xmlns:design="http://www.eclipse.org/datatools/connectivity/oda/design" xmlns:model="http://www.eclipse.org/birt/report/model/adapter/odaModel">
<Version>2.0</Version>
<design:ResultSets derivedMetaData="true">
<design:resultSetDefinitions>
<design:resultSetColumns>
<design:resultColumnDefinitions>
<design:attributes>
<design:identifier>
<design:name>TRIM(SUBSTR(EVENTO.CLAVE,1,Cool)</design:name>
<design:position>1</design:position>
</design:identifier>
<design:nativeDataTypeCode>12</design:nativeDataTypeCode>
<design:precision>8</design:precision>
<design:scale>0</design:scale>
<design:nullability>Nullable</design:nullability>
<design:uiHints>
<design:displayName>TRIM(SUBSTR(EVENTO.CLAVE,1,Cool)</design:displayName>
</design:uiHints>
</design:attributes>
<design:usageHints>
<design:label>TRIM(SUBSTR(EVENTO.CLAVE,1,Cool)</design:label>
<design:formattingHints>
<design:displaySize>8</design:displaySize>
</design:formattingHints>
</design:usageHints>
</design:resultColumnDefinitions>
</design:resultSetColumns>
<design:criteria/>
</design:resultSetDefinitions>
</design:ResultSets>
</model:DesignValues>]]></xml-property>
</oda-data-set>
</data-sets>
<styles>
<style name="report" id="4">
<property name="fontFamily">sans-serif</property>
<property name="fontSize">10pt</property>
</style>
<style name="crosstab-cell" id="5">
<property name="borderBottomColor">#CCCCCC</property>
<property name="borderBottomStyle">solid</property>
<property name="borderBottomWidth">1pt</property>
<property name="borderLeftColor">#CCCCCC</property>
<property name="borderLeftStyle">solid</property>
<property name="borderLeftWidth">1pt</property>
<property name="borderRightColor">#CCCCCC</property>
<property name="borderRightStyle">solid</property>
<property name="borderRightWidth">1pt</property>
<property name="borderTopColor">#CCCCCC</property>
<property name="borderTopStyle">solid</property>
<property name="borderTopWidth">1pt</property>
</style>
<style name="crosstab" id="6">
<property name="borderBottomColor">#CCCCCC</property>
<property name="borderBottomStyle">solid</property>
<property name="borderBottomWidth">1pt</property>
<property name="borderLeftColor">#CCCCCC</property>
<property name="borderLeftStyle">solid</property>
<property name="borderLeftWidth">1pt</property>
<property name="borderRightColor">#CCCCCC</property>
<property name="borderRightStyle">solid</property>
<property name="borderRightWidth">1pt</property>
<property name="borderTopColor">#CCCCCC</property>
<property name="borderTopStyle">solid</property>
<property name="borderTopWidth">1pt</property>
</style>
</styles>
<page-setup>
<simple-master-page name="Simple MasterPage" id="2">
<page-footer>
<text id="3">
<property name="contentType">html</property>
<text-property name="content"><![CDATA[<value-of>new Date()</value-of>]]></text-property>
</text>
</page-footer>
</simple-master-page>
</page-setup>
<body>
<data id="21">
<list-property name="boundDataColumns">
<structure>
<property name="name">MYParameter1</property>
<expression name="expression" type="javascript">params["MYParameter1"]</expression>
<property name="dataType">string</property>
</structure>
</list-property>
<property name="resultSetColumn">MYParameter1</property>
</data>
<table id="22">
<property name="dataSet">DATASET1</property>
<list-property name="boundDataColumns">
<structure>
<property name="name">TRIM(SUBSTR(EVENTO.CLAVE,1,Cool)</property>
<text-property name="displayName">TRIM(SUBSTR(EVENTO.CLAVE,1,Cool)</text-property>
<expression name="expression" type="javascript">dataSetRow["TRIM(SUBSTR(EVENTO.CLAVE,1,Cool)"]</expression>
<property name="dataType">string</property>
</structure>
</list-property>
<column id="31"/>
<header>
<row id="23">
<cell id="24">
<label id="25">
<text-property name="text">TRIM(SUBSTR(EVENTO.CLAVE,1,Cool)</text-property>
</label>
</cell>
</row>
</header>
<detail>
<row id="26">
<cell id="27">
<data id="28">
<property name="resultSetColumn">TRIM(SUBSTR(EVENTO.CLAVE,1,Cool)</property>
</data>
</cell>
</row>
</detail>
<footer>
<row id="29">
<cell id="30"/>
</row>
</footer>
</table>
</body>
</report>








[Updated on: Fri, 21 September 2012 09:29]

Report message to a moderator

Re: Cannot get the type for parameter: 1 [message #912513 is a reply to message #911933] Thu, 13 September 2012 17:33 Go to previous messageGo to next message
Jason Weathersby is currently offline Jason Weathersby
Messages: 9167
Registered: July 2009
Senior Member

If you query does not contain a where clause does it execute correctly?

Jason
Re: Cannot get the type for parameter: 1 [message #916129 is a reply to message #912513] Tue, 18 September 2012 15:32 Go to previous messageGo to next message
Blaine Mising name is currently offline Blaine Mising name
Messages: 25
Registered: December 2010
Junior Member
Yes, if the query doesn't contain parameters works fine.

I saw that there is a post in this forum with the same problem.
The problem is that birt 4.2.0 has a bug with Oracle11 JDBC Driver.
The bug will be solved in birt 4.2.1
I used an older vesionon of the oracle jdbc driver and now it works fine.


Re: Cannot get the type for parameter: 1 [message #916174 is a reply to message #916129] Tue, 18 September 2012 16:49 Go to previous messageGo to next message
Jason Weathersby is currently offline Jason Weathersby
Messages: 9167
Registered: July 2009
Senior Member

thanks for posting your solution.

Jason
Re: Cannot get the type for parameter: 1 [message #975482 is a reply to message #916129] Wed, 07 November 2012 22:46 Go to previous message
Luigi De Pizzol is currently offline Luigi De Pizzol
Messages: 1
Registered: November 2012
Junior Member
Hi,
I'm using birt 4.2.1 on ubuntu 1204 and I get the error
when set query parameters. I tried with ojdbc6 and ojdbc14_10g
but I get the same exception.

Can you tell me the specific your ojdbc driver?

Many thanks

Luigi
Previous Topic:specify position of dataEntry in radarchart
Next Topic:Page Size ignored when exporting to PDF
Goto Forum:
  


Current Time: Mon Sep 15 04:06:53 GMT 2014

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

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