cancel
Showing results for 
Search instead for 
Did you mean: 

Crystal Reports Statement Ignored

Former Member
0 Kudos

Can someone explain to me why there are records on my Crystal Reports that have values that are equal to "Cash" (in data column "") although my logic (Line #4) is suppose to exclude all records with "Cash" for the "" data column ? Thanks ! ! !

1) in {?RWDate}

2) And Not( in ["5021", "5022", "5023", "5024",

3) "5025", "5026", "5027", "5028", "5029", "5030", "5031", "5032"]

4) And <> "Cash")

5) And ((Not( Like 'TBD' 6) And ( = 5 Or = 8))) 7) And Not( Like 'Approval'))

Edited by: Lenell Hooker on Mar 5, 2010 6:52 PM

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Lennell,

It looks to me like you are selecting the records where the value is 'cash' rather than filtering them out..... are you sure you didn't scroll down one selection parameter too far (or not far enough) in the list?

Micah

Former Member
0 Kudos

Micah,

There is a "not equal sign" in the statement. I edited this posted, but for reason you got the initial post. The statement read as follows:

And not equal "Cash")

Former Member
0 Kudos

Any idea why line #4 is ignored ?

1) in {?RWDate}

2) And Not( in ["5021", "5022", "5023", "5024",

3) "5025", "5026", "5027", "5028", "5029", "5030", "5031", "5032"]

4) And not equal "Cash") ====> not equal sign not showing in the post . . . it's in the code

5) And ((Not( Like 'TBD' 6) And ( = 5 Or = 8))) 7) And Not( Like 'Approval'))

Former Member
0 Kudos

Two things:

If either or are NULL, Crystal will stop evaluating the formula, and records with Cash will be displayed.

In order to show &lt;&gt;, type "&lt ;" an"&gt ;" (without the quotes or space before the semicolon).

HTH,

Carl

Former Member
0 Kudos

Also, if the text is not exact, it will not evalute the expression to true.

Fuskie

Who thinks if you cannot guarantee that the text is stored as "Cash" then you can alter it by using trim(ucase(field))...

Former Member
0 Kudos

Good point, Fuskie... Also is the ID a number or string? Perhaps Crystal is doing an implicit type conversion from number to string and is appending ".00" (which it likes to do), which would make the strings different... (If this is the problem, remove the quotes from the array values...)

HTH,

Carl

Former Member
0 Kudos

Carl,

The ID is a string . . . I'm currently getting records. It just that I'm getting records that have "Cash" and it should not retrieve any records with "Cash".

Former Member
0 Kudos

Fuskie,

The column shows "Cash". I tried trim(ucase(field)), this did not work. Please adise further. Thanks ! ! !

former_member260594
Active Contributor
0 Kudos

As a quick test can you create a formula with the following;

not equal to "Cash"

Does it return true or false for the records showing Cash?

Former Member
0 Kudos

Micah/Carl/Fuskie/Graham,

I got it . . . I used trim(ucase(field)) and removed ")" from the fourth (4th) line

and placed it on the third (3rd) line as shown below. Thanks to all ! ! !

StringVar strRef_Purpose;

strRef_Purpose := ;

strRef_Purpose := Trim((ucase(strRef_Purpose)));

1) in {?RWDate}

2) And Not( in ["5021", "5022", "5023", "5024",

3) "5025", "5026", "5027", "5028", "5029", "5030", "5031", "5032"] )

4) And strRef_Purpose "&lt;" and "&gt;" "Cash"

5) And ((Not( Like 'TBD' 6) And ( = 5 Or = 8))) 7) And Not( Like 'Approval'))

Answers (0)