Jump to content
Changes to the Jaspersoft community edition download ×

SQL Update Query


Recommended Posts

By: mike w - mwans

SQL Update Query

2003-08-08 12:01

Hello,

Here is my problem. I need to print all reports that have not been printed since the last time the report was run. So I added a field to my Oracle DB and called 'IS_PRINTED'. I set this field to FALSE by default and I want to set it to TRUE after the report has been run. This way I only print the reports that have IS_PRINTED = FALSE. So what I did was write a subreport whose only job is to call un an UPDATE query to set the values after my report is run.

 

But I get errors:

 

java.sql.SQLException: ORA-01009: missing mandatory parameter

 

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.fetch(TTC7Protocol.java:1198)

at oracle.jdbc.driver.OracleResultSetImpl.next(OracleResultSetImpl.java:276)

at dori.jasper.engine.JRResultSetDataSource.next(JRResultSetDataSource.java:112)

at dori.jasper.engine.fill.JRBaseFiller.next(JRBaseFiller.java:736)

at dori.jasper.engine.fill.JRVerticalFiller.fillReport(JRVerticalFiller.java:167)

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

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

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

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

 

NESTED BY :

dori.jasper.engine.JRException: Unable to get next record.

at dori.jasper.engine.JRResultSetDataSource.next(JRResultSetDataSource.java:116)

at dori.jasper.engine.fill.JRBaseFiller.next(JRBaseFiller.java:736)

at dori.jasper.engine.fill.JRVerticalFiller.fillReport(JRVerticalFiller.java:167)

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

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

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

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

Caused by: java.sql.SQLException: ORA-01009: missing mandatory parameter

 

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.fetch(TTC7Protocol.java:1198)

at oracle.jdbc.driver.OracleResultSetImpl.next(OracleResultSetImpl.java:276)

at dori.jasper.engine.JRResultSetDataSource.next(JRResultSetDataSource.java:112)

... 6 more

 

My statement works fine inside of TOAD. It is very simple:

"UPDATE LEOKA SET IS_PRINTED = 'TRUE'"

 

Can one perform UPDATE commands form Jasper? Is there a way around the error?

 

All help Appreciated,

Mike

 

 

 

 

By: David Hardwick - dhardwick

RE: SQL Update Query

2003-08-08 12:43

I would go with a scriptlet in this case that triggers at the end of the report.

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