Customizing Analyzer Sort Options
Available Fields for Sorting in Analyzer
The Available fields list in Analyzer can be sorted using the View toggle with the following sorting options:
UI Label | Description | Sort Option |
---|---|---|
By Category | Sorts by folder names. | cmdViewCategory |
Measure - Level - Time | Sorts by the type of field. | cmdViewType |
A > Z | Sorts by field names without any folders. | cmdViewName |
Schema | Sorts in the same order thant is defined in the Mondrian schema file. | cmdViewSchema |
The default sort used in an Analyzer report is based on the following priority:
- A sort specified in an URL takes the highest priority.
- The last sort option is automatically remembered when a report is reopened.
- Next comes the annotation value specified on the report's cube in the Mondrian schema file.
- A system wide setting in analyzer.properties file.
- Last, the default value of cmdViewCategory.
Specify the Sort Option with an URL
The sort option can be set in the URL by adding a "fieldListView" query parameter at the end of the URL. For example, you can do something like this in a codeblock in HTML or XML.
http://localhost:8080/pentaho/api/repos/xanalyzer/editor?&showFieldList=true&showFieldLayout=true&catalog=SampleData&cube=Quadrant%20Analysis&autoRefresh=true&debug=true&
Specify Sort Option with Annotation
To specify the sort option using an annotation, add a Cube-level annotation called "AnalyzerFieldListView" in your Mondrian schema file. This annotation must be the first child element under a cube as shown here.
<Cube name="Quadrant Analysis"> <Annotations> <Annotation name="AnalyzerFieldListView">cmdViewName</Annotation> </Annotations> <Table name="Quadrant_Acuals" /> <DimensionUsage name="Region" source="Region" /> <DimensionUsage name="Department" source="Department" /> <DimensionUsage name="Positions" source="Positions" />
Specify the Sort Option through the analyzer.properties file
This sort option is specified by setting the cmdViewType for the "report.field.list.view" property.
# Default field list view mode used to sort the available field # list in the editor. Possible values include: cmdViewCategory, # cmdViewType, cmdViewSchema and cmdViewName # This can also be overriden on a cube level with the annotation # AnalyzerFieldListView report.field.list.view=cmdViewType