Custom Parameters

TECH TIP: Overview of Custom Parameters Architecture

I. SessionParameters
    1. Each time a client communicates with the server, the client must send the session id.
    2. Each time the server receives a client request, it authenticates the request. These are the possible cases:

a. No session id specified or invalid session id specified
Validate the session parameters passed from the client. If valid, then start a new session and generate a new  session id. The session id will passed back to the client.

b. Existing session, no session parameters specified or same session parameters specified.
Use the session parameters for the existing session.

c. Existing session, new session parameters specified.
Validate the new session parameters.

    1. The SessionParameters are always passed to the custom parameters related events.

a. For the TrsServer events such as OnValidateSessionParameters, the session parameters are passed in the “aParameters” parameter.

b. For the TrsReportVolume events, there is an “aEventParams” parameter that contains a SessionParameters property (i.e. aEventParams.SessionParameters). Note that the aEventParams object contains a different set of properties depending upon the report volume event. The specific properties are documented in the online help

II. ReportParameters

ReportParameters are only relevant to a request for a specific report. The relevant ReportVolumeEvents that are provided are: OnGetReportParameters, OnValidateReportParameters, and BeforePublishReport. Each of these events passes an “aEventParams” object to the event-handler that contains the SessionParameters, ReportParameters, and other information. Again, note that the aEventParams object contains a different set of properties depending upon the report volume event. The specific properties are documented in the online help.

The ReportParameters passed from the client are automatically assigned to the TppReport.Parameters property. In the server custom parameters demo, the ReportTemplateVolume.BeforePublishReport event is implemented to add the session parameters to the TppReport.Parameters.