This article applies to the Admin Console > Extensions > ; Custom Options settings.
Custom Options allow for the definition of settings that users can modify on a per-report basis in the Report Designer. Options can be accessed during report execution by Server Events or Custom Functions.
The name of each option can be controlled on a per-user basis using the multi-language feature. Custom Options can be Integers, Decimals, Booleans, Strings or Lists. Each data type provides an appropriate UI element for the user to select a value.
Create, Edit, Delete Custom Options
- To add a new custom filter function click Extensions > Custom Options in the Main Menu and either:
- click the Add icon at the top of the main menu
- right-click and select Add from the context menu
- To edit an option either:
- double click it
- select it and click the Edit icon at the top of the main menu
- right-click it and select Edit from the context menu
- To delete an option either:
- select it and click the Delete icon at the top of the main menu
- right-click it and select Delete from the context menu
- To save changes and new options click the Apply or Okay buttons
Custom Option Properties
Each Custom Option has the following properties:
Id
The unique Id or name of the custom option. The Id is used in accessing the option and may be displayed in the Custom Options Menu as the user sets its value on a report. Required.
The Id may not contain the following characters:
[ ] { } . , @ and whitespace.
NoteTo support multi-language functionality, create an element in the language file(s) with an Id that matches the Option’s Id. The string of that language element will be displayed to the user in the Custom Options Menu. For more information see Multi-Language Support.
Type
The data type the Custom Option should display. Each data type will display an appropriate input element in the Custom Options Menu. The following types are available.
- Int: Represents a whole number.
- Decimal: Represents a decimal number.
- Bool: Represents a Boolean value. A checkbox is displayed.
- Text: Represents a text string and displays a text box.
- List: Represents a single choice from among multiple values. Click the Add icon to define list choices.
User Interaction with Custom Options
After Custom Options are created, the Custom Options Menu will be available in the Report Designer of Advanced and CrossTab Reports.
NoteThe Custom Options Menu will only display if Custom Options exist.
In the Custom Options dialog, values can be set using the user interface elements displayed above.
Accessing Custom Option Values
The .NET API, Server Events, and Custom Functions can access Custom Option values through the SessionInfo.Report
object by using the following function:
string GetCustomOptionValue(string id)
Description |
Returns the value of the specified Custom Option as a string. |
Remarks |
For Bool options the value returned will be true or false. For List Options, the chosen Id is returned. Note |
Example |
A Custom Function could use the following C# code to return the value of a Custom Option. The Id of the Option is entered as an argument of the Custom Function.
|