v2.0.0
ActiveReportsJS API Module Core ActiveReportsJS API Module

Core Module

Type aliases

Environment

Environment: { ReportFolder?: undefined | string; ReportName?: undefined | string }

Report environment used for expressions calculation.

Type declaration

  • Optional Readonly ReportFolder?: undefined | string

    Report directory name

  • Optional Readonly ReportName?: undefined | string

    Report name

NoValueType

NoValueType: typeof noValue

Defines special value to indicate that value is not set.

Parameter

Parameter: { descriptor: ParameterDescriptorEx; errorMessage: string; isValidValuesLoaded: boolean; validValues: ParameterValue[]; values: ParameterVariant[] }

Defines report parameter

Type declaration

  • descriptor: ParameterDescriptorEx

    Parameter descriptor

  • errorMessage: string

    Shows error message for invalid parameter values

  • isValidValuesLoaded: boolean

    true if valid values list was loaded

  • validValues: ParameterValue[]

    Valid values

  • values: ParameterVariant[]

    Parameter values

ParameterDataType

ParameterDataType: "Boolean" | "String" | "Integer" | "Float" | "Date" | "DateTime"

Defines parameter data type.

ParameterDescriptor

ParameterDescriptor: { allowBlank: boolean; dataType: ParameterDataType; dependsOn: string[]; multiValue: boolean; name: string; nullable: boolean; selectAllValue?: any }

Defines report parameter descriptor

Type declaration

  • allowBlank: boolean

    Allow blank

  • dataType: ParameterDataType

    Parameter data type

  • dependsOn: string[]

    Parameters on which parameter depends

  • multiValue: boolean

    Parameter is multivalue

  • name: string

    Parameter name

  • nullable: boolean

    Allow null

  • Optional selectAllValue?: any

    For multivalue parameter special value to indicate that all available values are selected

ParameterDescriptorConfig

ParameterDescriptorConfig: { dateOnly: boolean; hidden: boolean; multiline: boolean; prompt: string }

Parameter visual presentation settings.

Type declaration

  • dateOnly: boolean

    Date only. For DateTime parameters.

  • hidden: boolean

    Indicates that parameter is hidden. Hidden parameters are not visible in parameter panel.

  • multiline: boolean

    Multiline.

  • prompt: string

    Parameter value prompt.

ParameterDescriptorEx

Parameter descriptor.

ParameterValue

ParameterValue: { fields?: any[]; label: string; value: ParameterVariant }

Defines parameter value

Type declaration

  • Optional fields?: any[]

    Additional fields for extended parameter view

  • label: string

    Label to display

  • value: ParameterVariant

    Value

ParameterVariant

ParameterVariant: string | number | boolean | Date | null | NoValueType | SelectAllType

Type of parameter value

RDLReportDefinition

RDLReportDefinition: PartialTyped<RDLReport>

RenderOptions

RenderOptions: { galleyMode: boolean; interactivityActions: Array<{ Data: string; Type: "toggle" } | { Data: string; Type: "sort" }> }

Document render options

Type declaration

  • galleyMode: boolean

    Renders document without splitting the big content to pages.

  • interactivityActions: Array<{ Data: string; Type: "toggle" } | { Data: string; Type: "sort" }>

    The document sort and toggle state.

ReportParameters

ReportParameters: {}

Defines report parameters

Type declaration

ResourceLocator

ResourceLocator: { getResource: <T>(uri: string): Promise<T | null> ; getResourceUri: (resourceID: string): string ; fork: any }

Provide tools for accessing external resources by URIs.

Type declaration

  • getResource: <T>(uri: string): Promise<T | null>

    Returns resource content.

      • <T>(uri: string): Promise<T | null>
      • Type parameters

        • T

        Parameters

        • uri: string

        Returns Promise < T | null >

  • getResourceUri: (resourceID: string): string

    Returns absolute resource URI based on relative ID and base path.

      • (resourceID: string): string
      • Parameters

        • resourceID: string

        Returns string

  • fork: function
    • Creates new ResourceLocator instance based on current one base path.

      Parameters

      • reportName: string

        Relative path for new report.

      Returns ResourceLocator

SelectAllType

SelectAllType: {}

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

Type declaration

ValidationResult

ValidationResult: { isValid: boolean; message?: undefined | string; value?: any }

Parameter validation result

Type declaration

  • isValid: boolean

    Indicates whether validation success or not.

  • Optional message?: undefined | string

    The error text in case of validation fails.

  • Optional value?: any

    New validated parameter value.

ValidationResults

ValidationResults: {}

Parameters validation result

Type declaration

  • [parameter: string]: ValidationResult

    Dictionary with validation results per parameter

Variables

Const FontStore

FontStore: { getFonts: (): FontDescriptor[] ; registerFonts: (...fonts: FontDescriptor[]): Promise<void> & (configUri: string): Promise<void> }

Provides tools for registering fonts in CSS and pdf export.

Type declaration

  • getFonts: (): FontDescriptor[]

    Get registered font descriptors.

    returns

    List of registered font descriptors.

  • registerFonts: (...fonts: FontDescriptor[]): Promise<void> & (configUri: string): Promise<void>
    param

    Path to fontsConfig.json file Register fonts specified in сonfig file.

    FontStore.registerFonts('./fontsConfig.json');
    param

    Path to fontsConfig.json file Register fonts specified in сonfig file.

    FontStore.registerFonts('./fontsConfig.json');
    returns

    Promise

Const noValue

noValue: undefined

Special value to indicate that value is not set.

Const selectAll

selectAll: SelectAllType

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

Functions

registerFont

  • deprecated

    Use FontStore.registerFonts instead Registers and loads user-specified fonts

    Parameters

    • Rest ...fonts: FontDescriptor[]

      Set of font descriptors to be registered

    Returns Promise < void >

    Promise that will be resolved when all fonts are loaded and ready for render

setLicenseKey

  • setLicenseKey(key: string): void
  • Set ARJS license key

    Parameters

    • key: string

      license key value

    Returns void