2001 JI Open Discussion Posted August 13, 2006 Share Posted August 13, 2006 By: yelena - yelena13 Passing in parameters 2001-12-07 17:06Hello, Teodord, Believe it or not I got another question. :-) I want to pass in variable parameters into the query string. Is it possible? By: Eric Chan - ericchan001 RE: Passing in parameters 2001-12-07 23:14Hi, The sample report passes one parameter into the report that is embedded in the SQL string. Its value is set by the JasperReportTestApp.java. In an interactive environment, you will need a UI dialog that accepts the parameter and set it using the API. HTH -- Eric By: yelena - yelena13 RE: Passing in parameters 2001-12-10 10:08I was talking about passing values in sql. For example, select name, address from persons where age <= iAge (iAge is the parameter I would pass in thru JasperReportTestApp.java) By: Eric Chan - ericchan001 RE: Passing in parameters 2001-12-10 14:05The parameter is MaxOrderID in the sample report. It does exactly what you want. HTH -- Eric By: Watier - rwatier RE: Passing in parameters 2002-01-30 00:56Ok for that, but I think that parameters are only supported to replace in the WHERE CLAUSE. If I want to replace the table name or the full sql string by parameters, it is not possible because the system replace the parameters by '?' in the PreparedStatement Query, ... Isn't it ? By: Teodor Danciu - teodord RE: Passing in parameters 2002-01-30 01:03 Hi, It is true that parameters are used in the query just like they would be in a PreparedStatement. If you want to further customize the query, you can always retrieve your ResultSet outside JasperReports and supply it to the report-filling engine by wrapping it in a JRResultSetDataSource object. Good luck! Teodor 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