V1
HTML ActiveReportsJS API Module

HTML Module

Type aliases

CheckCancelCallback

CheckCancelCallback: function

Defines a type of callback that gets called to check if cancellation was requested.

Type declaration

    • (): boolean
    • Returns boolean

HtmlExportResult

HtmlExportResult: object

Export result.

Type declaration

  • data: Blob | string

    Result content. The content is 'string' if 'multiPage = true', otherwise content is zip blob.

  • download: function

    Triggers browser download of file with export result.

      • (filename?: undefined | string): void
      • Parameters

        • Optional filename: undefined | string

        Returns void

HtmlSettings

HtmlSettings: object

Defines HTML export settings.

Type declaration

  • Optional autoPrint?: undefined | false | true

    Set to true to add script for a printing page when it is loaded.

  • Optional multiPage?: undefined | false | true

    Set to true to export as a ZIP archive with pages, set to false to export all report pages as a single HTML page.

  • Optional title?: undefined | string

    A title for an HTML page.

OnProgressCallback

OnProgressCallback: function

Defines a type of callback that gets called after each page is rendered.

Type declaration

    • (pageNumber: number): void
    • Parameters

      • pageNumber: number

      Returns void

Functions

exportDocument

  • Exports a provided PageDocument to the HTML format and returns it as string or Blob.

    Parameters

    • source: PageDocument | VDomRenderer

      PageDocument to export.

    • Optional settings: HtmlSettings

      Export settings.

    • Optional onProgress: OnProgressCallback

      The callback that gets called after each sheet is rendered.

    • Optional checkCancel: CheckCancelCallback

      The callback that gets called before sheet rendering, the rendering process will be canceled if the function returns true.

    Returns Promise<HtmlExportResult>