SQL in Pentaho throws error

SSuhaib

Member
Hi,
Pentaho Report Designer 3.9.0-GA 15557, Openedge 10.1C

The following query throws error (shown after query) :

select ptho_agtsals.agentid,
ptho_agtsals.agentname,
ptho_agtsals.grosssales,
ptho_agtsals.repyear,
ptho_agtsals..repmonth

where ptho_agtsals.repyear = ${syear} and ptho_agtsals.repmonth = ${smonth}

Both syear & smonth are defined as integer parameters and both DB fields repyear & repmonth are integer fields as well. If we replace with variable with 2012 & 08 as year & month respectively then query runs well.

The error is :

org.pentaho.reporting.engine.classic.core.ReportDataFactoryException: Failed at query:
select
Ptho_AgtSals.AgentID,
Ptho_AgtSals.Agentname,
Ptho_AgtSals.TotConfBk,
Ptho_AgtSals.TotCan,
Ptho_AgtSals.GrossPrice,
Ptho_AgtSals.RepYear
from pub.Ptho_AgtSals
where Ptho_AgtSals.RepYear = ${syear} and Ptho_AgtSls.RepMonth = ${smonth}
at org.pentaho.reporting.engine.classic.core.modules.misc.datafactory.sql.SimpleSQLReportDataFactory.queryData(SimpleSQLReportDataFactory.java:258)
at org.pentaho.reporting.engine.classic.core.modules.misc.datafactory.sql.SQLReportDataFactory.queryData(SQLReportDataFactory.java:171)
at org.pentaho.reporting.ui.datasources.jdbc.ui.JdbcPreviewWorker.run(JdbcPreviewWorker.java:103)
at java.lang.Thread.run(Unknown Source)
ParentException:
java.sql.SQLException: [DataDirect][ODBC Progress OpenEdge Wire Protocol driver]Inconsistent descriptor information.
at sun.jdbc.odbc.JdbcOdbc.createSQLException(Unknown Source)
at sun.jdbc.odbc.JdbcOdbc.standardError(Unknown Source)
at sun.jdbc.odbc.JdbcOdbc.SQLExecute(Unknown Source)
at sun.jdbc.odbc.JdbcOdbcPreparedStatement.execute(Unknown Source)
at sun.jdbc.odbc.JdbcOdbcPreparedStatement.executeQuery(Unknown Source)
at org.pentaho.reporting.engine.classic.core.modules.misc.datafactory.sql.SimpleSQLReportDataFactory.parametrizeAndQuery(SimpleSQLReportDataFactory.java:427)
at org.pentaho.reporting.engine.classic.core.modules.misc.datafactory.sql.SimpleSQLReportDataFactory.queryData(SimpleSQLReportDataFactory.java:254)
at org.pentaho.reporting.engine.classic.core.modules.misc.datafactory.sql.SQLReportDataFactory.queryData(SQLReportDataFactory.java:171)
at org.pentaho.reporting.ui.datasources.jdbc.ui.JdbcPreviewWorker.run(JdbcPreviewWorker.java:103)
at java.lang.Thread.run(Unknown Source).

Any help is highly appriciated.
SSuhaib
 
Top