Skip to content

Context for Reports and Webforms with Row Restrictions

Attention

Designers and whoever works with the eLegere's database and reports should read this document.

The Context for Reports and Webforms

The Context is the set of Row Restrictions, filters, and Properties that the data visualization system consider when accessing the application's table data.

The context for Reports and Webforms relies on a system database table to record the Session's Properties and Row Restrictions for the Report's application.

Applications generate a GUID for Reports and Webforms referencing all the required information for the data visualization system.

The GUID refers the entries on a database table recording the Properties and Row Restrictions for the Master table and Detail tables' context. Each table involved in the Report or Webform has their own entry.

  • The Master table has a separate entry.
  • Each Detail table has its own entry.

The database table has the following references on the eLegere's database:

Schema Table
elegere TBL_APP_SESSIONS

TBL_APP_SESSIONS always exists in the database. TBL_APP_SESSIONS is empty if no user has employed filters and there are no Row Restrictions.

The table TBL_APP_SESSIONS has the following fields.

Field Description
SessionId The GUID that the Report or Webform module generates (see above)
Query Records the SQL query to filter the data based on the Properties, filters, and restrictions.
TableName The name of the table considered in the Report
SchemaName The name of the table's schema
UserName Email of user who has opened the Report or Webform in the application.
DT_Creation Date when the user has opened the Report or Webform

On TBL_APP_SESSIONS, there is a record for each table involved in the application's Report or Webform (if there is at least a Property and a Row Restriction). They share the same SessionId field value equal to the GUID.

Info

The Query field on TBL_APP_SESSIONS records the SQL queries for the following elements:

  • For the Master table entry, all the Properties and filters plus the Row Restrictions specific to the Master table.
  • For a Detail table, only the Properties, filters, and restrictions concerning that Detail table.

The Query field enables to recover the data subset directly through a database query.

Row Restrictions

Info

The Row Restrictions specify what rows to display on a table according to certain conditions. You can find the Formula Editor for Row Restrictions in Design Mode > Settings > Restrictions > Row.