# roll-on modifier

The roll-on modifier creates a visual break in output data when the
 value of a specified attribute changes; an improvement over the break-on
 command. The roll-on connective is similar to the break-on
 connective, but has several enhanced features.

**Synonyms:** total-on

## Syntax

```

 roll-on attr.name{"{text} {’options’ } {text}"}
```

## Parameter(s)

| attr.name | Name of the attribute on which to break. The attribute name designated by roll-on should also be specified as a sort key with by or by-dsnd. | |
| --- | --- | --- |
| text | Text to be printed on the roll-on line. | |
| options | b | Outputs the value causing the break in either the heading or footing output field where the b option is placed in the heading or footing option string. It is not meaningful to specify this option within more than one roll-on specification. |
| d | Suppresses the break data line if only one detail line has been output since the last control break. | |
| n | Resets the page counter to one on each break. | |
| p | Issues a form feed (page eject) after the data associated with this break has been output. | |
| r | Inhibits page rollover. Outputs any occurrence of one or more control break lines at the end of the page, rather than at the top of the next page, thus forcing all the data associated with this break to be current on the same page. | |
| u | Underlines all total fields. | |
| v | Outputs the value causing the control break in the roll-on label. See the b option for the break-on modifier for more information. | |
| " | Inserts a single quotation mark in text. | |

## Description

The attribute values specified by the roll-on connective are rolled into
 the left adjacent column if data in that column has not been modified by a connective (excluding
 break-on), or is not a total column. This provides the ability to generate a
 roll-on connective value without occupying a column of output.

 Accomplishing the same results using the break-on connective requires
 building a hidden attribute-defining item (one that allows 0 column positions on output). Even
 then, a break-on connective using the hidden field still occupies one column
 position on the report.

 If the left adjacent column is a total column or has been modified, the right adjacent column
 is used if it satisfies the same criteria. If both the left and right adjacent columns have been
 modified or are total columns, a new column is created. The new column heading is that of the
 lowest level roll-on connective and all attribute values specified in
 sequential roll-on connectives are rolled into this column.

 If not specified, the number of asterisks corresponding to the roll-on
 level, concatenated to the value rolled on is printed. A line is skipped only with the highest
 level roll-on.

 Unlike the break-on connective, the roll-on connective
 value automatically displays at the detail break lines. By contrast, the
 break-on connective requires the use of the v option to
 accomplish the same result.

## Extending text outside the column width

Typically, roll-on clause limits you to the width of the column that it is
 associated with in the listing. This results in truncated data in the display. To keep this from
 happening, you can create the dictionary with a column width of 0 and use the
 roll-on clause connective.

 To do this, specify the roll-on clause immediately after an ADI that takes
 no space on the output. These settings force the use of the entire width of the screen.

## Example(s)

**Example 1**

```

 list orders.hist roll-on so# " ’p’" inv.line id-supp hdr-supp ni-supp col-hdr-supp
 tcl-supp (kp
```
**Example 2**

```

 list cust by territory by state by city entity.num ename roll-on territory "’bp’"
 entity.address entity.zip phone# cgroup s.pcontact id-supp heading "* * * ’b’
 Territory Dealer List * * *’cldcll’" tcl-supp (p
```

 **Example 3**

 This example shows how to extend text across columns by specifying the
 roll-on clause immediately after an ADI that takes no space on the output.
 That is, a 0 column width
 ADI.
```

 DICT fdate &#39;null&#39; size = 43
 dictionary-code a
 attribute-count 0
 substitute-header \
 structure
 output-conversion
 correlative
 attribute-type
 column-width 0
 input-conversion
 macro
 output-macro
 description
```

 Then
 type:
```

 :sort fdate by d4 null roll-on d4 "This is a test &#39;v&#39;" a0 fmt "l#10" d4 (i
```

 Results:
```

 a0........ d4........

 40 01/17/2020
 80 01/17/2020

 This is a test 01/17/2020

 1 01/18/2020
 41 01/18/2020
 81 01/18/2020

 This is a test 01/18/2020
```

 For a video example, go to [Unwrapping optional text](https://blog.rocketsoftware.com/multivalue/wp-content/uploads/sites/8/sites/8/2018/08/D3_unwrapping_text.mp4).

## See also

- [break-on modifier](https://d3codex.com/access/break-on-modifier/)
- [det-supp modifier](https://d3codex.com/access/det-supp-modifier/)
- [footing statement](https://d3codex.com/pickbasic-flashbasic/footing-statement/)
- [grand-total modifier](https://d3codex.com/access/grand-total-modifier/)
- [heading statement](https://d3codex.com/pickbasic-flashbasic/heading-statement/)
- [Output specifications](https://d3codex.com/access/output-specifications/)
- [ss modifier](https://d3codex.com/access/ss-modifier/)
- [total modifier](https://d3codex.com/access/total-modifier/)

---
Source: https://d3codex.com/access/roll-on-modifier/ - part of the D3Codex reference.
