Jump to content
Changes to the Jaspersoft community edition download ×

Passing a SQL-Statement via parameter ..


Recommended Posts

By: Andréorgenroth - jettschuff

Passing a SQL-Statement via parameter ..

2003-09-16 23:56

Hello,

 

my problem is, I have to pass the complete SQL-Statement to the report. I´ve made a parameter 'select'.

 

I have a variable which contains the SELECt.

String select = "SELECT * FROM MITARBEITER";

 

I made a map:

Map parameters = new HashMap();

parameters.put("select", select);

 

When I create the JasperPrint an error occure.

JasperPrint jasperPrint = JasperManager.fillReport(jasperReport, parameters, conn);

 

Exception: Error executing report query :

 

?

 

 

java.sql.SQLException: ORA-00900: invalid SQL statement

 

at oracle.jdbc.dbaccess.DBError.throwSqlException(DBError.java:168)

at oracle.jdbc.ttc7.TTIoer.processError(TTIoer.java:208)

at oracle.jdbc.ttc7.Oall7.receive(Oall7.java:543)

at oracle.jdbc.ttc7.TTC7Protocol.doOall7(TTC7Protocol.java:1405)

at oracle.jdbc.ttc7.TTC7Protocol.parseExecuteFetch(TTC7Protocol.java:822)

at oracle.jdbc.driver.OracleStatement.executeNonQuery(OracleStatement.java:1446)

at oracle.jdbc.driver.OracleStatement.doExecuteOther(OracleStatement.java:1371)

at oracle.jdbc.driver.OracleStatement.doExecuteWithTimeout(OracleStatement.java:1900)

at oracle.jdbc.driver.OraclePreparedStatement.executeUpdate(OraclePreparedStatement.java:363)

at oracle.jdbc.driver.OraclePreparedStatement.executeQuery(OraclePreparedStatement.java:314)

at dori.jasper.engine.util.JRQueryExecuter.executeQuery(JRQueryExecuter.java:375)

at dori.jasper.engine.util.JRQueryExecuter.executeQuery(JRQueryExecuter.java:142)

at dori.jasper.engine.fill.JRBaseFiller.fill(JRBaseFiller.java:423)

at dori.jasper.engine.fill.JRFiller.fillReport(JRFiller.java:119)

at dori.jasper.engine.JasperFillManager.fillReport(JasperFillManager.java:219)

at dori.jasper.engine.JasperManager.fillReport(JasperManager.java:738)

at de.coryx.apps.stunden.client.swing.ReportTest.<init>(ReportTest.java:49)

at de.coryx.apps.stunden.client.swing.ReportTest.main(ReportTest.java:107)

 

 

 

 

 

 

 

 

By: Andréorgenroth - jettschuff

RE: Passing a SQL-Statement via parameter ..

2003-09-17 00:04

I ´ve solved the problem.

Link to comment
Share on other sites

  • Replies 0
  • Created
  • Last Reply

Top Posters In This Topic

Popular Days

Top Posters In This Topic

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×
×
  • Create New...