Link to home
Start Free TrialLog in
Avatar of imonfireDAMMIT
imonfireDAMMITFlag for United States of America

asked on

Crystal Reports Select Case using Relational Operators

I never had to do this before in Crystal but figured it couldn't be too difficult. I need to write a select case statement that is using relational operators. A piece of my Select case looks like this...

Dim K
Dim M

Select Case {@CDOF}
Case (0 < {@CDOF} < 0.25)
     If (.5 < {#PDOF})OR ({#PDOF} <= .81) Then
        K = 5.495
        M = -1.115
     End If
Case (0.25 < {@CDOF} < 0.50)
     If (.5 < {#PDOF})OR ({#PDOF} <= .81) Then
        K = 5.495
        M = -1.115
     End If
.
.
.

End Select

So pretty much depending on the value of the formula @CDOF, an if statement is executed and the K and M values are filled in...Is this even possible what I am trying to do ???
Avatar of imonfireDAMMIT
imonfireDAMMIT
Flag of United States of America image

ASKER

OK I changed this to :

Select Case {@CDOF}
Case 0 To_ 0.25
     If (.5 < {#PDOF})OR ({#PDOF} <= .81) Then
        K = 5.495
        M = -1.115
     End If
Case 0.25 _To_ .50
     If (.5 < {#PDOF})OR ({#PDOF} <= .81) Then
        K = 5.495
        M = -1.115
     End If

I don't see how to return multiple variables......things that make me go hmmmmmmmmmmmmmmmmmmmm
Avatar of Mike McCracken
Mike McCracken

What are you trying to do?

A formula can only return 1 value but you can set the values of several variable and then use them in other formulas.

mlmcc
i wanted to set the value of K and M in this formula and use them in other formulas. Couldn't I do this if K and M are global?
ASKER CERTIFIED SOLUTION
Avatar of Mike McCracken
Mike McCracken

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
This question has been classified as abandoned and is closed as part of the Cleanup Program. See the recommendation for more details.