---
title: "Events defined in Dataset Tools"
app: "Warehouse Insight"
section: "Developer"
last_updated: "2023-06-06"
url: "https://insight-works.com/kb/warehouse-insight/events-defined-in-dataset-tools/"
---

# Events defined in Dataset Tools

### Properties

| **Property** | **Value** |
| --- | --- |
| Object Type | Codeunit |
| Object Subtype | Normal |
| Object ID | 23044902 |
| Accessibility Level | Public |

### Events

#### OnBeforeWriteTableBegin()

Called before writing the table beginning definition.

##### Syntax

```
OnBeforeWriteTableBegin(var piEventID: Integer, var ptxtTableName: Text, var prrefRecords: RecordRef, var pdnOutput: TextBuilder, var pbHandled: Boolean)
```

##### Parameters

| **Parameter** | **Type** | **Description** |
| --- | --- | --- |
| _piEventID_ | Integer | The event ID to get the column definitions from. |
| _ptxtTableName_ | Text | The name of the table (header/line). |
| _prrefRecords_ | RecordRef | The table data records. |
| _pdnOutput_ | TextBuilder | The generated definition output. |
| _pbHandled_ | Boolean | Set to true if the procedure has been handled. False if the base code should continue to execute. |

#### OnAfterWriteTableBegin()

Called after writing the table beginning definition.

##### Syntax

```
OnAfterWriteTableBegin(var piEventID: Integer, var ptxtTableName: Text, var prrefRecords: RecordRef, var pdnOutput: TextBuilder)
```

##### Parameters

| **Parameter** | **Type** | **Description** |
| --- | --- | --- |
| _piEventID_ | Integer | The event ID to get the column definitions from. |
| _ptxtTableName_ | Text | The name of the table (header/line). |
| _prrefRecords_ | RecordRef | The table data records. |
| _pdnOutput_ | TextBuilder | The generated definition output. |

#### OnBeforeBuildSingleRow()

Called before writing the row data.

##### Syntax

```
OnBeforeBuildSingleRow(var piEventID: Integer, var prrefRecords: RecordRef, var pdnOutput: TextBuilder, var pbHandled: Boolean)
```

##### Parameters

| **Parameter** | **Type** | **Description** |
| --- | --- | --- |
| _piEventID_ | Integer | The event ID to get the column definitions from. |
| _prrefRecords_ | RecordRef | The table data records. |
| _pdnOutput_ | TextBuilder | The generated definition output. |
| _pbHandled_ | Boolean | Set to true if the procedure has been handled. False if the base code should continue to execute. |
