• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 826
  • Last Modified:

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 ???
0
imonfireDAMMIT
Asked:
imonfireDAMMIT
  • 3
  • 2
1 Solution
 
imonfireDAMMITAuthor 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
 
mlmccCommented:
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
 
imonfireDAMMITAuthor 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
 
mlmccCommented:
They are global by default.

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

mlmcc
0
 
mlmccCommented:
This question has been classified as abandoned and is closed as part of the Cleanup Program. See the recommendation for more details.
0

Featured Post

Receive 1:1 tech help

Solve your biggest tech problems alongside global tech experts with 1:1 help.

  • 3
  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now