Customize Pentaho Analyzer
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 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.
Changes take effect after you restart the Pentaho Server.
PDF settings
There are a number of ways that you can customize the appearance of your company's PDFs that are exported from Analyzer. For example, Analyzer PDF exports can be personalized with a company logo and a cover page, or you can change the default font used to generate PDFs.
PDF logo and cover page customization
You will need to replace a couple of image files in order to customize the cover page and company logo for your Analyzer PDF exports. These image files need to placed in the pentaho-solutions/system/analyzer/resources/ directory. You then need to update analyzer.properties with the names of these images given to the keys below. If the file names are left blank, then no images are used.
PDF cover image
renderer.pdf.cover.image
PDF logo image
renderer.logo.image
Set default fonts for PDF export
Procedure
Stop the Pentaho User Console and Pentaho Server.
Navigate to the pentaho/server/pentaho-server/pentaho-solutions/system/analyzer/ directory and open the analyzer.properties file with any text editor.
Uncomment the renderer.pdf.font.path line.
renderer.pdf.font.path=C:/WINDOWS/Fonts/MSGOTHIC.TTC,1
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).
renderer.pdf.font.path=/usr/share/fonts/truetype/freefont/FreeSans.ttf
Save and close the file, and restart the Pentaho Server.
Results
Collapse business group folders in the Available Fields list
Procedure
Navigate to the analyzer.properties file, located at: server/pentaho-server/pentaho-solutions/system/analyzer/analyzer.properties.
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
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
Save and close the analyzer.properties file.
Restart Analyzer.
The list of available business group folders are 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 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
Procedure
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 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
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.
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 } }, */
Remove the
/*
marker and the*/
marker to uncomment the EntityWithTimeIntervalKeyStrategy command.Save and close the file, then refresh the browser.
Results
Set number dimensions to discrete axes in Analyzer
Procedure
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.
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 } }, */
Remove the
/*
marker and the*/
marker to uncomment the EntityWithNumberKeyStrategy command.Save and close the file, then refresh the browser.
Results
Localization
Procedure
If the Pentaho Server is currently running, shut it down.
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
Translate the content of the new message bundle into the locale defined in its file name.
Edit the messages_supported_languages.properties file in pentaho-solutions/system/analyzer/resources/ and add the new locale.
fr=Francais
Results
Assign chart colors
Clarify visualizations by assigning specific chart colors to data objects.
Custom action links to JavaScript functions
Configure Analyzer with custom action links that call out to JavaScript functions.
Third-party visualizations
Integrate third-party visualization into the Pentaho Analyzer.