Options
All
  • Public
  • Public/Protected
  • All
Menu

Represents a Report for a specific Layer. A report displays information about some of the features of a specific Layer. In order to generate a report, a query must be provided that indicates which features to include in the report. Report generation requires a report template created by the Geocortex Report Designer and stored on the server.

Hierarchy

Index

Constructors

constructor

  • new Report(url: string): Report

Events

onInitializationFailed

onInitializationFailed: function

Occurs when initialization of this object fails.

Type declaration

    • (error: Error): void
    • Parameters

      • error: Error

      Returns void

onInitialized

onInitialized: function

Occurs when initialization succeeds with a response from the REST endpoint. Depending on the API, this response may actually be an error message served as a correct HTTP response.

Type declaration

    • (sender: any): void
    • Parameters

      • sender: any

      Returns void

Properties

Private _initializing

_initializing: boolean

description

description: string

The description of the Report.

displayName

displayName: string

The display name of the Report.

extensions

extensions: Extension[]

The extensions of the PrintTemplate, as defined by an administrator.

id

id: string

The ID of the Report.

initializationFailure

initializationFailure: Error

The exception that occurred if the object could not be initialized.

isInitialized

isInitialized: boolean

Whether or not the object was successfully initialized.

layer

layer: Layer

The Layer that the Report belongs to.

properties

properties: any

The properties of the PrintTemplate, as defined by an administrator.

reportUrl

reportUrl: string

The URL of the Report if it is a URL-based report.

site

The {@link geocortex.essentials.Site} that this resource belongs to.

supportedMapScales

supportedMapScales: Scale[]

The collection of supported Scales for the Report.

supportedOutputFormats

supportedOutputFormats: string[]

The collection of supported output formats for the Report.

supportedResolutions

supportedResolutions: Resolution[]

The collection of supported Resolutions for the Report.

textFields

textFields: TextField[]

The collection of TextField objects for the Report.

type

type: string

The type of the Report. One of ReportType.

url

url: string

The URL that this resource was initialized from.

visible

visible: boolean

The visibility of the Report.

Methods

Private _configureObject

  • _configureObject(results: any, deepInitialize?: boolean): void

Private _initializationFailedHandler

  • _initializationFailedHandler(err: Error): void

Private _initializedHandler

  • _initializedHandler(sender: any): void

Private _restErrorHandler

  • _restErrorHandler(error: Error): void

Private _restLoadHandler

  • _restLoadHandler(deepInitialize: boolean, result: any): void

doWhenInitialized

  • doWhenInitialized(callback: function): void
  • doWhenInitialized(scope: any, callback: function): void
  • Parameters

    Returns void

  • Performs a callback function when this instance has been initialized. If this instance is already initialized when this function is called, the callback function will execute immediately.

    Parameters

    • scope: any

      The scope to using when executing the callback - i.e. the value of the 'this' variable in the callback function. This parameter may be ommitted in which cased the first parameter will be used as the callback function.

    • callback: function

      The callback function to execute when this instance has been initialized.

    Returns void

initialize

  • initialize(obj?: any): void
  • Initializes the {@link geocortex.essentials.AsyncInitializable}. This is an asynchronous method, you may subscribe to the onInitialized and onInitializationFailed events for completion information.

    Parameters

    • Optional obj: any

    Returns void

isRunning

  • isRunning(): boolean
  • Whether the Report is currently running (being generated).

    Returns boolean

run

  • run(query: Query, reportParameters: ReportParameters, runReportComplete: function, runReportError: function): void
  • Runs the report using a {@link esri.tasks.Query} and the ReportParameters. This is an asynchronous method, you may provide delegates for completion or error information.

    Parameters

    • query: Query

      The {@link esri.tasks.Query} to use to select features from the Layer to report on.

    • reportParameters: ReportParameters

      The report parameters.

    • runReportComplete: function

      The delegate that will be called when the report has finished running (even if an error occurs). This delegate expects one argument: a String representing the URL of the prepared report.

        • (results: any): void
        • Parameters

          • results: any

          Returns void

    • runReportError: function

      The delegate that will be called if an error occurs. This delegate expects two arguments: a reference to the Report instance, and an Error.

        • (error: Error): void
        • Parameters

          • error: Error

          Returns void

    Returns void