How to Define Parameters in a Report Template
Report Template parameters enable to define required elements to build a report.
Defining parameters in a Report Template based on a macro
For each parameter you must specify:
• the object type that can be instantiated for the report:
• Parameter with MEGA objects
• Parameter with simple types: a parameter with simple types defines the types that can take values in the report (e.g.: boolean, date, string). MEGA provides, by default, a set of simple types, represented by tagged values.
• its multiplicity.
The Multiplicity of a report parameter enables definition of the number of values that can be associated with the parameter when creating a report. If multiplicity is 1 or 0..1, only one parameter value can be connected.
To create a parameter in a Report Template based on a macro:
1. Access the Report Template (based on a macro).
2. In the Report Template properties, select Parameters.
3. In the Parameters section, click New
and for each parameter define its required Characteristics:
and for each parameter define its required Characteristics:• In Local name field, enter the parameter name.
• In Multiplicity field, select the parameter multiplicity.
• (Optional) In the Description pane enter a description.
4. Select the parameter type:
• Parameter with Mega objects enables connection of MetaClasses that can define the parameter.
For example, for a parameter named "Application Architecture", you can connect an application folder, an application, a query returning applications.
• Parameter with simple types enables connection of "Tagged Values".
Parameter types correspond to report values. Assigned MetaClasses inherit the "System report value" abstract MetaClass.
5. Click Next.
6. If you selected:
• Parameter with MEGA objects, in the Report Parameter Type pane, click Connect
and select the report parameter type(s).
Example: Application.
• Parameter with simple types, in the Tagged Value pane, click Connect
and connect the Tagged Value.
Example: to create a parameter that filters the display of certain objects in the report connect "Boolean Report Value" Tagged Value.
7. Click OK.
The input data type the user must enter for the report calculation is defined.
8. If needed:
• configure the parameter to restrict the values the end-user can use
• customize the parameter display
Configuring a Report Template parameter
If needed, you can define the values the end-user can use at report creation.
Values can be a closed or open list of values, which is defined by the Value definition field:
• Values are suggested (by default)
The end-user can select values that are in the list, but can add other values if required.
• Values are proposed
The end-user can only select values that are included in the list.
• Values are fixed
The end-user cannot select or add any other values.
• Values are fixed and hidden
The end-user does not see the values.
Value proposition defines how the list of values is computed (through a macro or a query). This list of values can be computed from another parameter value, which is defined by the Value Proposition depends on field.
For example:
The parameters of the List Of Objects Report Template are "Target MetaClass" and "MetaAttributes and LegAttribute". This Report Template displays an object list and selected properties (attributes) of the analysis parameters, in a table format.
The list of attributes proposed depends on the MetaClass selected by the end-user.
To configure a Report Template parameter:
1. Access the Report Template.
E.g.: The List Of Objects Report Template, whose parameters are "Target MetaClass" and "MetaAttributes and LegAttribute".
2. In the Report Template parameter properties, display its Default values page.
E.g.: The "MetaAttributes and LegAttribute" parameter.
3. (If needed) Modify the Value definition field.
E.g.: Values are suggested (default), Values are proposed, Values are fixed, Values are fixed and hidden.
4. (If the parameter value depends on another parameter) In the Candidates depend on field, select Connect Report Parameter and connect the Report Template parameter on which the values depend on.
E.g.: "Target MetaClass".
5. In the Value Proposition, click connect and connect the required query or macro.
For example: the query "Available MetaAttributes LegAttributes where MetaClass"
6. (If you want to display parameters ordered by group) In the Displayed in Group field, select the display.
Values are: Parameters, Heatmap, Presentation.
Defining parameters in a Report Template based on Data Views
If the Report Template includes more than one Data View and these Data Views are based on:
• the same Report Data Source Definition:
E.g.: the Application Technologies Report DataSet Definition
By default a single Report Data Source instance is created for the report and associated parameters are valued at report creation.
• distinct Report Data Source Definitions:
By default as many Report Data Source instances as Report Data Source Definitions are created for the report and associated parameters are valued at report creation.
In case parameters are of the same type, you can use a Parameter Usage so that the user is asked to define the parameters only once.
Example: the "App Tech Tech Vendor" Report Template, based on "Application - SI - UC" and "Application Technologies" Report DataSet Definitions, uses the "Application to extract" Parameter Usage.
In the Report Template properties > Parameters - Advanced page:
To create a Parameter Usage:
1. Access the Report Template properties.
2. Display its Parameters page.
3. Create a Parameter Usage: double-click the Parameter Usage cell of one Data Source Parameter, then click its right oriented arrow and selet Create.
E.g.: "Applications to extract"
The Parameter Usage is created.
4. Add the Parameter Usage to the other Data Source Parameter: double-click its Parameter Usage cell, and use the drop-down list to select the Parameter Usage just created.
The Usage Parameters section details the merged: the Parameter Usage created is listed.
At Report creation only one list of objects is asked to he user.
Before: "Application list" and "Applications to extract" are asked to the user, and the charts displayed might not take the same data into account.
After: Only "Applications to extract" is asked to the user, and all the charts are based on the same data.