0

I'm a little confused with Crystal Reports [LIKE] pattern operator, compared to SQL's [IN] operator.

I have inherited maintenance of an old report that uses FORMULA FIELDS to qualify the data used in SELECTION FORMULAS > RECORD SELECTION.

One of the FORMULA FIELDS uses [LIKE] to limit the records returned.

EXAMPLE IN CRYSTAL:

IF {table.column} LIKE ["A","B","C"]

COMPARED TO SQL:

SELECT * FROM table WHERE col1 IN ("A","B","C")

I can't find documentation that uses LIKE in this way. Since I can't find supporting documentation for LIKE I question if this is the "best practice" for filtering content. Is there a better way?

Thanks,

-Allen

1 Answer 1

0

It is the correct way to use in crystal.... it will pick the values that satisfies the like operator... also you mentioned it in record selection formula so it will be directly included in where clause of the query generated in crystal

Edit----------------------------------------------------------------------------------------------

Use below link to know the documentation of the crystal reports.

Link

I have pasted for Like operator but if you want to see documentation for formulas or build different formulas you can use above link.

7
  • Thanks for the reply. Do you have a link to supporting documentation that shows this in use?
    – Allen May
    Jun 18, 2014 at 14:24
  • You can check my edit for the Like documentation and also Crystal documentation
    – Siva
    Jun 18, 2014 at 14:34
  • You can type Like in search to get the documentation and similarly for any search criteria
    – Siva
    Jun 18, 2014 at 14:38
  • Thanks for the link Siva. The IBM documentation link is the same as that Crystal Reports gives.
    – Allen May
    Jun 18, 2014 at 14:52
  • FROM THE IBM DOCUMENTATION SITE: Examples {customer.FIRST NAME} like "D?n" TRUE, where {customer.FIRST NAME} = Dan or Don. {customer.FIRST NAME} like "D?n" FALSE, where {customer.FIRST NAME} = Doug or Rob. {customer.LAST NAME} like "*s?n*" TRUE, where {customer.LAST NAME} = Johnson or Olson or Olsen. {customer.LAST NAME} like "*s?n*" FALSE, where {customer.LAST NAME} = Johnston or Smith.
    – Allen May
    Jun 18, 2014 at 14:53

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.