Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Using case function with ranges

Status
Not open for further replies.

ramc2000

Technical User
Nov 8, 2002
60
GT
Does anyone know how to use ranges when using the case function in Crystal 8. I can use the case function when I compare {field} to a specific value or if I want to test if {field} is just less than value or greater than value:

select {field}
case is > value:
"something"
case value:
"something else"

but what if what I want to do is to test if {field} is less than value1 AND greater than value2???

Thanks in advance for your replies.
 
Thank you. The help file in Crystal does not show that many samples when explaining the case function. You were a great help.

 
synapsevampire: the advice you gave me is working fine, there's still a little detail that needs to be worked out tough. I'm using a date value as follows:

case #2002/06/30# to #2002/07/27#:
"July02Retail"

but I'm having problems when {field}=#2002/07/27# in this case, CR does not seem to include the upper limit of my date range. Am i still missing something here? thank you.
 
That was it!! I changed the field to a date value using a formula, that got rid of the problem. Thank you.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top