2006 IR Open Dicussion Posted September 5, 2006 Share Posted September 5, 2006 By: Paolo - margamopa Two way to use parameters 2006-04-05 00:06 Hello, I'm using IReport to create a simple report with a parameterized SQL query. I know that it is possible use parameters in report in this way: select name, author from book $P!{ParAuth} where the parameter ParAuth has "" as default value, and in a java program I pass the parameter in this way: HashMap parameters = new HashMap(); parameters.put("ParAuth"," where author='Dante'"); JasperFillManager.fillReportToFile("report.jasper",parameters,connection); In this way it is ok, but how can I use parameter in form $P{ParAuth} (without '!' ) ? If I use the query select name, author from book where author=$P{ParAuth} with default value "Dante" i have the result "The document has no page". Thanks in advance. 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