Report Options provide users with an easy way to create and configure filters that can be used throughout the report and enable users to set filter parameters when the report is run.
Report Options can be added for any field in the Data Model and can also be configured to use default values or be disabled when the report is run, if desired.
Adding Report Options is an easy way to add a lot of flexibility to a report. By incorporating Report Options, the Task Pane can make it easy for users to define the filters that they want to set when running a report.
Report Options are inherited, when relevant, by new functions that are added to the report. Because of this it is strongly suggested that adding Report Options be one of the first steps when creating a new report. If Report Options are added later, it won't hurt the report but all the functions that need to reference the new Report Option will need to be updated manually by the user.
Adding Report Options
To add a Report Option to a report, the user will navigate to the Report Options section of the Cosmos Task Pane and click the New button.
The user will then be shown a list of all tables and fields in the Data Model. After selecting the desired field a Report Option will be created.
In the example below, a Report Option was added based on the Year field in the Date table.
Within the General tab, there are two toggle switches, Use Defaults and Enabled By Default. The Use Defaults toggle, if toggled on, will use the Default Value and Default Operator that is specified below it. If you want the user to input their own filter value then toggle Use Defaults toggle off. This will force the user running the report to have to input a value before being able to run the report.
The Enabled By Default toggle allows the Report Editor to decide which Report Options are enabled when a user runs the report or previews it. If you want the Report Option to be enabled for the user, then toggle the Enabled by Default toggle on. If you don't want the Report Option to be enabled for the user then toggle it off.
The Default Operator and Default Value enables the user to set a value that will initially be populated when the report is run normally or through a Report Preview. The Default Operator represents the operator that will be used, by default, when the report is run, and the Default Value represents the value that all users will see by default when running the report. The Default Value is required. You have to enter a value or Cosmos won't allow you to save the Report Option. Based on the example above, setting the default value to "2022" in the Report Options section and having the Use Defaults and Enabled By Default toggles on, it will automatically populate that default value into the Report when its previewed or when it's ran from the Cosmos Portal.
Additional settings for Report Options are covered below.
Name: The name of the Report Option. This should be a short, descriptive name to enable the user or other users to know what the Report Option does.
The Data section enables the user to define what table and field the Report Option will use when the report runs or is previewed. The user can also limit the amount of data that is returned in this section by entering the number of records they want to limit the results to on the Limit line.
The Filters selection enables the user to define which values will be available to the user running the report when they look up the Report Options. For example, if the Report Editor only wanted the report to be ran for the USA and Canada they could add a filter for Country Code and then enter these values, which would be the only values that the user could select when running the report.
Filter Field: The field in the table that the filter will be applied to. The user can filter on any field in the existing table as well as any field in any related table. More details on working with filters can be found in the article below:
Operator: The operator that will be applied to the filter. Possible options include things like =, <>, >, <, etc.
Filter Value: This is the filter value that the user wants to apply to the filter. The user can enter a value manually and press Enter, the user can click the dropdown to select a Range List to dynamically filter on, or the user can click the dropdown and select "Empty" to tell the function to only return results where the field is empty.
The Sorts section enables the user to define how the data that is returned will be sorted. Simply pick the field you want the data to be sorted by and then select if you want to sort in ascending or descending order.
Deleting a Report Option
To delete a Report Option the user should navigate to the top of the Report Options section in the Cosmos Task Pane and click the Delete button in the upper-right hand corner of the Report Option to delete.