# ReportViewer.SearchResult

## Content

# Class: SearchResult

[ReportViewer](../modules/ReportViewer).SearchResult

Represents a search result.

**`example`**
```ts
const result = new SearchResult(0, 'Match', new Rect(0, 0, 10, 10), 0, new Range(0, 5));
```

## Table of contents

### Constructors

- [constructor](ReportViewer.SearchResult#constructor)

### Properties

- [DisplayText](ReportViewer.SearchResult#displaytext)
- [ItemArea](ReportViewer.SearchResult#itemarea)
- [ItemIndex](ReportViewer.SearchResult#itemindex)
- [PageIndex](ReportViewer.SearchResult#pageindex)
- [Range](ReportViewer.SearchResult#range)
- [UserData](ReportViewer.SearchResult#userdata)
- [BeforeBegin](ReportViewer.SearchResult#beforebegin)
- [MakePageStart](ReportViewer.SearchResult#makepagestart)
- [PastEnd](ReportViewer.SearchResult#pastend)

## Constructors

### <a id="constructor" name="constructor"></a> constructor

• **new SearchResult**(`pageIndex`, `displayText`, `itemArea`, `itemIndex`, `range`, `userData?`)

Initializes a new instance of the [SearchResult](ReportViewer.SearchResult) class.

**`example`**
```ts
const result = new SearchResult(0, 'Match', new Rect(0, 0, 10, 10), 0, new Range(0, 5));
```

#### Parameters

| Name | Type | Description |
| :------ | :------ | :------ |
| `pageIndex` | `number` | The index of the page where the occurrence is found. |
| `displayText` | `string` | The text to display for the result. |
| `itemArea` | [`Rect`](ReportViewer.Rect) | The coordinates of the matched item area. |
| `itemIndex` | `number` | The logical page item index. |
| `range` | [`Range`](ReportViewer.Range) | The selection text range. |
| `userData?` | `any` | Optional plugin-specific data. |

## Properties

### <a id="displaytext" name="displaytext"></a> DisplayText

• `Readonly` **DisplayText**: `string`

Gets the text to display for the result.

___

### <a id="itemarea" name="itemarea"></a> ItemArea

• `Readonly` **ItemArea**: [`Rect`](ReportViewer.Rect)

Gets the coordinates of the matched item area.

___

### <a id="itemindex" name="itemindex"></a> ItemIndex

• `Readonly` **ItemIndex**: `number`

Gets the logical page item index.

___

### <a id="pageindex" name="pageindex"></a> PageIndex

• `Readonly` **PageIndex**: `number`

Gets the index of the page where the occurrence is found.

___

### <a id="range" name="range"></a> Range

• `Readonly` **Range**: [`Range`](ReportViewer.Range)

Gets the selection text range.

___

### <a id="userdata" name="userdata"></a> UserData

• `Optional` `Readonly` **UserData**: `any`

Gets optional plugin-specific data.

___

### <a id="beforebegin" name="beforebegin"></a> BeforeBegin

▪ `Static` `Readonly` **BeforeBegin**: [`SearchResult`](ReportViewer.SearchResult)

Represents a marker indicating the search should begin from the start.

___

### <a id="makepagestart" name="makepagestart"></a> MakePageStart

▪ `Static` `Readonly` **MakePageStart**: (`pageIndex`: `number`) => [`SearchResult`](ReportViewer.SearchResult)

#### Type declaration

▸ (`pageIndex`): [`SearchResult`](ReportViewer.SearchResult)

Represents a marker indicating a page boundary.

##### Parameters

| Name | Type |
| :------ | :------ |
| `pageIndex` | `number` |

##### Returns

[`SearchResult`](ReportViewer.SearchResult)

___

### <a id="pastend" name="pastend"></a> PastEnd

▪ `Static` `Readonly` **PastEnd**: [`SearchResult`](ReportViewer.SearchResult)

Represents a marker indicating the search has passed the end of the document.
