Chapter 5. Building the Dashboard Framework
Dashboards evolve over time and a standard development best practice is to construct
dashboards with the ability for growth and modification without using repetitive code
through the document. An effective method to streamline dashboard programming with areas
for growth is to create and extract the standard code statements of the document into a
customized Dashboard Framework within Interactive Reporting. While there are various
approaches to constructing a Dashboard Framework, the strategy detailed within this
chapter demonstrates one approach to achieve an optimal configuration. In addition to
the information provided for building the Dashboard Framework, this chapter provides
information on the options for managing document size, delivery, and document
security.
This chapter covers the following concepts:
Understanding the Dashboard Framework
The previous chapter introduced the basic scripting concepts required to assign
code directly to the Script property of an object. However, as dashboards become
more complex, repetitive code across shapes should be extracted to create global
functions that can be used by all objects in the document. The process of creating a
set of global functions permits report authors to create and maintain a customized
framework of JavaScript code in a centralized location within the Interactive
Reporting document.
The strategy used in this guide, called the Dashboard
Framework, is simply an organization of global code contained within
reusable global functions invoked by objects across the document.
Chapter 9, The Central Code
Repository, goes one step further and demonstrates the process for
storing...
Implementing the Dashboard Framework
The use of a single Dashboard section to act as the code library for the document
is the basis of building out a framework within Interactive Reporting. The Dashboard
Framework refers to this section, which contains the necessary global support code,
as the Globals section.
Continuing with the BMV Executive Dashboard example, insert a new Dashboard
section called Globals into the document. Once the Globals Dashboard section is
created and named, shapes which will contain code used by the Dashboard Framework
are added, and scripts are written on their onClick()
event
triggers. Although any Graphic or Control with an onClick()
event trigger could be used to contain global scripts, the Text Label Graphic is a
convenient option as it provides the flexibility for customizing the text and visual
properties...
Understanding Document Save Options
Interactive Reporting offers various save options to give the report author
additional control over the visibility of the code contained in the document as well
as options that impact the size and performance of a document. The Save Query Results With Document, Work Offline in Web
Client, and Compress Document
options allow report author the ability to control document size and performance.
The Password Protect Document and Password Protect Design Mode options give report
author the ability to protect the coding and dashboard interface.
Save Query Results With Document
The Save Query Results With Document
option provides the option to save the data in a Results or Table section in
the Interactive Reporting document. When the option is active for a section,
Interactive Reporting saves the data...
The goal of this chapter was to introduce the Dashboard Framework and to
demonstrate one method to building an effective Dashboard Framework. The chapter
started with an introduction to Dashboard Frameworks and the steps for defining a
naming convention for sections, variables, functions, and shapes. The chapter
continues with the steps to implement the Dashboard Framework, starting first with
methods for defining a library of global shapes and global variables. Next, the
chapter introduces the steps for organizing all of the start-up code of the document
into individual components with specific naming conventions for growth and ease of
use. The methods for testing the start-up code are presented and finally the method
for the implementation of the Dashboard Framework concludes with instructions for
configuring the start-up...