Error A string is require here:

Printed From: Crystal Reports Book — Forum Name: Technical Questions

Hello

I am trying to write a formula that will give a value of 1 for every time a code: For example [33111, 33115, 33121, 33125] is entered. The formula I am using below gives the following error:

A string is required here:


Code: if {columns.Procedure} = [33111, 33115, 33121, 33125] then
1
else 0;

Procedure is listed as Char(7) in the database.

Any ideas?

Les
if {columns.Procedure} IN ['33111','33115','33121','33125'] then 1 else 0
Thank you that fixed it.

Les