Skip to main content
Skip table of contents

Configure Report widgets

The Report widget retrieves, transforms and displays asset data of the context asset, or asset structure data. Based on the transformation, data can be displayed as text, numbers, lists, in tables, or charts. 

Context

The Report widget can be used on any asset page and in any context. censhare provides preconfigured transformations and toolbars. For example, the reports on the Asset statistics tab in the System asset.

Prerequisites

Familiarity with XSLT and the censhare XML data model.

Introduction

The Report widget is a universal tool to display asset data on an asset page. The widget uses XSLT to retrieve and transform data, and creates an HTML output. The data source can be the context asset or any asset structure in your system. XSLT provides great flexibility to transform and format the output data. For example, the Report widget can generate tables, lists, image previews, icons, or charts.

Optionally, you can add a Toolbar transformation to provide interactive elements such as filters, selectors or preview options. The toolbar transformation and report transformation work together and must be configured accordingly.

The report transformation and toolbar transformation are stored in Transformation assets (Module / Transformation). These assets store the configuration in an XSL master file. Since the Report widget is very flexible, it is not possible to provide a universal template for a report transformation. Usually, a report transformation contains three parts:

  • The root query can be the context asset, an asset structure, or the whole system.

  • The value query matches the asset data that you want to display in the output of the widget.

  • The output generates an HTML snippet with censhare directives and writes the queried data in the desired format.

Configuration overview

  • Configure the widget in your personal workspace - Place and configure the Report widget on an asset page. This configuration is only applied to your personal workspace.

  • Create a widget configuration with XML - Add a configuration to an XML workspace template and assign the template to a role.

Configure the Report widget in your personal workspace

To add just the widget to an asset page, proceed as follows:

  1. To add the widget to an asset page, switch to the developer mode in your censhare account.

  2. Open the asset where you want to place the table widget.

  3. Select the tab where you want to place the widget. If you need to add a new tab, open the page actions menu and select Manage tabs.

  4. In the page actions menu, select Add widget type.

    In the Add widget dialog, select Report widget and click OK.

  5. To configure the widget, click the Actions menu and select Configure widget.

  6. In the Generic configuration area, define how the widget is displayed on the asset page. 

  7. In the Report area, configure the report transformation and an optional toolbar transformation. For more information, see the Report section below.

Report

In this section, you configure the report transformation and an optional toolbar transformation:

Field

Mandatory

Description

Toolbar transformation

no

Select a toolbar to be displayed in the table header. Toolbars provide additional controls to filter assets or select the displayed language. Any asset property can be configured as filter criteria. For example, you can add a toolbar that provides a language selector. By clicking on a language, users can change the displayed name and other localized asset details. Preconfigured toolbar transformations are available in the censhare standard configuration. For more information, see Create toolbar transformations.

Transformation

yes

Select a root query to define the top-level node of the displayed asset structure. Assets of the type Module / Transformation store the query. The usage "Report transformation" must be set in the Transformation widget to be shown in the widget configuration.

Allow manual refresh

no

Activate the checkbox to generate an 

 icon in the widget header. If a user clicks it, censhare refreshes the data shown in the widget.

Workspace XML configuration

As a system administrator, you can create widget configurations and add them to the XML file of a workspace template. For more information, see Workspace templates with XML files.

The following code snippet shows the configuration schema:

CODE
<widget kind="csReportWidget">
 <configuration xmlns:censhare="http://www.censhare.com/xml/3.0.0/censhare"> 
  <toolbarTransformationKey censhare:_annotation.datatype="string">[TOOLBAR.TRANSFORMATION.RESOURCE.KEY]</toolbarTransformationKey>
  <transformationKey censhare:_annotation.datatype="string">[TRANSFORMATION.RESOURCE.KEY]</transformationKey>
  <refresh censhare:_annotation.datatype="boolean">[TRUE|FALSE]</refresh>
 </configuration>
</widget>

Remarks

Element / attribute

Mandatory

Description

<widget/>

yes

References the widget this configuration is based on. For attributes and elements that can be added here, see Generic widget configuration.

kind

yes

Select "csReportWidget".

<configuration/>

yes

Contains the configuration of the widget.

<toolbarTransformationKey/>

no

Selects the toolbar that is shown in the widget header.

<transformationKey/>

yes

Selects the transformation that is shown in the widget.

<refresh/>

no

When set to "true", allows users to refresh the displayed data manually.

JavaScript errors detected

Please note, these errors can depend on your browser setup.

If this problem persists, please contact our support.