# 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 ???
LVL 1
###### Who is Participating?

Commented:
They are global by default.

May need to add this as the first line of the formulas.
WhilePrintingRecords;

mlmcc
0

Author Commented:
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
0

Commented:
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
0

Author Commented:
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?
0

Commented:
This question has been classified as abandoned and is closed as part of the Cleanup Program. See the recommendation for more details.
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.