Skip to Content
avatar image
Former Member

Record selection formula in sql command in Crystal report

Dear all,

I have some filter query  to pass as record selection formula in crystal report. I am having some problems with below sql command .

in some of filter im getting errors.

Kindly help me ..

1. ({AddDedTypeRights.AdddedType} Like 'SYS[_]%%' Or  {AddDedTypeRights.AdddedType} Like 'SYSL[_]%%' )

this is a part of record selection formula filter..  Is this ok? (correct in syntax?)

2. {AdddedTran.EmpID} Not In [Select {FinMast.EmpID} From FinMast With (NOLOCK) Where {FinMast.Status} = 35]

Its wrong..  tell me the proper way..

3. ({LeaveTran.SalaryStatus} & 8) = 8)

how to make this correct.....?

kindly reply me please

Add comment
10|10000 characters needed characters exceeded

  • Get RSS Feed

1 Answer

  • Best Answer
    Nov 03, 2015 at 11:00 AM

    Hi Denson,

    1) This should be:

    ({AddDedTypeRights.AdddedType} Like ['SYS[_]*', 'SYSL[_]*' )

    2) You cannot pass a 'select' clause inside a record selection formula

    3) Not sure what you're trying to do here


    Add comment
    10|10000 characters needed characters exceeded

    • You should avoid any kind of date transformations in the record selection as they're usually not translated to the where clause.

      The formula would still be:

      Month(DateAdd(dd,{LeaveTran.TotalDays},{Leaving.ActStartDt})) =  {m_RepDate.Month}