I have to design a crystal report in which I have to retrieve values from a particular field in a database. But this field has many entries that follow increase numerically i.e., 1 to 10000, then 10000 to 20000, 20000 to 30000 etc..

Now I want to group them in a way that 1 to 10000 are in one group, 10000 to 15000 in another and 15000 to 20000 in another. How do I do that? I will be grateful for a response.
['https://Stackoverflow.com/questions/10223722', 'https://Stackoverflow.com', 'https://Stackoverflow.com/users/1343318/']
Set up a Crystal formula, similar to:

```
     if {myTable.myField} >= 1 and {myTable.myField} <= 10000 then 'A'
else if {myTable.myField} > 10000 and {myTable.myField} <= 15000 then 'B'
else if {myTable.myField} > 15000 and {myTable.myField} <= 20000 then 'C'

```

- and group on your new formula.
You might consider the `SELECT` expression:

```
SELECT {table.field}
CASE 1 TO 10000: "A"
CASE 10001 TO 15000: "B"
CASE 15001 TO 20000: "C"
DEFAULT: "ERROR"

```