# Core

## Content

# Namespace: Core

## Table of contents

### Namespaces

- [Rdl](Core.Rdl)

### Classes

- [PageDocument](../classes/Core.PageDocument)
- [PageReport](../classes/Core.PageReport)

### Interfaces

- [Event](../interfaces/Core.Event)
- [FontDescriptor](../interfaces/Core.FontDescriptor)

### Type aliases

- [AnimationSettings](Core#animationsettings)
- [Environment](Core#environment)
- [EventHandler](Core#eventhandler)
- [NoValueType](Core#novaluetype)
- [Parameter](Core#parameter)
- [ParameterDataType](Core#parameterdatatype)
- [ParameterDescriptor](Core#parameterdescriptor)
- [ParameterDescriptorConfig](Core#parameterdescriptorconfig)
- [ParameterDescriptorEx](Core#parameterdescriptorex)
- [ParameterValue](Core#parametervalue)
- [ParameterVariant](Core#parametervariant)
- [RenderOptions](Core#renderoptions)
- [RenderingTreeBarcode](Core#renderingtreebarcode)
- [ReportParameters](Core#reportparameters)
- [ResourceLocator](Core#resourcelocator)
- [SelectAllType](Core#selectalltype)
- [UnregisterHandler](Core#unregisterhandler)

### Variables

- [CultureInfo](Core#cultureinfo)
- [CustomCode](Core#customcode)
- [FontStore](Core#fontstore)
- [noValue](Core#novalue)
- [selectAll](Core#selectall)

### Functions

- [renderBridge](Core#renderbridge)
- [setLicenseKey](Core#setlicensekey)

## Type aliases

### <a id="animationsettings" name="animationsettings"></a> AnimationSettings

Ƭ **AnimationSettings**: `Partial`<{ `charts`: `Partial`<{ `highlight`: { `enabled`: `boolean`  } ; `onHover`: { `enabled`: `boolean`  } ; `onLoad`: { `enabled`: `boolean`  }  }\> ; `table`: { `onHover`: { `backgroundColor`: `string` ; `enabled`: `boolean` ; `textColor?`: `string`  } \| { `enabled`: `boolean` ; `textColor`: `string`  }  }  }\>

Represents animation settings for visual components.

**`example`**
```ts
const settings: AnimationSettings = {
	charts: { onLoad: { enabled: true } },
	table: { onHover: { enabled: true, backgroundColor: '#f5f5f5' } },
};
```

___

### <a id="environment" name="environment"></a> Environment

Ƭ **Environment**: `Object`

Represents the report environment used for expression evaluation.

**`example`**
```ts
const env: Environment = { ReportName: 'SalesReport' };
```

#### Type declaration

| Name | Type | Description |
| :------ | :------ | :------ |
| `EvaluationOptions?` | { `showEvaluationErrors?`: `boolean` ; `showExpressionWarnings?`: `boolean`  } | Gets or sets the evaluation options |
| `EvaluationOptions.showEvaluationErrors?` | `boolean` | Gets or sets the evaluation error rendering |
| `EvaluationOptions.showExpressionWarnings?` | `boolean` | Gets or sets the evaluation warning notifications rendering |
| `ReportFolder?` | `string` | Gets or sets the report folder name. |
| `ReportName?` | `string` | Gets or sets the report name. |
| `logsSubscriber?` | `RenderLogs` | - |

___

### <a id="eventhandler" name="eventhandler"></a> EventHandler

Ƭ **EventHandler**<`TArgs`\>: (`args`: `TArgs`) => `void`

#### Type parameters

| Name | Description |
| :------ | :------ |
| `TArgs` | The event arguments type. |

#### Type declaration

▸ (`args`): `void`

Represents an event handler callback.

**`example`**
```ts
const handler: EventHandler<{ id: string }> = (args) => console.log(args.id);
```

##### Parameters

| Name | Type |
| :------ | :------ |
| `args` | `TArgs` |

##### Returns

`void`

___

### <a id="novaluetype" name="novaluetype"></a> NoValueType

Ƭ **NoValueType**: typeof [`noValue`](Core#novalue)

Defines special value to indicate that value is not set.

___

### <a id="parameter" name="parameter"></a> Parameter

Ƭ **Parameter**: `Object`

Represents a report parameter with values and validation state.

**`example`**
```ts
const parameter: Parameter = {
	descriptor: {} as ParameterDescriptorEx,
	validValues: [],
	isValidValuesLoaded: false,
	values: [],
	errorMessage: null,
};
```

#### Type declaration

| Name | Type | Description |
| :------ | :------ | :------ |
| `descriptor` | [`ParameterDescriptorEx`](Core#parameterdescriptorex) | Gets or sets the parameter descriptor. |
| `errorMessage` | `string` \| ``null`` | Gets or sets the error message for invalid parameter values. |
| `isValidValuesLoaded` | `boolean` | Gets or sets a value indicating whether valid values are loaded. |
| `validValues` | [`ParameterValue`](Core#parametervalue)[] | Gets or sets the list of valid values. |
| `values` | [`ParameterVariant`](Core#parametervariant)[] | Gets or sets the current parameter values. |

___

### <a id="parameterdatatype" name="parameterdatatype"></a> ParameterDataType

Ƭ **ParameterDataType**: ``"Boolean"`` \| ``"String"`` \| ``"Integer"`` \| ``"Float"`` \| ``"Date"`` \| ``"DateTime"``

Defines parameter data type.

___

### <a id="parameterdescriptor" name="parameterdescriptor"></a> ParameterDescriptor

Ƭ **ParameterDescriptor**: `Object`

Represents a report parameter descriptor.

**`example`**
```ts
const descriptor: ParameterDescriptor = {
	name: 'Year',
	dataType: 'String',
	allowBlank: false,
	nullable: false,
	multiValue: false,
	enableEmptyArray: false,
	dependsOn: [],
	displayFormat: '',
};
```

#### Type declaration

| Name | Type | Description |
| :------ | :------ | :------ |
| `allowBlank` | `boolean` | Gets or sets a value indicating whether blank values are allowed. |
| `dataType` | [`ParameterDataType`](Core#parameterdatatype) | Gets or sets the parameter data type. |
| `dependsOn` | `string`[] | Gets or sets the names of parameters this parameter depends on. |
| `displayFormat` | `string` | Gets or sets the format string used to display values. |
| `enableEmptyArray` | `boolean` | Gets or sets a value indicating whether an empty array is allowed for multi-value parameters. |
| `multiValue` | `boolean` | Gets or sets a value indicating whether the parameter is multi-value. |
| `name` | `string` | Gets or sets the parameter name. |
| `nullable` | `boolean` | Gets or sets a value indicating whether null values are allowed. |
| `selectAllValue?` | `any` | Gets or sets the special value that represents "select all" for multi-value parameters. |

___

### <a id="parameterdescriptorconfig" name="parameterdescriptorconfig"></a> ParameterDescriptorConfig

Ƭ **ParameterDescriptorConfig**: `Object`

Represents the UI configuration for a report parameter.

**`example`**
```ts
const config: ParameterDescriptorConfig = {
	hidden: false,
	prompt: 'Year',
	multiline: false,
};
```

#### Type declaration

| Name | Type | Description |
| :------ | :------ | :------ |
| `hidden` | `boolean` | Gets or sets a value indicating whether the parameter is hidden in the parameters panel. |
| `multiline` | `boolean` | Gets or sets a value indicating whether the prompt supports multiple lines. |
| `prompt` | `string` | Gets or sets the parameter prompt text. |

___

### <a id="parameterdescriptorex" name="parameterdescriptorex"></a> ParameterDescriptorEx

Ƭ **ParameterDescriptorEx**: [`ParameterDescriptor`](Core#parameterdescriptor) & [`ParameterDescriptorConfig`](Core#parameterdescriptorconfig)

Represents a report parameter descriptor with UI configuration.

**`example`**
```ts
const descriptor: ParameterDescriptorEx = {
	name: 'Year',
	dataType: 'String',
	allowBlank: false,
	nullable: false,
	multiValue: false,
	enableEmptyArray: false,
	dependsOn: [],
	displayFormat: '',
	hidden: false,
	prompt: 'Year',
	multiline: false,
};
```

___

### <a id="parametervalue" name="parametervalue"></a> ParameterValue

Ƭ **ParameterValue**: `Object`

Defines parameter value

#### Type declaration

| Name | Type | Description |
| :------ | :------ | :------ |
| `fields?` | `any`[] | Additional fields for extended parameter view |
| `label` | `string` | Label to display |
| `value` | [`ParameterVariant`](Core#parametervariant) | Value |

___

### <a id="parametervariant" name="parametervariant"></a> ParameterVariant

Ƭ **ParameterVariant**: `string` \| `number` \| `boolean` \| `Date` \| ``null`` \| [`NoValueType`](Core#novaluetype) \| [`SelectAllType`](Core#selectalltype)

Type of parameter value

___

### <a id="renderoptions" name="renderoptions"></a> RenderOptions

Ƭ **RenderOptions**: `Object`

Represents the document rendering options.

**`example`**
```ts
const options: RenderOptions = {
	galleyMode: false,
	interactivityActions: [],
};
```

#### Type declaration

| Name | Type | Description |
| :------ | :------ | :------ |
| `forceCellbased?` | `boolean` | Gets or sets a value indicating whether to force cell-based layout. |
| `galleyMode` | `boolean` | Gets or sets a value indicating whether to render the document in galley mode. |
| `interactivityActions` | ({ `Data`: `string` ; `Type`: ``"toggle"``  } \| { `Data`: `string` ; `Type`: ``"sort"``  })[] | Gets or sets the interactivity actions applied during rendering.  **`remarks`** Accepted values: - `{ Type: 'toggle', Data: string }`: Applies a toggle action. - `{ Type: 'sort', Data: string }`: Applies a sort action. |

___

### <a id="renderingtreebarcode" name="renderingtreebarcode"></a> RenderingTreeBarcode

Ƭ **RenderingTreeBarcode**: `RenderingTreeItemBase` & { `delayedContent?`: `DelayedContent$1`<[`RenderingTreeBarcode`](Core#renderingtreebarcode)\> ; `model`: { `barcodeModel`: `any` ; `common`: `ResolvedItem` ; `i18n`: `WithT` ; `itemViewSize`: `ItemViewSize` ; `layer?`: `string`  } ; `type`: ``"barcode"``  }

___

### <a id="reportparameters" name="reportparameters"></a> ReportParameters

Ƭ **ReportParameters**: `Object`

Represents the report parameters API.

**`example`**
```ts
const api = {} as ReportParameters;
api.getDescriptors();
```

#### Type declaration

| Name | Type |
| :------ | :------ |
| `applySteps` | (`steps`: `ApplyParameterStep`[]) => `Promise`<`void`\> |
| `getDescriptors` | () => { `[name: string]`: [`ParameterDescriptorEx`](Core#parameterdescriptorex);  } |
| `getValues` | () => { `[name: string]`: `ParameterState`;  } |
| `getValuesFor` | (`knownValues`: { `[name: string]`: [`ParameterVariant`](Core#parametervariant) \| [`ParameterVariant`](Core#parametervariant)[];  }, `requiredParameters`: { `[name: string]`: { `fields`: `string`[]  } \| ``null``;  }) => `Promise`<`GetValuesResult`\> |

___

### <a id="resourcelocator" name="resourcelocator"></a> ResourceLocator

Ƭ **ResourceLocator**: `Object`

Represents the contract for resolving external resources by URI.

**`remarks`**
Implement this type to control how reports resolve external resources such as images, themes, and subreports.

#### Type declaration

| Name | Type |
| :------ | :------ |
| `fork` | (`reportName`: `string`) => [`ResourceLocator`](Core#resourcelocator) |
| `getResource` | <T\>(`uri`: `string`) => `Promise`<``null`` \| `T`\> |
| `getResourceUri` | (`resourceID`: `string`) => `string` |

___

### <a id="selectalltype" name="selectalltype"></a> SelectAllType

Ƭ **SelectAllType**: `Object`

Defines special value for multivalue parameter to indicate that all values are set.

___

### <a id="unregisterhandler" name="unregisterhandler"></a> UnregisterHandler

Ƭ **UnregisterHandler**: () => `void`

#### Type declaration

▸ (): `void`

Represents a callback that unregisters an event handler.

**`example`**
```ts
const unregister: UnregisterHandler = () => {};
```

##### Returns

`void`

## Variables

### <a id="cultureinfo" name="cultureinfo"></a> CultureInfo

• **CultureInfo**: `Object`

Provides data for language and culture-specific text formatting.

**`example`**
```ts
CultureInfo.registerCulture('en-US', {});
```

#### Type declaration

| Name | Type |
| :------ | :------ |
| `registerCulture` | (`identifier`: `string`, `data`: `any`) => `void` |

___

### <a id="customcode" name="customcode"></a> CustomCode

• **CustomCode**: `Object`

Represents the API for registering user-defined functions.

#### Type declaration

| Name | Type |
| :------ | :------ |
| `getFunctions` | () => `UserDefinedFunction`[] |
| `registerFunctions` | (`functions`: `UserDefinedFunction`[]) => `void` |

___

### <a id="fontstore" name="fontstore"></a> FontStore

• **FontStore**: `Object`

Represents the font registration API for CSS and PDF export.

#### Type declaration

| Name | Type | Description |
| :------ | :------ | :------ |
| `registerFonts` | (...`fonts`: [`FontDescriptor`](../interfaces/Core.FontDescriptor)[]) => `Promise`<`void`\> & (`configUri`: `string`) => `Promise`<`void`\> | Registers fonts in CSS and PDF export.  **`remarks`** Use the `fonts` overload to register descriptors directly, or the `configUri` overload to register from a configuration file.   **`param`** The font descriptors to register.  **`param`** The path to a `fontsConfig.json` file.  **`returns`** A promise that resolves when the fonts are loaded.   **`example`** ```ts const arial: FontDescriptor = {  name: 'Arial',  source: 'fonts/arial.ttf',  style: 'italic',  weight: '700', };  const gothic: FontDescriptor = {  name: 'MS PGothic',  source: 'fonts/MS-PGothic.ttf', };  await FontStore.registerFonts(arial, gothic); ```  **`example`** ```ts await FontStore.registerFonts('./fontsConfig.json'); ``` |
| `getFonts` | () => [`FontDescriptor`](../interfaces/Core.FontDescriptor)[] | Gets the registered font descriptors.  **`example`** ```ts const fonts = FontStore.getFonts(); ``` |

___

### <a id="novalue" name="novalue"></a> noValue

• **noValue**: `undefined`

Special value to indicate that value is not set.

___

### <a id="selectall" name="selectall"></a> selectAll

• **selectAll**: [`SelectAllType`](Core#selectalltype)

Special value for multivalue parameter to indicate that all values are set.

## Functions

### <a id="renderbridge" name="renderbridge"></a> renderBridge

▸ `Const` **renderBridge**(`item`): ``null`` \| `VNode`

#### Parameters

| Name | Type |
| :------ | :------ |
| `item` | [`RenderingTreeBarcode`](Core#renderingtreebarcode) \| `RenderingTreeChart` |

#### Returns

``null`` \| `VNode`

___

### <a id="setlicensekey" name="setlicensekey"></a> setLicenseKey

▸ **setLicenseKey**(`key`): `void`

Sets the ActiveReportsJS license key.

**`example`**
```ts
setLicenseKey('YOUR-LICENSE-KEY');
```

#### Parameters

| Name | Type | Description |
| :------ | :------ | :------ |
| `key` | `string` | The license key value. |

#### Returns

`void`
