dizou Posted February 18, 2013 Share Posted February 18, 2013 I am using iReport 5.0.1. I created a date parameter and am using it in my query:When I preview the report, I enter my date parameter:After I enter all the parameters and run the report, I get this error:Error filling print... Error executing SQL statement for : Sample net.sf.jasperreports.engine.JRException: Error executing SQL statement for : Sample at com.jaspersoft.jrx.query.PlSqlQueryExecuter.createDatasource(PlSqlQueryExecuter.java:143) at net.sf.jasperreports.engine.fill.JRFillDataset.createQueryDatasource(JRFillDataset.java:1086) at net.sf.jasperreports.engine.fill.JRFillDataset.initDatasource(JRFillDataset.java:667) at net.sf.jasperreports.engine.fill.JRBaseFiller.setParameters(JRBaseFiller.java:1258) at net.sf.jasperreports.engine.fill.JRBaseFiller.fill(JRBaseFiller.java:877) at net.sf.jasperreports.engine.fill.JRBaseFiller.fill(JRBaseFiller.java:822) at net.sf.jasperreports.engine.fill.JRFiller.fill(JRFiller.java:61) at net.sf.jasperreports.engine.JasperFillManager.fill(JasperFillManager.java:446) at net.sf.jasperreports.engine.JasperFillManager.fill(JasperFillManager.java:276) at net.sf.jasperreports.engine.JasperFillManager.fillReport(JasperFillManager.java:745) at com.jaspersoft.ireport.designer.compiler.IReportCompiler.run(IReportCompiler.java:891) at org.openide.util.RequestProcessor$Task.run(RequestProcessor.java:572) at org.openide.util.RequestProcessor$Processor.run(RequestProcessor.java:997) Caused by: org.postgresql.util.PSQLException: ERROR: syntax error at or near "Feb" at org.postgresql.core.v3.QueryExecutorImpl.receiveErrorResponse(QueryExecutorImpl.java:1592) at org.postgresql.core.v3.QueryExecutorImpl.processResults(QueryExecutorImpl.java:1327) at org.postgresql.core.v3.QueryExecutorImpl.execute(QueryExecutorImpl.java:192) at org.postgresql.jdbc2.AbstractJdbc2Statement.execute(AbstractJdbc2Statement.java:451) at org.postgresql.jdbc2.AbstractJdbc2Statement.executeWithFlags(AbstractJdbc2Statement.java:350) at org.postgresql.jdbc2.AbstractJdbc2Statement.executeQuery(AbstractJdbc2Statement.java:254) at com.jaspersoft.jrx.query.PlSqlQueryExecuter.createDatasource(PlSqlQueryExecuter.java:136) ... 12 more Print not filled. Try to use an EmptyDataSource...What is going on here, and how do I fix this? Thanks! Edit:I figured it out. I had to change the $P!{start_date} to $P{start_date} Link to comment Share on other sites More sharing options...
88.srivatsan Posted February 19, 2013 Share Posted February 19, 2013 Was it working on query window with default values ? Did you check the date format of you DB. Change the date format of Ireport in Tools->options->ireport->compilation and execution-->parameter prompt --> date format. Link to comment Share on other sites More sharing options...
88.srivatsan Posted February 19, 2013 Share Posted February 19, 2013 Was it working on query window with default values ? Did you check the date format of you DB. Change the date format of Ireport in Tools->options->ireport->compilation and execution-->parameter prompt --> date format. Link to comment Share on other sites More sharing options...
dizou Posted February 19, 2013 Author Share Posted February 19, 2013 I figured it out, see my edit. Link to comment Share on other sites More sharing options...
Solution mgeise Posted February 19, 2013 Solution Share Posted February 19, 2013 Posting solution as an answer:"I figured it out. I had to change the $P!{start_date} to $P{start_date}" Link to comment Share on other sites More sharing options...
dizou Posted February 19, 2013 Author Share Posted February 19, 2013 Thanks! Link to comment Share on other sites More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now