on 03-22-2012 3:11 PM
I am trying to get this to run in Crystal Reports 2008, but it is not liking the parameters. Any help would be greatly appeciated.
SELECT (lnme||', '||fname||' '||mname) AS Name
FROM humrec2.emprofile
WHERE ({?RTYPE} = 'BDAY' OR {?RTYPE} = 'HireDate')
Hi,
Shouldn't the where clause where a database field. Something like:
{database_field} = {?RTYPE} or {database_field} = {?RTYPE}
And then you pass 'BDAY' or 'HireDate' as values?
-Abhilash
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Normally yes, but I was trying to pass the parameters values in because no database field contains that data. i wanted to filter the data differently based on what was chosen. I decided to do it as a Report Selection in Crystal. I do have another question. I created a Command that pulls in data from Oracle. It contains 1 parameter. I would like this parameter to be multi-valued. But it is not working. Below is the query. I am trying to have the users put in values such as 1,2,3. That gives me an invalid number error. Any ideas? Thank you very much.
SELECT (lname||', '||fname||' '||mname) AS Name
,TO_CHAR(corp) AS CORP
,TO_CHAR(center) AS CENTER
,TO_CHAR(dob,'MM-DD') AS DOB
,ACCT_UNIT_LAWSON
FROM humrec2.emprofile
WHERE corp='10'
AND empstatus = '1'
AND year = TO_CHAR(sysdate,'yyyy')
AND (INSTR(','||{?ACCTUNIT}||',', ','||ACCT_UNIT_LAWSON||',') > 0)
User | Count |
---|---|
89 | |
10 | |
10 | |
10 | |
7 | |
6 | |
6 | |
5 | |
4 | |
3 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.