Previous Topic

Book Contents

Book Index

Next Topic

Report Stylesheet

Stylesheets are a convenient way of quickly adjusting a report to the client's needs.

  • in the first step, you only layout the components in the report and add styles for them
  • visual properties of the components (company logo, fonts for titles, backgrounds for important labels, etc.) are adjusted independently, possibly even by the customer.

Styles can be stored internally (inside of the report) or externally. External stylesheets can be edited without modifying the report. They have the .prptstyle extension and they support CSS3 (for more details see https://cs.wikipedia.org/wiki/CSS3). More technical information can be found e.g. here: http://diethardsteiner.blogspot.de/2012/11/stylesheets-with-pentaho-report-designer.html.

Use a stylesheet for a new report

  1. Make sure that your Report Designer is prepared to use stylesheets (see 'Installation Instructions' for details).
  2. Create a new report using the Valuemation template in the Report Designer Wizard.
    1. Call 'Report Design Wizard' from the 'File' menu.
    2. In the first wizard step, choose 'Template' in the 'Select Look and Feel' section.

      Help Image

    This sets important properties for the report (which would otherwise have to be set manually):

    • Master Report, property 'style-sheet-reference', set calculation as '=CONCATENATE(["env::pentahoImagePath"];"\";"vm_report.prptstyle")'
    • company logo, property 'value', set calculation as '=CONCATENATE(["env::pentahoImagePath"];"\";"VM_logo.png")
    • any other picture: use the same pattern. All pictures used in the report must be located in the folder defined by the property 'pentahoImagePath'.
    • any component using stylesheet: set property 'style-class' to value from stylesheet file (e.g. 'bg_grey_0' for grey background)

    A standard stylesheet is provided by USU. It is named 'vm_report.prptstyle' and located in '$VMWEB_HOME/webconf/report_styling' folder. It also contains pictures used in reports. All USU reports have been designed using this stylesheet.

During the design, it is convenient to have the same stylesheets location for VMA Report Designer and Valuemation runtime. In such case, set the same path in:

  • Report Designer configuration file 'report-designer/resources/classic-engine.properties' (property 'org.pentaho.reporting.engine.classic.core.environment.pentahoImagePath')
  • Valuemation configuration file 'tomcat/webapps/vmweb/WEB-INF/web.xml' (property 'PENTAHO_STYLING_FOLDER')

    If the folder is not within the 'vmweb' servlet, you have to define an absolute path for Tomcat ('web.xml' file).

How to deploy new reports

Follow steps described in chapter 'Import of the Report Definition to Valuemation'.

How to use VMA reports in production

Edit Tomcat Valuemation configuration file 'tomcat/webapps/vmweb/WEB-INF/web.xml' and set property 'PENTAHO_STYLING_FOLDER':

<init-param>

<param-name>PENTAHO_STYLING_FOLDER</param-name>

<param-value>$VMWEB_HOME/webconf/report_styling</param-value>

</init-param>

The folder defined by this property contains client's stylesheets as well as all the images used by their reports.

See Also

Report Creation

Page Setup

Data Set Creation

Report design

Localization

Report parameters