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}
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}
2 Answers:
Posted on September 30, 2006 at 3:30am
I think it impossible.
I can not passed values for parameter in query.
Ex:
Report query:
SELECT *
FROM Employee
WHERE
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 Employee
WHERE
EmpName = '6'
EMAIL: cxtapt@yahoo.co.uk
Post edited by: cxtapt, at: 2006/09/30 03:42
I can not passed values for parameter in query.
Ex:
Report query:
SELECT *
FROM Employee
WHERE
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 Employee
WHERE
EmpName = '6'
EMAIL: cxtapt@yahoo.co.uk
Post edited by: cxtapt, at: 2006/09/30 03:42
Posted on October 3, 2006 at 10:24am
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.