Defining ranges

Top  Previous  Next

Ranges are a powerful Cunitec feature used in filtering reports. They allow you to define one or more groups of records. The ranges are separated by spaces. For example, to select a group of female Ids for a report, you can enter 102 30 H34 in the Id code range box. The above selection is very simple, it includes the females with Id 102, 30 and H34.

 

Intervals

The colon ':' allows you to specify the minimum and maximum of a range such as MIN:MAX. For example, continuing with the previous example, 102:110 includes all females with an Id between and including 102 to 110.

To indicate a lower or upper limit, you can leave blank the minimum or maximum. For example

102: includes all females with an ID 102 or higher.
:110 includes all females with an ID 110 or lower.

Keep in mind that Cunitec orders the records in an alphanumeric way. This means it sorts using both numbers and letters. The range 102:110 includes 102, 103, 104, … 110 but also 102A, 108533, 105RN/4, etc. It is important to understand this when defining a range that may include both letters and numbers. Numbers are always sorted by priority over letters.

 

Unitary sequence

When the variable is a number only, you can use the '..' operator. This indicates an incremental sequence. For example, to select a group of females by parity, entering 1..5 in the range box is exactly the same as 1 2 3 4 5.

 

Integer sequence

Using the .. operator to define a sequence, the interval can be defined between parenthesis. For example 0..10(2) means from 0 to 10 in interval of 2. It is the same asn entering 0 2 4 6 8 10.

 

Decimal sequence

Using the .. operator to define a sequence, the decimal interval can be defined between parenthesis. For example 0..1(0.2) means from 0 to 1 in interval of 0.2. It is the same than entering 0.0 0.2 0.4 0.6 0.8 0.10

 

 

All operators can be mixed. Some examples:

 

In All Females report, I want to include only females of parity 1, 2 and 3:

Parity box: 1:3

 

In All Females report, I want to include females with Id from H100 to H200 and also H205, Z450 and from N102 to N110:

Id box: H100:H200 H205 Z450 N102:N110

 

In the Multifarm report I want to create 3 groups of farms. The first group includes the farm Ids 101, 102 and 103. The second group includes farm 110 and the third group includes farms 115, 116, 117 and 118. I want to see 3 columns, one column for each group to see the consolidated results:

Farm box: 101:103 110 115:118

 

In the Parity Histogram report, I want to see 5 parity groups: 1) 0, 1, 2, separately and 2) parities 3 to 6 combined and 3)including parity 7 and higher:

Parity box: 0..2 3:6 7:

 

In All Females report, I want to exclude females of parity 3, 4 and 5:

Parity box: :2 6: