For the complete documentation index, see llms.txt. This page is also available as Markdown.

Customize Pentaho Analyzer

For information on customization Pentaho Analyzer, see the following topics:

Note: You can integrate third-party visualization into the Pentaho Analyzer. See the Visualization API calls in the PDF for Platform JavaScript API for details.

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.

  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:

  4. Change the Report.field.list.collapse value to true as follows:

  5. Save and close the analyzer.properties file.

  6. Restart the Pentaho Server.

  7. Restart Analyzer.

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

See the Install Pentaho Data Integration and Analytics document for instructions on starting and stopping the Pentaho Server.

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 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

Default sort option priorities

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

  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.

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.

Specify through the properties file

This sort option is specified by setting the cmdViewType for the report.field.list.view property.

Specify CSV separator for Analyzer reports

Specify the CSV separator used in Analyzer reports that are exported as CSV output.

Complete the following steps to specify the CSV separator.

  1. Stop the Pentaho Server.

    For instructions on stopping and starting the Pentaho Server, see the Install Pentaho Data Integration and Analytics document.

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

  3. Open the analyzer.properties file with a text editor and locate the following line:

    report.output.csv.separator

  4. Change the report.output.csv.separator property value to the value that you want to use as a CSV separator.

    For example, to use a colon (:) as the CSV separator, update the property value to match the following example:

    report.output.csv.separator = :

    The default CSV separator value is a comma (,).

  5. Save and close the analyzer.properties file.

  6. Restart the Pentaho Server.

  7. Restart Analyzer.

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

  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:

  3. Remove the /* marker and the */ marker to uncomment theEntityWithTimeIntervalKeyStrategy command.

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

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

  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:

  3. Remove the /* marker and the */ marker to uncomment the EntityWithNumberKeyStrategy command.

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

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.

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

Item
Name
Description

1

Header bar

Contains the report title, Filters panel and Actions menu.

2

Filters panel

Displays a filter count and contains a drop-down panel that lists the applied filters.

3

Actions button

Contains a drop-down menu of available user actions, such as exporting the report and changing the visualization type.

4

Undo/Redo button

Click to undo or redo a chart drill-down.

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.viewer

Disables 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.removeReportActions

Removes the Actions button, and access to the Actions menu. The default value is false.

cv.api.ui.removeUndoButton.viewer=true

Removes the Undo button for the report.

cv.api.ui.removeRedoButton.viewer=true

Removes the Redo button for the report.

Note: When 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, actions, and undo/redo buttons from individual reports using the following Javascript user interface APIs:

  • removeHeaderBar(removeFlag)

  • removeReportActions(removeFlag)

  • disableFilterPanel(removeFlag)

  • removeUndoButton(removeFlag)

  • removeRedoButton(removeFlag)

Note: If you are using 3.0 Viz API, you can remove specific chart types from the Actions menu by editing the pentaho-server/pentaho-solutions/system/karaf/config/web-client/config.js file. If you are using 2.0 Viz API and earlier, see the article, "How to hide/disable certain chart types in the Analyzer UI" in the Customer Support.

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.

Note: The 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.

    Note: When 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.

Control empty rows in reports

As an administrator, you can enable or disable the Show empty rows property at the Pentaho Server level. You can use this property to prevent a cross-join that is resource-intensive on the server. The values for the Show empty rows property are:

  • enable

    All users have access (default).

  • Disable

    No users have access.

  • adminOnly

    Only admin users have access.

To control the report option, perform the following steps:

  1. Navigate to the pentaho-server/pentaho-solutions/system/analyzer/ directory and open the analyzer.properties file with any text editor.

  2. Set the report options showEmpty property to enable.

    The Show rows or columns with drop-down menu displays in the Report Optionsdialog box, as shown in the following example:

  3. Choose one of the following options:

    • Measure Data.

    • Measure and Calculated Measure data

    • Show all even blank measures

  4. Restart the Pentaho Server.

Localization

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

  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.

  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.

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 and internationalization of analysis schemas in the Pentaho Schema Workbench document. To localize all web-based components on the Pentaho Server, refer to Localize the Pentaho Server.

Assign Analyzer chart colors

Sometimes visualizations are more clear if you assign specific chart colors to data objects. For instance, you might want to assign colors to sales volume in different regions: red for the Northern region and blue for the Southern region. You can define colors like this using a member property in the Mondrian schema or using a text-based file inside the resources folder.

The color property works differently in various situations.

  • If a series contains one level and one measure,

    then the color depends on the level member.

  • If a series contains multiple levels and one measure,

    then the color depends on the level member that is farthest to the right.

  • If a series contains zero or more levels, or multiple measures,

    then the color depends on the measure member. If there are multiple measures, each measure has a unique color.

If a member has a color mapping defined in both the text-based JSON file and in the Mondrian schema using the CHART_SERIES_COLOR property, the JSON file takes precedence over the CHART_SERIES_COLOR property.

Assigning colors using a text-based file

You can create member-to-color mappings in a text-based JSON file if you do not want to define colors in the database or do not want to change the data structure. The file is located in system/common-ui/resources/chartseriescolor/. You must edit the mdx.json file to define color information for OLAP models such as Mondrian. Analyzer then uses this information to define colors. Define the color information using a web API such as Json Parser Online to ensure you are using the correct JSON syntax.

When running a report, color mapping runs for all members in the report. If the JSON file has an invalid syntax, an error posts in the log file and no color information applies.

  1. Using a JSON editor, open pentaho-server\pentaho-solutions\system\common-ui\resources\chartseriescolor\mdx.json.

  2. Edit the sample so that the elements and colors are defined appropriately. The format is [Hierarchy Level].[Member].[Color]. Specify color using hexadecimal or decimal values.

    In this example, the colors are set for the regions, which are Central, Eastern, Southern, and Western. The colors are then set for the measures, which are Actual, Budget, and Variance.

  3. Save and close the JSON file.

Assigning colors using a member property

You can change the colors of the members in an Analyzer report by defining a member property in the Mondrian schema. There are two different methods for assigning colors to levels or assigning colors to measures. The database column that stores color information is TERRITORY_COLOR. This column is mapped to the CHART_SERIES_COLOR.

Assigning colors to levels

  1. Find the level for which you want to specify colors.

    In this example, the level name is "Territory," coming from a column named TERRITORY.

  2. Define the member property name as CHART_SERIES_COLOR, the mapping to the database column as TERRITORY_COLOR, and the data type for the color values as Integer.

Assigning colors to measures

  1. Find the measure for which you want to specify colors.

  2. Define the CalculatedMemberProperty name as CHART_SERIES_COLOR.

  3. Assign the color value using either a hexidecimal or decimal value.

Analyzer can be configured with custom action links that call out to JavaScript functions. These action links are available in a context menu by right-clicking on level members or measure cells.

Define custom actions in Mondrian

Action links can be defined in your Mondrian schema as annotations. These can be defined under a Level or a Measure. There is no limit to the number of custom action links that you can define, but they need to be named in ascending order, such as AnalyzerCustomAction, AnalyzerCustomAction2, AnalyzerCustomAction3.

The annotation value is just a link-label and JavaScript function, separated by a comma. Analyzer will automatically try to add custom action links on a Type level or a Sales measure whenever they are used in a report.

Annotation defined on a Type level:

Annotation defined on a Sales measure:

Implement a custom action JavaScript function

In order to implement the JavaScript function, you need to create a new Pentaho plugin that injects your JavaScript functions into Analyzer. Here is an example of an analyzer_extension_plugin.xml:

This basically tells the Pentaho Server to inject the analyzer_extension_plugin.js file into Analyzer so that those functions are now available to Analyzer to call when a user clicks on a custom action link.

Here is an example analyzer_extension_plugin.js.

You must define your custom action JavaScript function under the cv.extension namespace. The name of the JavaScript function must exactly match the name you used in the AnalyzerCustomAction annotation. The function takes four parameters:

  • report

    This is the Analyzer report object. You normally will not use this, but if you want to access the report XML definition to inspect the state of the current report definition, you can access report.reportDoc.

  • formula

    This is either the level MDX unique name or the measure unique name, depending on what the user clicked on.

  • ctx

    This is a map of all the levels on the row or column zone and their corresponding MDX members. When clicking on a cell, this map will contain all row and column levels on the report. When clicking on a level member, this map will only contain outer levels which are usually to the left or above the clicked-on level.

  • filter

    This is a level map-to-filter operator-to-member array of all report filters with the exception of numeric filters like Top10 or Greater than.

The filter object is a map of levels to predicate objects. A predicate object is a map of predicate operators to operator arguments. A single level such as [Customer].[Name] may have more than one predicate operator, such as contains John but does not contain Doe.

The possible operators are: EQUALS, NOT_EQUAL, BEFORE, AFTER, BETWEEN, CONTAIN, and NOT_CONTAIN. For all operators with the exception of CONTAIN and NOT_CONTAIN, the operator arguments are MDX members such as [Time].[2014]. CONTAIN and NOT_CONTAIN have string literals as operator arguments. Numeric filters such as Top 10 Account by Sales are not exposed in the filter object.

As an example, assuming the user clicks on this cell:

Then the member, ctx, and filter arguments will look like:

Here are a couple of helpful tips for implementing the JavaScript functions:

  • You can use cv.util.parseMDXExpression to extract the name of the member. For example, [Year].[2003] would return: 2003.

  • You can construct your own URL and then open the URL in a new PUC tab, assuming Analyzer is running within PUC with the function: window.parent.parent.mantle_openTab.

Determine when to show a custom action

There is also another feature to validate whether a custom action link should be included in the context menu or not. You can implement a validation function which returns false to hide the link in the UI. If this validation function is not implemented, then the link will always be shown. This validation function must be named by suffixing the custom action JavaScript function name with _validate.

In this example, the Custom action 1 menu item will not be included if the user right-clicks on a Measure cell where the current context includes Territory: Japan:

Notice how Custom action 1 was not included in the above menu.

PDF and Excel export customizations

Analyzer allows you to customize the appearance and content of your PDF and Excel outputs.

The complete list of properties that you can change are in the file comments. You can find the file here at 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.

You can customize the appearance of your company's PDF and Excel exports from Analyzer in a number of ways. For example, Analyzer PDF exports can be personalized with a company logo and a cover page, and you can change the default font used to generate PDFs.

Customizing the PDF cover page

You can customize the PDF cover page with the following analyzer.properties.

Property
Description

renderer.pdf.cover.hide

Generates the PDF export without a cover page. (Default value: false)

renderer.pdf.cover.image

Generates the PDF export with a custom cover image. The gray boxes in the title background of the report’s cover page can be hidden by setting renderer.pdf.cover.hideTitleBackground=true. When the background is hidden, the title font color is black instead of white.

The cover image is anchored in the bottom left corner of the page. The image is not scaled based on the export page size. Specify the file name of the image and type, no path, and place the image file in the /pentaho-solutions/system/analyzer/resources directory.

If you want to design a cover page with a specific page size and image orientation, then you can override the default renderer.pdf.cover.image. For each page size and orientation (see below), the provided image width and height completely fill the cover page. When setting the property to use for the size and orientation, you should replace the “width x height” value in the property with the file name and type of the image, for example renderer.pdf.cover.image.letter.landscape= my_favorite_image.jpg.

  • renderer.pdf.cover.image.letter.landscape=792x612

  • renderer.pdf.cover.image.letter.portrait=612x792

  • renderer.pdf.cover.image.legal.landscape=1008x612

  • renderer.pdf.cover.image.legal.portrait=612x1008

  • renderer.pdf.cover.image.note.landscape=720x540

  • renderer.pdf.cover.image.note.portrait=540x720

  • renderer.pdf.cover.image.tabloid.landscape=1224x792

  • renderer.pdf.cover.image.tabloid.portrait=792x1224

  • renderer.pdf.cover.image.ledger.landscape=792x1224

  • renderer.pdf.cover.image.ledger.portrait=1224x792

  • renderer.pdf.cover.image.postcard.landscape=416x283

  • renderer.pdf.cover.image.postcard.portrait=283x416

  • renderer.pdf.cover.image.executive.landscape=756x283

  • renderer.pdf.cover.image.executive.portrait=522x756

  • renderer.pdf.cover.image.a3.landscape=1191x842

  • renderer.pdf.cover.image.a3.portrait=842x1191

  • renderer.pdf.cover.image.a4.landscape=842x595

  • renderer.pdf.cover.image.a4.portrait=595x842

  • renderer.pdf.cover.image.a5.landscape=595x420

  • renderer.pdf.cover.image.a5.portrait=420x595

  • renderer.pdf.cover.image.b4.landscape=1000x708

  • renderer.pdf.cover.image.b4.portrait=708x1000

  • renderer.pdf.cover.image.b5.landscape=708x498

  • renderer.pdf.cover.image.b5.portrait=498x708

You can customize the PDF logo with the following analyzer.properties.

Property
Description

renderer.logo.image

Adds a custom logo image to a PDF export. The logo image is placed on the bottom left corner of every page. This image should have no padding and a white background. If the PDF includes a cover page, the logo is placed bottom center on that page. You need to specify the image file name and type, no path, and place the image file in the /pentaho-solutions/system/analyzer/resources/ directory.If you want to set a logo image specific to a page size, then you can override the default renderer.logo.image property with the desired size value:

  • renderer.logo.image.letter

  • renderer.logo.image.legal

  • renderer.logo.image.note

  • renderer.logo.image.tabloid

  • renderer.logo.image.ledger

  • renderer.logo.image.postcard

  • renderer.logo.image.executive

  • renderer.logo.image.a3

  • renderer.logo.image.a4

  • renderer.logo.image.a5

  • renderer.logo.image.b4

  • renderer.logo.image.b5

renderer.logo.image.hideOnCover

Hides the logo on the cover page when set to true. Useful when the cover page already includes a custom background image. (Default value: false)

Set default fonts for PDF export

When displaying data in Analyzer, your reports will use the default browser fonts. However, the PDF export function may not have the same fonts available to it when creating a PDF from your Analyzer report, resulting in output that doesn't look the same way in PDF format as it does in the browser. The default font for PDFs is Helvetica, but you can specify any TrueType font or collection to replace it. Follow the instructions below to specify a different font for PDF exports.

Note: If you have localized your schema in a language that uses a multi-byte character set (most Asian languages fit into this category), this process is required to make PDF output appear without errors.

  1. Stop the Pentaho User Console and Pentaho Server.

  2. Navigate to the pentaho/server/pentaho-server/pentaho-solutions/system/analyzer/ directory and open the analyzer.properties file with any text editor.

  3. Uncomment the renderer.pdf.font.path line.

  4. Replace the value of this line with the TrueType font or collection that you want to use as the default. If you are specifying a collection, you must put a ,1 after the font name, as shown in the above example. This does not apply to individual fonts (TTF files).

  5. Save and close the file and restart the Pentaho Server.

Your PDF exports from Analyzer should have the font you specified.

Removing report attributes

PDF and Excel exports from Analyzer, by default, include information such as the report creator, report name, folder location, filters used, and fields used. As shown in the table below, you can exclude some or all of this information from an export by setting the value of its property to true in analyzer.properties.

Property
Description

renderer.metadata.hide.aboutThisReport

Removes the “About this report” section. (Default value = false)

renderer.metadata.hide.filterSummary

Removes the “Filter summary” section. (Default value = false)

renderer.metadata.hide.fieldsUsed

Removes the “Fields used” section. (Default value = false)

You can retain the "About This Report" section and customize the items it contains by setting the value for the associated property, as described in the following table.

Property
Description

renderer.metadata.hide.aboutThisReport.name``

Removes the “report name” field. (Default value = false)

renderer.metadata.hide.aboutThisReport.description

Removes the “report description” field. (Default value = false)

renderer.metadata.hide.aboutThisReport.creator

Removes the “report creator” field. (Default value = false)

renderer.metadata.hide.aboutThisReport.location

Removes the “report location” field. (Default value = false)

renderer.metadata.hide.aboutThisReport.createdOn

Removes the “creation date” field. (Default value = false)

renderer.metadata.hide.aboutThisReport.cube

Removes the “cube annotation” field. (Default value = false)

Removing a data table and report worksheet

PDF and Excel exports of an Analyzer chart report, by default, also include a data table and report worksheet. You can exclude the data table and / or the report worksheet from PDF and Excel exports of a chart report by setting the value of the associated property to true, as described in the following table.

Property
Description

renderer.pdf.dataTable.hide

Excludes the data table from a chart report exported to PDF. (Default value = false)

renderer.excel.dataTable.hide

Excludes the data table and report worksheet from a chart report exported to Excel. (Default value = false)

Creating custom headers and footers

Headers and footers can be customized to include static text such as disclaimers and copyright information, or dynamic text such as the current user and date. These header and footer templates, defined in Analyzer's resource message files, can be localized into different languages. Analyzer's resource message files are in the pentaho-solutions/system/analyzer/resources directory. The base resources file is messages.properties. The table below describes each message file.

Note: For testing custom headers and footers, you can set localizationService.cache.resource.bundle=false in the analyzer.properties file for immediate pickup by Analyzer of changes to the message*.properties files. For performance reasons, this setting should only be performed in development environments.

Message file
Description

RendererPDFHeaderTemplate

Header template that appears in top-left corner of a PDF. (Default value = %report)

RendererPDFFooterTemplate

Footer template that appears in bottom-right corner of a PDF. (Default value = Page %pageCurrent of %pageTotal)

RendererExcelHeaderTemplate

Header template that appears on the first line of each Excel worksheet.

RendererExcelFooterTemplate

Footer template that appears after the content on each Excel worksheet.

When a PDF and Excel export is generated, the tokens described in the table below are replaced in the template text.

Token
Description

%report

Current report name.

%user

Username of session exporting the report.

%date

Date and time when report was exported.

%pageCurrent

Current page number (PDF only).

%pageTotal

Total page number (PDF only).

Theming a pivot table

If you modify the system theme or add a new theme that changes the styles on the HTML pivot table, the PDF and Excel pivot tables can inherit the same background and font colors. To enable this feature, renderer.dataTable.inheritTheme must be set to true in analyzer.properties.

The following pivot table items can be themed in PDF and Excel exports.

When generating the PDF or Excel export, the following CSS rule sets are used by the theme-specific CSS file to customize the pivot table.

Number
Pivot table item
CSS selector
CSS declarations A
Example

1

Level headers

.pivotTable

.columnHeaders

.columnheading

background-color

color

Education Level

Name

Product Family

2

Level member property headers

.pivotTable

.columnHeaders

.columnPropHeading

background-color

color

Yearly Income

3

Measure headers

.pivotTable

.columnHeaders

.metric

background-color

color

Unit Sales

4

Level members

.pivotTable

.columnHeaders

.member

background-color

Graduate Degree

Food

1997

5

Total members and cells

.pivotTable

.cells

.colSubTotal

background-color

Cells under Graduate Degree Total and Food Total

6

Grand total cells

.pivotTable

.cells

.colGrandTotal

background-color

Cells under Grand Total

A CSS declarations for background-color and color must be specified using hex notation, such as #FF0000 for the color red.

The example below shows a pivot table that was themed by modifying the ruby theme in the `pentaho-solutions/system/analyzer/styles/themes/ruby/anaRuby.css` file.

If you are customizing the HTML pivot table, use the following reference which lists the corresponding CSS selectors for each pivot table item. Many of these items also support :hover selection style changes. The CSS rule sets used to style the PDF and Excel pivot tables are a subset of the CSS selectors listed below.

Note: When styling the HTML pivot table, static resources such as CSS files are cached in the Pentaho Server. You can temporarily disable this caching by setting <cache> to false in the pentaho-solutions\system\analyzer\settings.xml file.

Number
Pivot table item
CSS selectors

1

Level headers

.pivotTable

.columnHeaders

.columnheading

.pivotTable

.rowLabelHeaders TD

2

Level member property headers

.pivotTable

.columnHeaders

.columnPropHeading

.pivotTable

.rowLabelHeaders

.rowPropHeader

3

Measure headers

.pivotTable

.columnHeaders

.metric

4

Level members

.pivotTable

.columnHeaders

.member

.pivotTable

.rowHeaders

.inner

.pivotTable

.rowHeaders

.outer

5

Total members and cells

.pivotTable

.columnHeaders

.memberSubTotal

.pivotTable

.rowHeaders

.subTotal

.pivotTable

.cells

.colSubTotal

.pivotTable

.cells

.rowSubTotal

6

Grand total cells

.pivotTable

.cells

.colGrandTotal

Set pivot table minimum font size

When rendering the pivot table for PDF export, Analyzer attempts to fit the complete width of the table onto a single page using a size 9 font. If the table cannot fit the page using the size 9 font, then progressively smaller font sizes fonts are automatically attempted, down to a lower default limit of 3. To set a higher minimum font size and avoid the need to use PDF zoom functions to read the table, you can override this property.

  1. Navigate to the pentaho/server/pentaho-server/pentaho-solutions/system/analyzer/ directory and open the analyzer.properties file with any text editor.

  2. Locate renderer.pdf.font.table.min.

    renderer.pdf.font.table.minSize=3

  3. Replace the value with the smallest font size that you want used for exported pivot tables.

  4. Save and close the file.

  5. Test your changes by refreshing the cache or by restarting the Pentaho Server.

Your pivot tables exported to PDF from Analyzer will use text with the minimum font size.

Customize the logo on Excel exports

You can add a custom logo to your Excel exports from Analyzer. The image is placed after the content on each worksheet.

To add a custom logo, follow the steps below.

  1. Navigate to the pentaho/server/pentaho-server/pentaho-solutions/system/analyzer/ directory and open the analyzer.properties file with any text editor.

  2. Locate renderer.excel.logo.image

    renderer.excel.logo.image=

  3. Specify the image file name and type, with no path.

    For example, my_favorite_logo.jpg

  4. Place the image file in the /pentaho-solutions/system/analyzer/resources/ directory.

  5. Save and close the file.

  6. Test your changes by refreshing the cache or by restarting the Pentaho Server.

Your Excel exports from Analyzer will now contain the logo.

Customize the font on Excel exports

You can set the font used for your Excel exports from Analyzer.

To change the font, follow the steps below.

Note: The font used with Excel reports must be accessible by the Java virtual machine or operating system.

  1. Navigate to the pentaho/server/pentaho-server/pentaho-solutions/system/analyzer/ directory and open the analyzer.properties file with any text editor.

  2. Locate renderer.excel.font.name.

    renderer.excel.font.name=Verdana

  3. Specify the name of the font.

    (Default = Verdana

  4. Save and close the file.

  5. Test your changes by refreshing the cache or by restarting the Pentaho Server.

Your Excel exports from Analyzer will now use the font.

Last updated

Was this helpful?