# TextBox

Learn how to use the TextBox report item in ActiveReportsJS.

## Content

A `TextBox` report item displays static or dynamic textual content in a report.

### Adding an TextBox

You can add a `TextBox` into a report by either double-click the corresponding item in the [toolbox](/activereportsjs/docs/v6.1/ReportAuthorGuide/Report-Designer-Interface#toolbox) or drag-and-drop it to a report page area or other container, such as a [Banded List Section](/activereportsjs/docs/v6.1/ReportAuthorGuide/Report-Items/Data-Regions/BandedList).
DOC-DETAILS-TAG-OPEN
DOC-SUMMARY-TAG-OPEN
Expand to watch adding a TextBox into a report page in action
DOC-SUMMARY-TAG-CLOSE
![AddingHeaderText](https://cdn.mescius.io/document-site-files/images/fcb03d52-fb54-40c3-8356-825c2a095d5b/AddingHeaderText.2a64bf.gif)
DOC-DETAILS-TAG-CLOSE

### General TextBox Configuration

The general configuration includes [Base Report Item properties](/activereportsjs/docs/v6.1/ReportAuthorGuide/Report-Items/Common-Properties#base-properties), [Common Style Properties](/activereportsjs/docs/v6.1/ReportAuthorGuide/Report-Items/Common-Properties#style-properties), [All the Text Properties](/activereportsjs/docs/v6.1/ReportAuthorGuide/Report-Items/Common-Properties#text-properties) and [Visibility](/activereportsjs/docs/v6.1/ReportAuthorGuide/Report-Items/Common-Properties#visibility)

### Content

* The `Value` is an [expression](/activereportsjs/docs/v6.1/ReportAuthorGuide/Report-Items/Common-Properties#expression) that sets the content to be displayed in the textbox. It could be non-textual value, such as a `number` or `date`
* The `Format` is an [expression](/activereportsjs/docs/v6.1/ReportAuthorGuide/Report-Items/Common-Properties#expression) that applies to the `Value` and produces the textual content. ActiveReportsJS follows the .NET conventions for `numeric` format strings:
    * [Standard Numeric Format Strings](https://docs.microsoft.com/en-us/dotnet/standard/base-types/standard-numeric-format-strings)
    * [Custom Numeric Format Strings](https://docs.microsoft.com/en-us/dotnet/standard/base-types/custom-numeric-format-strings)

To format `Date and Time` you can use the same tokens as listed in the [Parsing Date Fields](/activereportsjs/docs/v6.1/ReportAuthorGuide/Databinding#data-set-fields) section.

**Note that formatting is language-sensitive and determined by the `Language` property. If it is `<Empty>`, then the [preferred browser language](https://www.w3.org/International/questions/qa-lang-priorities#changing) will be used.**

### Interactivity

* The `Action` property determines the [interactive action](/activereportsjs/docs/v6.1/ReportAuthorGuide/Interactivity#action-property) that occurs when a report reader clicks the `TextBox` at preview time.
* The `Initial Toggle State` [expression](/activereportsjs/docs/v6.1/ReportAuthorGuide/Report-Items/Common-Properties#expression) sets the initial icon for a textbox that toggles the [dynamic visibility](/activereportsjs/docs/v6.1/ReportAuthorGuide/Report-Items/Common-Properties#visibility) of other report items. If they are visible initially, then the `Initial Toggle State` could be set to `Expanded`.

### Layout

* The `Keep together` flag ensures that a textbox always appears on a single page if it fits.
* The `Can Shrink` flag indicates whether a textbox can shrink in height if there is more available space than the content takes.
* The `Can Grow` flag indicates whether a textbox can increase its height to accommodate growing content.
* The `Shrink To Fit` boolean [expression](/activereportsjs/docs/v6.1/ReportAuthorGuide/Report-Items/Common-Properties#expression) indicates whether a textbox can decrease the font size of its content to fit it into the report item's size. If the `Shrink To Fit` is `True` then the `Can Grow` flag described above does not have any impact. The `Shrink To Fit` is not applicable for a textbox that has the `Writing Mode` property equals `tb-rl`
* The `Min Condense Rate` [expression](/activereportsjs/docs/v6.1/ReportAuthorGuide/Report-Items/Common-Properties#expression) allows compressing the textbox's content vertically so that it fits within the single line. This property value sets the lower bound for the applied scale. If the content cannot fit the width of the control after applying the scaling, line breaks appear as per the `WrapMode` property. If the `Min Condense Rate` is less than `100%` then the `Shrink To Fit` flag, the `Angle` and the `WritingMode` properties do not have any impact.
* The `Angle` is a [number](/activereportsjs/docs/v6.1/ReportAuthorGuide/Report-Items/Common-Properties#scalar) that defines text rotation in degrees relative to the text baseline. If the `Angle` value exceeds zero, then the `Shrink To Fit` flag described above does not have any impact.

### User Sort

Setting properties in this section adds the `sorting` icon on the right boundary of a textbox and allows a report reader to arrange the data at runtime. Check the following documentation to get more information on how to configure the `User Sort` properties:

* [Sorting Detail Rows of a Table](/activereportsjs/docs/v6.1/ReportAuthorGuide/Report-Items/Data-Regions/Table#sorting-details-rows)
* [Sorting Group Instances of a Table](/activereportsjs/docs/v6.1/ReportAuthorGuide/Report-Items/Data-Regions/Table#sorting-group-instances)

### Miscellaneous

* The `Auto Merge Mode` was introduced to support table cells merging at runtime. We recommend using the [Tablix with Static Columns](/activereportsjs/demos/Reports/TablixWithRowGroupsOnly/purejs) instead because it is much more flexible approach.
* The `Heading Level` a [number](/activereportsjs/docs/v6.1/ReportAuthorGuide/Report-Items/Common-Properties#scalar) that determines the position of a textbox content in the [Table of Contents](/activereportsjs/docs/v6.1/ReportAuthorGuide/Report-Items/Supplemental-Report-Items/TableOfContents)