Print Page | Close Window

Error A string is require here:

Printed From: Crystal Reports Book
Category: Crystal Reports 9 through 2020
Forum Name: Technical Questions
Forum Discription: Formulas, charting data, Crystal syntax, etc.
URL: http://www.crystalreportsbook.com/forum/forum_posts.asp?TID=22700
Printed Date: 06 May 2024 at 9:32am


Topic: Error A string is require here:
Posted By: lbuffett
Subject: Error A string is require here:
Date Posted: 15 Nov 2018 at 3:12am
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



Replies:
Posted By: DBlank
Date Posted: 15 Nov 2018 at 3:16am
if {columns.Procedure} IN ['33111','33115','33121','33125'] then 1 else 0


Posted By: lbuffett
Date Posted: 15 Nov 2018 at 3:49am
Thank you that fixed it.

Les



Print Page | Close Window