ReportQuery

All of the information required to generate a report is stored in a ReportQuery.  A ReportBuilder then builds the ReportQuery and produces a ReportDocument which can be saved, or rendered to Html, PDF and Excel.

A ReportQuery can be created by calling ReportGallery.NewReportQuery(reportCode).  This also caches a copy of the Query so it can be retrieved later using the QueryId.

Properties

Report

The Moxy DB.  This is a key-value store that makes report data available to the report. There are three types of data in the Report ReportBuilder populates the report data from the dataSources in the report.

ReportOptions

An list of ReportOption objects.  These are loaded from the report definition and the value of each option can be updated.

Context

A dictionary of objects that can be used to provide context when loading data sources.  For example, use it to pass an AccountId or UserId to be used when loading a data source.

ActivePageId

The page number that is currently active.  The active page will be displayed when the report is rendered to Html.

DocumentUrl

The url of the report definition that will be used in this report.

ReportCode

The code of the report definition that is being used.

DocumentTitle

The value of the moxydoc:title element in the report definition.

Id

The Id of the ReportQuery.  This is the id of the report.

Methods

Reset

Clears all report data from the Query.  This can be called to prevent the ReportQuery from keeping all of the report data in the session.

Update

Allows a JSON string to be passed to the ReportQuery to update the reportOptions and other settings.

ToJson

Serializes the ReportQuery to a json string so that it can be cached or stored as required.

DeserializeFromJson

A static function that deserializes a json string and returns a ReportQuery.


Click to see Comments

Help comments powered by Disqus