ReportView class

The EasyQuery client-side view that represents the UI for ad-hoc reporting page

Index

Public Methods

Protected Methods

Public Methods


buildAndExecute

Builds and executes current report's query.

▸ buildAndExecute(options?: any): void

Parameters:

  • options: any, Optional - The options. In particular, options.page defines what page of data to query.

Returns void


getContext

Returns the context.

▸ getContext(): EqContext

Returns EqContext - [[EqContext]] object.


init

Initializes the view.

▸ init(options?: ReportViewOptions): void

Parameters:

Returns void


loadReport

Loads report by ID.

▸ loadReport(reportId: string): void

Parameters:

  • reportId: string - The ID of the report to load.

Returns void


newReport

Creates the new report.

▸ newReport(): void

Returns void


removeCurrentReport

Removes current report.

▸ removeCurrentReport(): void

Returns void


renderCurrentReport

Renders current report.

▸ renderCurrentReport(): void

Returns void


renderReportList

Renders the list of reports.

▸ renderReportList(options?: any): void

Parameters:

  • options: any, Optional - The options. In particular, options.reportIndex defines which report should be active.

Returns void


saveCurrentReportAs

Shows the dialog to save the report with new name.

▸ saveCurrentReportAs(): void

Returns void


setActiveReport

Sets active report.

▸ setActiveReport(reportId: string): void

Parameters:

  • reportId: string - The ID of the report to make active.

Returns void


syncReport

Sends current report's query to back-end.

▸ syncReport(): void

Returns void


Protected Methods


clearErrors

Clears the errors.

▸ clearErrors(): void

Returns void


clearReportButtonClick

The handler of the "Clear" button click.

▸ clearReportButtonClick(): void

Returns void


createColumnsBarWidget

Creates the widget that represents Columns Bar.

▸ createColumnsBarWidget(placeholderElement: HTMLElement): Widget

Parameters:

  • placeholderElement: HTMLElement - The [[HTMLElement]] to place the created widget in.

Returns Widget - the created [[Widget]] object.


createDefaultBroker

Creates the default broker for the view.

▸ createDefaultBroker(context: EqContext): EqBroker

Parameters:

  • context: EqContext - The [[EqContext]] object.

Returns EqBroker - the created [[EqBroker]] object.


createDefaultChartProvider

Creates the default chart provider for the view.

▸ createDefaultChartProvider(): ChartProvider

Returns ChartProvider - the created [[ChartProvider]] object.


createQueryPanelWidget

Creates the widget that represents Query Panel.

▸ createQueryPanelWidget(placeholderElement: HTMLElement): Widget

Parameters:

  • placeholderElement: HTMLElement - The [[HTMLElement]] to place the created widget in.

Returns Widget - the created [[Widget]] object.


disableExportButtons

Disables export buttons.

▸ disableExportButtons(): void

Returns void


displayRecordsCount

Shows records count.

▸ displayRecordsCount(count: number): void

Parameters:

  • count: number - The value to show.

Returns void


enableExportButtons

Enables export buttons.

▸ enableExportButtons(): void

Returns void


errorHandler

The handler of errors.

▸ errorHandler(error: any): void

Parameters:

  • error: any - The error object.

Returns void


hideExportButtons

Hides export buttons.

▸ hideExportButtons(): void

Returns void


insertIntoReportList

Inserts the report to the list of reports.

▸ insertIntoReportList(report: Report): void

Parameters:

  • report: Report - The [[Report]] object to be inserted.

Returns void


loadReportButtonClick

The handler of the "Load" button click.

▸ loadReportButtonClick(): void

Returns void


newReportButtonClick

The handler of the "New" button click.

▸ newReportButtonClick(): void

Returns void


removeFromReportList

Removes the report from the list of reports.

▸ removeFromReportList(reportId: string): number

Parameters:

  • reportId: string - The ID of the report to be removed.

Returns number - the index of removed report.


removeReportButtonClick

The handler of the "Remove" button click.

▸ removeReportButtonClick(): void

Returns void


renderReportItemInList

Renders a single item in the list of reports.

▸ renderReportItemInList(report: Report,ul: HTMLUListElement): void

Parameters:

  • report: Report - The [[Report]] object to render.
  • ul: HTMLUListElement - The [[HTMLUListElement]] to add the item to.

Returns void


renderReportPanels

Renders report panels.

▸ renderReportPanels(): void

Returns void


saveReportButtonClick

The handler of the "Save" button click.

▸ saveReportButtonClick(): void

Returns void


showExportButtons

Shows export buttons.

▸ showExportButtons(): void

Returns void


updateReportButtonClick

The handler of the "Update" button click.

▸ updateReportButtonClick(): void

Returns void