Custom Functions, Server Events, Action Events, and Assembly Data Sources can access the Exago session state through a sessionInfo object. Access to sessionInfo allows powerful capabilities such as the ability to persist values across function invocations, allowing each invocation to be aware of previous calls and behave accordingly.
This is the parent of all information in the current session. Included are the active Report and SetupData objects.
Since the Report and SetupData objects are accessed frequently, direct pointers are included for these objects.
An object that contains all of the report’s Data Object, sort, filter, and layout information.
An object that contains all of the session’s configuration settings including Functions, Parameters, Data Objects, Joins, Roles, etc.
Contains the value specified by the system CompanyId parameter.
Contains the value specified by the system UserId parameter.
Executes the specified report and returns its HTML output. This could be used to embed a report within a cell of another report.
The reportName is relative to the session's report path.
Returns the specified Parameter object.
GetParameter first looks in the Report Parameter collection, parameters being utilized by the report, and then in the Config Parameter collection, as well as other parameters such as hidden parameters or multi-tenant values.
Returns the specified Parameter object that is utilized by the report being executed.
If a parameter is prompting a user for a value it will be available with the prompted value.
A method that returns the Parameter object stored in the default configuration.
Writes the specified text to Exago’s log file.
The following methods utilize Stored Values which are objects that can be created and set by Custom Functions during report execution to pass data between calls. Stored Values only exist for the duration of report execution.
GetStoredValue(string valueName, object initialValue = null)
Retrieves a Stored Value. If a there is no Stored Value with the specified
valueName, then one will be created with the specified
SetStoredValue(string valueName, object newValue)
Sets the value of a Stored Value. Setting
newValue to null will delete the Stored Value.
To call an Exago function in your extension, use the WebReports.Api.Reports.CellFormula class and return the method
CellFormula formula = CellFormula.CreateFormula(sessionInfo.PageInfo, formulaText, CellVariableCollectionFilter.DataField);