Skip to main content
Pentaho Documentation

Customize Pentaho Analyzer

Parent article

You can customize Pentaho Analyzer in the following ways.

Properties file

Giving Analyzer reports a configuration that fits your needs involves editing the analyzer.properties file. The following actions are examples some of the settings you can change:

  • Enabling your logo to appear in PDF output.
  • Specifying the placement of totals for columns and rows.
  • Specifying the maximum number of rows when drilling-down in a report.
  • Defining a specific value for blank cells.
  • Changing the default chart options.

The complete list of properties that you can change are in the file comments, and you can find the file here: server/pentaho-server/pentaho-solutions/system/analyzer/analyzer.properties.

You can test your customizations to analyzer.properties in real time by refreshing the cache for the Analyzer report you are modifying using the More actions and options Administration Clear Cache menu action.

Setting the default placement of column and row totals

Typically in Analyzer reports, the column totals are at the bottom and row totals are on the right. This is the default setting, but users can change it in Analyzer with the Report Options dialogue box by selecting Totals on top/left. If you prefer the default to be column totals at the top and row totals on the left, set the report.options.totalsOnTopLeft parameter to true in the analyzer.properties file.

Collapse business group folders in the Available Fields list

By default, all the business group folders in the Available Fields list are expanded. You can change this setting to a collapsed view by editing the analyzer.properties file.

Procedure

  1. Stop the Pentaho Server.

  2. Navigate to the analyzer.properties file, located at: server/pentaho-server/pentaho-solutions/system/analyzer/analyzer.properties.

  3. Open the file with any text editor and locate the following lines in the file:

    # On opening the field list, collapse the business groups/folder
    # by default. Default: false
    Report.field.list.collapse=false
  4. Change the Report.field.list.collapse value to true as follows:

    # On opening the field list, collapse the business groups/folder
    # by default. Default: false
    Report.field.list.collapse=true
  5. Save and close the analyzer.properties file.

  6. Restart the Pentaho Server.

  7. Restart Analyzer.

    Collapsed business group folders in the         Available Fields list The list of available business group folders is collapsed, as shown in the example above.

Sort options in the Available Fields list

The Available fields list in Analyzer can be sorted using the View toggle with the following sorting options:

UI LabelDescriptionSort Option
By CategorySorts by folder names.cmdViewCategory
Measure - Level - TimeSorts by the type of field.cmdViewType
A > ZSorts by field names without any folders.cmdViewName
SchemaSorts in the same order thant is defined in the Mondrian schema file.cmdViewSchema

Default sort option priorities

The default sort used in an Analyzer report is based on the following priority:

Procedure

  1. A sort specified in an URL takes the highest priority.

  2. The last sort option is automatically remembered when a report is reopened.

  3. Next comes the annotation value specified on the report's cube in the Mondrian schema file.

  4. A system wide setting in analyzer.properties file.

  5. Last, the default value of cmdViewCategory.

Specify 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 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 through the 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

Set discrete axis for line, area, and scatter charts

Line, Area and Scatter charts in Analyzer and custom charts in VizAPI 3.0 provide Time and Number dimensions and associated hierarchic members on a continuous scale axis. However, if you prefer the Time and Number dimensions in Line and Area visualizations on a discrete axis, and to disable the Time and Number dimensions in Scatter visualizations, perform either or both of the following procedures to edit the global mapping configurations:

Set time dimensions to discrete axes in Analyzer

Procedure

  1. Navigate to the pentaho/server/pentaho-server/pentaho-solutions/system/karaf/config/web-client system directory and open the config.js file with any text editor.

  2. Locate the Example Rule 9 - Disable hierarchical dates strategy code block, as shown in this example:

    // Example Rule 9 - Disable the continuous date strategy, to revert
    // to the old behavior (Before 8.1) that represents Time dimensions in a discrete axis.
    /*
    {
      select: { module: "pentaho/visual/role/adaptation/EntityWithTimeIntervalKeyStrategy" },
      apply: { isBrowsable: false }
    },
    */ 
  3. Remove the /* marker and the */ marker to uncomment the EntityWithTimeIntervalKeyStrategy command.

  4. Save and close the file, then refresh the browser.

Results

Your line and area visualizations will display Time dimensions on a discrete axis and the scatter visualization will not be able to provide Time dimensions.

Set number dimensions to discrete axes in Analyzer

Procedure

  1. Navigate to the pentaho/server/pentaho-server/pentaho-solutions/system/karaf/config/web-client system directory and open the config.js file with any text editor.

  2. Locate the Example Rule 10 - Disable the continuous number strategy code block, as shown in this example:

    // Example Rule 10 - Disable the continuous number strategy, to revert
    // to the old behavior (Before 8.2) that represents Number dimensions in a discrete axis.
    /*
    {
      select: { module: "pentaho/visual/role/adaptation/EntityWithNumberKeyStrategy" },
      apply: { isBrowsable: false }
    },
    */
  3. Remove the /* marker and the */ marker to uncomment the EntityWithNumberKeyStrategy command.

  4. Save and close the file, then refresh the browser.

Results

Your line and area visualizations will display Number dimensions on a discrete axis and the scatter visualization will not be able to provide Number dimensions.

Removing headers, filters, and actions for reports in dashboards

You can control the header, filters, and actions available to users viewing an Analyzer report displayed in a dashboard or a standalone report. Independent property settings allow you to disable selected interactive elements of the displayed report, while maintaining the drill-down and keep or exclude capabilities within its charts.

Analyzer report header, filters and actions example

The following table identifies the elements available for controlling viewer access and information in a displayed Analyzer report.

ItemNameDescription
1Header barContains the report title, Filters panel and Actions menu.
2Filters panelDisplays a filter count and contains a drop-down panel that lists the applied filters.
3Actions button Contains a drop-down menu of available user actions, such as exporting the report and changing the visualization type.

You can control Analyzer report elements at the global level using the analyzer.properties file, or at the individual dashboard or report level using Javascript APIs or URL parameters.

For global-level control of the header bar, filters, and actions, use the following settings in the analyzer.properties file in the server/pentaho-server/pentaho-solutions/system/analyzer directory.

Property Description
report.viewer.edit.disable Disables all filter and field editing operations, such as removing a filter or field. The default value is false.
cv.api.ui.removeHeaderBar.viewer Removes the header bar. The refresh indicator continues to appear when the report is refreshed. The default value is false.
cv.api.ui.disableFilterPanel.viewerDisables the Filters panel. The user will be unable to access the Filters drop-down panel and see the applied filters. For example, you may want to disable the Filters panel when the dashboard has used prompts to apply filters, so repeating the prompt filters in the Filters panel would be redundant. The default value is false.
cv.api.ui.removeReportActionsRemoves the Actions button, and access to the Actions menu. The default value is false.
NoteWhen you turn off these elements at the global level, setting the URL parameters to true does not return them.

For embedded Analyzer, you can remove the header bar, filters, and actions from individual reports using the following Javascript user interface APIs. See Pentaho Analyzer External Javascript User Interface APIs for more information.

NoteIf you are using 3.0 Viz API, specific chart types can also be removed from the Actions menu by editing the pentaho-server/pentaho-solutions/system/karaf/config/web-client/config.js file. For users of all 2.0 Viz API and earlier versions, see https://support.pentaho.com/hc/en-us/articles/205790979-How-to-hide-disable-certain-chart-types-in-the-Analyzer-UI for instructions.

For Analyzer reports produced in a dashboard, you can apply the following URL parameters on the dashboard URL or an individual report URL to control the header bar, filters, and actions.

NoteThe following URL parameters are only effective when the settings have not been removed or disabled using the analyzer.properties file.
  • http://localhost:8080/pentaho/api/repos/%3Apublic%3ASteel%20Wheels%3ASales%20Performance%20(dashboard).xdash/viewer?removeHeaderBar=true

    Removes the header bar, Filters panel, and Actions button.

  • http://localhost:8080/pentaho/api/repos/%3Apublic%3ASteel%20Wheels%3ASales%20Performance%20(dashboard).xdash/viewer?removeReportActions=true

    Removes the Actions button and menu.

  • http://localhost:8080/pentaho/api/repos/%3Apublic%3ASteel%20Wheels%3ASales%20Performance%20(dashboard).xdash/viewer?disableFilterPanel=true

    Disables the Filters panel and drop-down.

  • http://localhost:8080/pentaho/api/repos/%3Apublic%3ASteel%20Wheels%3AWidget%20Library%3AAnalysis%20Views%3AGeomap.xanalyzer/viewer?frameless=true

    Removes the report title when the report is opened directly in a browser.

    Report title example

    NoteWhen Analyzer reports are used in Pentaho dashboards, the report titles are automatically hidden because Pentaho dashboard content items include their own titles. However, if you use an Analyzer report in your custom dashboard or as a standalone report, then setting this URL parameter may be useful.

Localization

Perform the following steps to create localized message bundles for Pentaho Analyzer:

Procedure

  1. If the Pentaho Server is currently running, shut it down.

  2. Make a copy of the messages.properties file in pentaho-solutions/system/analyzer/resources/.

    Name the copy according to the standard locale naming scheme defined earlier in this section.
    cp messages.properties messages_fr.properties
  3. Translate the content of the new message bundle into the locale defined in its file name.

  4. Edit the messages_supported_languages.properties file in pentaho-solutions/system/analyzer/resources/ and add the new locale.

    fr=Francais

Results

You now have a translated Analyzer message bundle for the Analyzer interface, not the OLAP data sources you use with Analyzer. For schema localization, refer to Localization/Internationalization of Analysis SchemasLocalization and internationalization of analysis schemas. To localize all web-based components on the Pentaho Server, refer to Localize the Pentaho Server.

Assign chart colors

Clarify visualizations by assigning specific chart colors to data objects.

Learn more

Custom action links to JavaScript functions

Configure Analyzer with custom action links that call out to JavaScript functions.

Learn more

Third-party visualizations

Integrate third-party visualization into the Pentaho Analyzer.

Learn more

PDF and Excel export customizations

Customize PDF and Excel outputs from the Pentaho Analyzer.

Learn more