Home > Sitecore OMS reports > Styling OMS Reports

Styling OMS Reports

Introduction

If you want to change the look and feel of the standard OMS reports, there are several things you can do.

human sessions example

You can use the Reports.Web Designer to make changes to text, color, and font style. However, there are some formatting tasks that are a little more difficult to achieve. For example, changing the colors associated with the different states of a hyperlink, changing the colors in a chart or knowing how to create a style sheet that you can re-use in multiple reports.

In this series of blogs I will explain how to achieve some of these tasks. There is also existing Stimulsoft and Sitecore documentation that covers the basics:

  • The Report Designer Cookbook – available on the Sitecore Developers Network in the OMS section
  • Stimulsoft User Manual – available for download from the Stimulsoft Web site – http://www.stimulsoft.com/Documentation.aspx

Tools available that you can use for designing OMS reports:

  • Stimulsoft Reports.Web Designer – Flash based designer available in each report. This is built into Sitecore Analytics and is a standard part of the OMS.
  • Stimulsoft Windows Designer – This is a Windows application. Download the free demo from Stimulsoft Web site and install it on your computer. http://www.stimulsoft.com/downloads.aspx

Note
If you install the Stimulsoft Windows Designer ensure that you are using the correct version. Sitecore currently uses version 2009.1.400. If you use a more recent version of the report designer some properties may not render in Sitecore Analytics.

The Stimulsoft Style Designer

The Stimulsoft Report Designer Style Designer is the main tool you will use when working with report styles. The Style Designer allows you to create component, chart and cross tab styles and these work a bit like Microsoft Word styles. To apply a style you simply select the text element that you want to change and then in the Style group, click on the style that you want to use.

style designer window 

Each report has its own set of styles which are contained in a styles .sts file. This file can be found in the same Web site folder as the report definition .mrt files.

wwwroot\<website_name>\WebSite\sitecore\shell\Applications\Analytics\Reports\Styles.sts

Advantages of the Style Designer

  • Quick and easy to create and reuse styles
  • You can easily create styles for charts
  • HTML and CSS style tags can be embedded into reports

Limitations of the Style Designer

  • You cannot control all styles with the Style Designer. You must use the properties panel to control some style settings such as page background color.
  • You cannot create a single style file to apply to all reports. If you have saved a style file and want to use it in more than one report, you must import it manually into each report.
  • CSS style sheets are not supported, although you can embed CSS style tags in the report header. You cannot create a CSS style sheet and link to it from all reports. You must use Stimulsoft styles.

Stimulsoft Style Files

Each report has a Stimulsoft style sheet associated with it. Stimulsoft styles are defined in an XML file that cannot be edited. You should only change the contents of an .sts file using the interface in the Style Designer.

Extract from Styles.sts showing one of the styles defined on odd and even rows:

extract from style xml file 

Each report definition file (mrt file) contains a copy of the style XML code in the source code. Therefore it is not possible or desirable to change the contents of the .sts and change the format of all reports.

You cannot use Stimulsoft styles in the same way as cascading style sheets. If you change a style which is used across multiple reports you can only update elements in the report that you are working on. To import a style file (.sts file) into another report use the Style Designer, Open Style button to find the saved style file then click Open to import it into the report.

Next post: Creating and Re-using Styles

Categories: Sitecore OMS reports
  1. No comments yet.
  1. No trackbacks yet.

Leave a comment