2006 IR Open Dicussion Posted September 5, 2006 Share Posted September 5, 2006 By: laz - lazzeronis query dynamic. is it possible? 2006-07-04 00:25 hello I seek has to provide has my report his query while passing it by parameter because this query is dynamic. how can one make? By: David Karnowski - karnowski RE: query dynamic. is it possible? 2006-07-06 09:16 Yes, you'll have to use the "!" in the parameters of your query for the dynamic sections. For example: select * from $P!{tableName} where $P!{columnName} = $P{columnValue} order by $P!{orderBy} Link to comment Share on other sites More sharing options...
cxtapt Posted September 30, 2006 Share Posted September 30, 2006 I think it impossible. I can not passed values for parameter in query.Ex:Report query: SELECT *FROM EmployeeWHERE EmpName = $P!{P_ID} P_ID data type: String And the trouble with me: How can I passing values to P_ID parameter from java alpplication ??? ex: P_ID = '6' ==> passing how? I want to result: SELECT *FROM EmployeeWHERE EmpName = '6' EMAIL: cxtapt@yahoo.co.ukPost edited by: cxtapt, at: 2006/09/30 03:42 Link to comment Share on other sites More sharing options...
wesleywj2 Posted October 3, 2006 Share Posted October 3, 2006 as posted by David Karnowski, that method can actually work but your problems seems to be on the java application side where you're unsure how to pass the parameter. to pass parameter from java app into jasper/ireport, pass it as hashmap. define a key say "P_ID", and pass the whole intended parameter required; (in your case the string). From iReport retrieve it using the "P_ID" key, cast it as String object and concatenate it into your query. 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