cancel
Showing results for 
Search instead for 
Did you mean: 

Error with Parameters

Former Member
0 Kudos

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')

Accepted Solutions (1)

Accepted Solutions (1)

abhilash_kumar
Active Contributor
0 Kudos

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

Former Member
0 Kudos

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)

0 Kudos

Hello,

Please keep one question per post, makes it easier for others to find a quick solution.

Thanks

Don

Answers (0)