[SOLVED] Cannot get the type for parameter: 1 [message #911933] |
Wed, 12 September 2012 15:59 |
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,) 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 <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,) 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,)</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,)</design:displayName>
</design:uiHints>
</design:attributes>
<design:usageHints>
<design:label>TRIM(SUBSTR(EVENTO.CLAVE,1,)</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,)</property>
<text-property name="displayName">TRIM(SUBSTR(EVENTO.CLAVE,1,)</text-property>
<expression name="expression" type="javascript">dataSetRow["TRIM(SUBSTR(EVENTO.CLAVE,1,)"]</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,)</text-property>
</label>
</cell>
</row>
</header>
<detail>
<row id="26">
<cell id="27">
<data id="28">
<property name="resultSetColumn">TRIM(SUBSTR(EVENTO.CLAVE,1,)</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
|
|
|
|
|
|
|
|
Powered by
FUDForum. Page generated in 0.03189 seconds