Crystal Reports for Eclipse Designer Guide

In Range operator

Usage
x in y
Tests a range of value (y) to see if a value (x) falls within the range specified.
Examples
CurrentDate in CDate(1990, 09, 01) to CDate(1990, 09, 20)
Returns True, if today's date is September 15, 1990.
CurrentDate in CDate(1990, 09, 01) to CDate(1990, 09, 20)
Returns False, if today's date is September 21, 1990.
{file.QTY} in {file.ONHAND} to ({file.BACKORDER} + {file.ONORDER})
Returns True, where {file.QTY} = 20, {file.ONHAND} = 10, {file.BACKORDER} = 5, {file.ONORDER} = 25 (Is 20 in the range that begins with 10 and ends with the sum of 5 and 25?).
{file.QTY} in {file.ONHAND} to ({file.BACKORDER} + {file.ONORDER})
Returns False, where {file.QTY} = 31, {file.ONHAND} = 10, {file.BACKORDER} = 5, {file.ONORDER} = 25 (Is 31 in the range that begins with 10 and ends with the sum of 5 and 25?).
Comments
The combination of Make Range operator (x To y) and In Range operators is often used with the If-Then-Else operator. For example the Crystal syntax formula:
If ({file.AMOUNT} in (100.00 to 250.00)) Then
     (.10 * {file.AMOUNT})
Else
     0; 
If the value of {file.AMOUNT} falls within the range 100.00 to 250.00, multiply .10 times {file.AMOUNT}. If it does not, it returns zero.



SAP BusinessObjects
http://www.sap.com/sapbusinessobjects/
Support services
http://service.sap.com/bosap-support/
Product Documentation on the Web
http://help.sap.com/