How to design and develop an interactive Cockpit or Dashboard in SpagoBI?
- 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.
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.
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.
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.
Example:
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.
Others clarifications:
- 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”.


No comments:
Post a Comment