The Live report widget displays reports on data that are based on a live query. The query conforms with the censhare JSON data model. An optional transformation can provide a toolbar or format and transform the data output to the template.
Context
The Live report widget can be used on any asset page and in any context. censhare provides preconfigured transformations. For example, theQuality checksreport on the properties and assigned media assets in products that generate a checklist and completion bar.
Prerequisites
Familiarity with XSLT in and the censhare JSON data model.
Introduction
Based on a live query, the Live report widget displays asset data on an asset page. The data retrieved from the query can be processed in a separate transformation. The data output is configured in an HTML template. The data can be retrieved from the censhare JSON data model.
Optionally, you can add aToolbar transformationto provide interactive elements such as filters, selectors or preview options. Template, query, transformation, and toolbar transformation work together and must be configured accordingly:
TheTemplategenerates the HTML output of the widget. If no query and/or transformation is defined, the template can display static data. The asset type ismodule.dialog., the resource usage iscenshare:live-report-query.
TheQuery (optional)is written in XML or XSLT. The result must be a valid censhare query. The asset type ismodule.search.The resource usage iscenshare:live-report-query.
TheTransformation (optional)provides a data model for the template. You can use the transformation to manipulate the data from the query. The asset type ismodule.transformation.The resource usage iscenshare:live-report-transformation. The results of the transformation must be formatted as follows:
<result>
...
</result>
Note:For live queries, always use a separate query and transformation. If the query is included in the transformation, the widget works like aReport widgetwithout a live query.
TheToolbar transformation (optional)creates controls that allow users to filter, select, or change the displayed data. The asset type ismodule.transformation.The resource usage iscenshare:toolbar-transformation. For more information, seeCreate toolbar transformations.
Configuration overview
Configure the widget in your personal workspace- Place and configure the Live report widget on an asset and carry out the configuration there. This configuration is only applied to your personal workspace.
Configure the Live report widget in your personal workspace
To add the widget to an asset page, switch to the developer mode in your censhare account. For more information, seeThe developer mode in censhare Web.
Open the asset where you want to place the Live report widget.
Select the tab on which you want to place the widget. If you need to add a new tab, open the page actions menu and selectManage tabs. For more information, seeTabs in censhare Web.
In the page actions menu, selectAdd widget type
In theAdd widgetdialog, selectLive report widget. and click OK.
In the widget, clickand selectConfigure widget.
In theGeneric configurationarea, define how the widget and list items in the widget are displayed on the asset page. For more information, seeGeneric Widget Configuration.
In the Live report area, configure the data shown in the widget. For more information, see theLive reportsection below.
To save your changes to your personal workspace and close the dialog, click OK.
Live report
In this section, you configure the report transformation and an optional toolbar transformation:
Field
Mandatory
Description
Template
yes
Select a template from the list that creates an HTML output from the queried data. The template must be stored in aDialogasset and the usage set toLive report template.
Query
no
Select a query from the list that is executed when you open the asset page and retrieve the data displayed in the widget. The query is configured in an XSL stylesheet. The stylesheet must be stored in aSearchasset and the usage set toLive report query.
Transformation
no
Optionally, select a transformation to manipulate the queried data. The transformation uses XSL and must be stored in aTransformationasset and the usage set toLive report transformation.
Activate the checkbox to generate aicon in the widget header. If a user clicks on 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, seeCustomize with XML files.
The following code snippet shows the configuration schema: