Dashboard is a one page visualization of business performance data which keeps senior managers in-line and proactive. This helps in taking better business decisions and planning future business needs. The key here is to present business performance data efficiently so that it can benefit business owners and help them analyze different aspects of their business.
To design and develop interactive cockpit in SpagoBI, we would need the following:
- A document of Type “Document Composite” and Engine “Document Composition Engine”.Notes: Make sure the engine has been configured in “Resources->Engines Management page. It can be configured while installing SpagoBI 3.4 (latest version) from windows installer.
- The XML file to design/develop the view and navigation of our cockpit. This is an xml template that we can write only by hand now but in future it will be written by wizard.
Interactive Cockpit Template Detail
This tag defines a template that will be used for rendering documents. It’s a standard template and must not be changed.
<DOCUMENTS_CONFIGURATION video_width=”1024″ video_height=”768″>
This tag defines the size of the video/view, we can have size in percentage mode as well (the alternative is pixel). When not defined the default values are 1024 x 768.
There is a block for every document that we would like to view/present in our cockpit/dashboard. We can add as many document tags as we need depending upon our views requirements. There is no limit and so we can create a composite document with 2,3,4,6, … sub-documents and everyone can shows different layout. The only limit is our common sense, because see too many documents can create confusion rather than help the data analysis.
<DOCUMENT sbi_obj_label=”document_label_value” local_file_name=”BC1_SalesCosts_ByProdCatType.xml”>
sbi_obj_label defiines the label by which the document is saved into SapgoBI.
<STYLE style=”float:left;top:0px;width:50%;height:308px;” />
This tag defines the style html that will be designed with the div which will contain the document. Pay attention to values of top, width and height: they can be written in % or in pixel. SpagoBI recommends the pixel mode because it is more precise and make better use of the available space. Everything we write in this tag, will become the style of final tag.
Indicates the beginning of the list of parameters of the recorded document. In this section we must define all the input/output parameters of the document.
<PARAMETER sbi_par_label=”ProdCatType” type=”OUT” default_value=”CATALOG_CATEGORY”>
For every parameter, we need to define:
* the label by which the parameter is saved into SpagoBI (the url in detail document section).
* the type of the parameter: IN if is an input parameter, OUT if is an output parameter (by which the document refresh others documents).
* thedefault_value: is a value that the engine pass to the document if is not found explicitly in the url.
<REFRESH_DOC_LINKED labelDoc=”BC_SC_ByProdCat” labelParam=”ProdCatType”/>
Indicates possible links with other documents. And for each document linked, we would need to define:
* the label of document linked
* the label of parameter linked
Notes: This tag can be repeated in case there are more than one input parameter for other documents in the page. With this example, if the user clicks on the report, it will refresh the chart with label “BC_SC_ByProdCat” updating the parameter ‘ProdCatType’ with the value clicked.
In SpagoBI 3.1, it is possible to cross navigate on external document setting by a typeCross attribute (EXTERNAL or INTERNAL). It means that now the composite document is very open. By default the cross type is internal.
<REFRESH_DOC_LINKED labelDoc=”docCompNoMapNoConsol” labelParam=”State” typeCross=”EXTERNAL”/>
Create a SpagoBI document as below:
Locate the template file and save the document. And finally execute the document to play with our interactive cockpit.
- All documents referred in the template must exist and be registered in SpagoBI.
- Each document will update the other, must include the tag in the template for the cross navigation. In fact the same document can be run stand-alone (and will have a normal cross navigation) or can be run in a document composed, and in this way will update the documents on the page without launch new ones. We can find my next blog on “How to develop linkable documents in SpagoBI?”.
- We can change the view of composed document by modifying the style tag of each document tag.
- When we save the document, click on cancel button in the following screen otherwise all the input parameters defined in template will be added under section “DOCUMENT ANALYTICAL DRIVER DETAILS”.