Jump to content
JasperReports Library 7.0 is now available ×

Error: bind variable does not exist


2004 IR Help

Recommended Posts

By: Shiva - shivatpt

Error: bind variable does not exist

2004-04-24 02:13

Hello,

 

I am a newbie to Ireport. I am trying to design a subreport and I get an error (pasting the compilation error below)

 

This is my scenario.

I have a master report wherein I pass EmpID as parameter to my child report. My master report query is "select * from Employee".

 

In my childreport I accept the parameter and say "select * from EmpAddress where EmpID = '$P{EmpID}'

 

My childreport compiles good. When I try to run my master report it says the following error:

 

Can anyone help me out to resolve this?

 

Thanks,

Shiva

---------------------------------------------

java.sql.SQLException: ORA-01006: bind variable does not exist

 

 

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

 

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

 

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

 

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

 

at oracle.jdbc.ttc7.TTC7Protocol.parseExecuteDescribe(TTC7Protocol.java:830)

 

at oracle.jdbc.driver.OracleStatement.doExecuteQuery(OracleStatement.java:2391)

 

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

 

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

 

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

 

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:395)

 

at dori.jasper.engine.fill.JRFillSubreport.run(JRFillSubreport.java:391)

 

at java.lang.Thread.run(Thread.java:536)

 

 

NESTED BY :

 

dori.jasper.engine.JRException: Error executing report query :

 

SELECT ISACTIVE, WFS_HEADER_ID, WFS_LINE_ID FROM WFS_DETAILS WHERE ISACTIVE ='?'

 

 

 

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

 

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

 

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

 

at dori.jasper.engine.fill.JRFillSubreport.run(JRFillSubreport.java:391)

 

at java.lang.Thread.run(Thread.java:536)

 

Caused by: java.sql.SQLException: ORA-01006: bind variable does not exist

 

 

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

 

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

 

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

 

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

 

at oracle.jdbc.ttc7.TTC7Protocol.parseExecuteDescribe(TTC7Protocol.java:830)

 

at oracle.jdbc.driver.OracleStatement.doExecuteQuery(OracleStatement.java:2391)

 

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

 

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

 

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

 

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

 

... 4 more

 

Abnormal termination!

--------------------------------------

 

 

 

 

By: Shiva - shivatpt

RE: Error: bind variable does not exist

2004-04-26 01:14

Hello All,

 

I got it working.

 

Thanks.

Shiva

Link to comment
Share on other sites

  • 2 months later...
  • Replies 2
  • Created
  • Last Reply

Top Posters In This Topic

Top Posters In This Topic

I've solved my problem already. The Report query that intakes SQL queries is set such that even the

 

- Date parameters are first saved as "String" first, then when i use it as a parameter in the sql,

 

- i used TO_DATE($P{inputDate},'yyyy/MM/dd')

 

- and normal String parameters directly as $P{inputString}. Hope it helps. ^^

Link to comment
Share on other sites

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...