Académique Documents
Professionnel Documents
Culture Documents
Version 1.2.0.1
SC23-8861-01
Version 1.2.0.1
SC23-8861-01
Note
Before using this information and the product it supports, read the information in Notices on page A-1.
Table of Contents
WHATS NEW..............................................................................................................................................3
TABLE OF CONTENTS.............................................................................................................................4
SECTION 1 TIVOLI COMMON REPORTING OVERVIEW...............................................................7
1.1 GETTING STARTED WITH TIVOLI COMMON REPORTING ....................................................................................7
1.2 REPORT CONTENT IS KEY............................................................................................................................7
SECTION 2 TOOLS......................................................................................................................................9
2.1 OVERVIEW.................................................................................................................................................9
2.2 EDUCATIONAL MATERIALS..........................................................................................................................9
2.3 JAVA.........................................................................................................................................................9
2.4 ECLIPSE AND BIRT....................................................................................................................................9
2.5 DATABASE DRIVERS..................................................................................................................................10
2.5.1 IBM DB2....................................................................................................................................10
2.5.2 Microsoft SQL Server................................................................................................................11
2.5.3 Oracle............................................................................................................................................11
2.5.4 How to Add a JDBC Driver and Configure a JDBC Datasource.................................................11
SECTION 3 STYLE GUIDELINES..........................................................................................................15
3.1 DOCUMENT LAYOUT ................................................................................................................................16
3.1.1 Overall Document Style................................................................................................................16
3.1.2 Overall Document Color Pallet....................................................................................................17
3.2 REPORT HEADER......................................................................................................................................18
3.3 REPORT INTRODUCTION.............................................................................................................................18
3.3.1 Report Title....................................................................................................................................18
3.3.2 Report Sub-Title............................................................................................................................18
3.3.3 Secondary Title..............................................................................................................................19
3.3.4 Parameters....................................................................................................................................19
3.4 INFORMATION SECTIONS ............................................................................................................................21
3.4.1 Section Title...................................................................................................................................21
3.4.2 Charts............................................................................................................................................22
3.4.3 Standard Tables.............................................................................................................................29
3.4.4 Grouping Tables............................................................................................................................31
3.4.5 Form Elements.............................................................................................................................33
3.5 REPORT DESCRIPTION...............................................................................................................................34
3.6 MESSAGE DIALOG BOXES.........................................................................................................................34
3.7 COLLAPSIBLE SECTIONS............................................................................................................................36
3.8 REPORT FOOTER.......................................................................................................................................36
3.9 SAMPLE REPORTS LAYOUTS........................................................................................................................37
SECTION 4 CREATING REPORTS AND REPORT PACKAGES ...................................................40
4.1 INTRODUCTION..........................................................................................................................................40
4.2 TIVOLI COMMON REPORTING STYLE PACKAGE.............................................................................................40
4.2.1 Style Package Description...........................................................................................................40
4.2.2 Importing Style Package into BIRT..............................................................................................42
4.2.3 Creating your BIRT Project.........................................................................................................42
4.2.4 Modify the BIRT settings for resources and templates.................................................................43
4.2.5 Report Naming Convention...........................................................................................................43
4.3 TIVOLI COMMON REPORTING LIBRARY .......................................................................................................44
Section 1Tivoli
1Tivoli Common Reporting Overview
1.1 Getting Started With Tivoli Common Reporting
The purpose of this guide is to provide assistance on how to create reports that
meet the Tivoli Common Reporting (TCR) guidelines and integrate well into the
Tivoli Common Reporting software.
TCR provides a software component, report definition guidelines, and report
templates that can be used by Tivoli products, business partners, and customers.
These guidelines enable consistency in report styles and report generation,
providing a common look and feel, as well as quicker and easier report creation.
Using product supplied reports as the starting point, customers and business
partners can easily create customized extensions that fit into the overall reporting
system, yet meet their individualized needs.
The following is a quick overview of the steps necessary to develop reports that
smoothly integrate into Tivoli Common Reporting.
1. Obtain all prerequisite tools required for building your reports.
2. Decide how to deploy your reports within Tivoli Common Reporting.
3. Determine what reports your customers need, based on your product,
customer expertise or customer interviews.
4. Learn the templates and libraries in the TCR style package.
5. Using the templates and libraries, design and test your reports using the
BIRT report designer.
6. Install and test your reports in Tivoli Common Reporting.
Layout standards for features such as chart sizes and locations, and
templates for combining information on a single page.
This document assists in achieving the consistency and high value goals by
providing a standardized set of report styles and samples upon which visually
effective, easy to read reports can be developed. Tivoli Common Reporting also
provides a set of tools that enable consistency in report access, viewing and
management , thereby improving the overall investment in reporting. Consistent
use of these report styles, samples and tools across multiple product, business
partner and customer-written reports provides the basis for achieving the goals in
this section.
Section 2Tools
2Tools
2.1 Overview
The standard development tool for all reports created for Tivoli Common
Reporting is Business Intelligence and Reporting Tools (BIRT).
BIRT is an open source tool based on the popular Eclipse development platform,
which is also open source. Both are written in Java and rely on a Java runtime
environment.
2.3 Java
A Java Runtime Environment (JRE) is required to run the Eclipse/BIRT SDK.
The minimum level of Java required is JRE 1.5.
Business Intelligence and Reporting Tools (BIRT) is a plug-in for Eclipse. BIRT
2.2.1 is the base reporting engine for products that use Tivoli Common Reporting
version 1.1.1
If you do not already have Eclipse and BIRT, you must install the appropriate
version of Eclipse with the BIRT 2.2.1 report designer. This tool is not included
with Tivoli Common Reporting, but is available for download. See the Tivoli
Common Reporting Web page on IBM developerWorks for more information; you
can also download appropriate versions from the Eclipse Web site (or other
appropriate open source sites).
Note: Make sure you download a version of the BIRT report designer that is
compatible the BIRT 2.2.1 version used by the Tivoli Common Reporting server.
Using incompatible versions of the report designer and the report engine can
cause problems when importing and running reports.
The BIRT report designer is available in several different installation packages:
Framework: The BIRT plug-in by itself. You can use this package if you
already have an appropriate Eclipse environment installed.
The files for the BIRT runtime engine are already included in the Tivoli Common
Reporting installation CD and do not need to be separately obtained or installed.
2.5.1
IBM DB2
The DB2 Universal JDBC driver is a Type 4 driver that can connect directly to a
DB2 server. No DB2 client software is required on the platform where the driver
is installed. The Universal JDBC driver class name is:
com.ibm.db2.jcc.DB2Driver
Download the DB2 v9 JDBC Type 4 driver here:
https://www14.software.ibm.com/webapp/iwm/web/preLogin.do?
lang=en_US&source=swg-dm-db2jdbcdriver
The driver files are as follows:
10
db2jcc.jar
db2jcc_license_cu.jar
2.5.2
2.5.3
Oracle
Download the JDBC 3.0 drivers for Oracle 8, 9, and 10 here:
http://www.oracle.com/technology/software/tech/java/sqlj_jdbc/index.html
2.5.4
11
Click on the Manage Drivers button to display the Manage JDBC Drivers
window:
Click the Add button to add a new driver. This opens a file selection window
where you can specify the location of the .jar or .zip file containing the driver you
want to use. For example, IBM DB2 JDBC drivers are typically found in
<DB2_Install_Dir>\SQLLIB\java12\db2java.zip. Or, if you have downloaded more
recent JDBC driver JAR files from the IBM DB2 web site, you would specify
these files in the file selection window. Once you select the appropriate driver
files, the Manage JDBC Drivers window shows the new files added:
12
To see which JDBC drivers are included in these .jar files, click the Drivers tab:
Click OK to return to the Edit Data Source window. In the Driver Class field,
select the appropriate driver for your report:
13
Tivoli Common Reporting best practices strongly recommend that a JNDI name
be used to define the database definition for production implementations, rather
than coding the URL, name and password as noted above. See the section on
JNDI Naming Convention for further information about using a JNDI name.
.
Copyright IBM Corp. 2007, 2008
14
Section 3Style
3Style Guidelines
The Style Guidelines section covers the basic visual aspects used when creating
a report, such as font size, font style, spacing, and color. The reason to define
these styles is to create a similar look and feel for all of the reports that use these
style guidelines. This enables the layout of different reports (including productspecific reports, business partner reports, and customer-defined reports) to have
a consistent look. Consistency makes reviewing and understanding the
information within the reports easier for users, especially for new or infrequently
used reports.
For a report developer, it is also useful to understand the basic visual layout to
use before developing a new report. This section describes that layout, and
through fonts, colors and spacing, how that look can be achieved.
The easiest way to implement these guidelines is to first read this chapter to
understand the overall guidelines, and then use the following chapter, Creating
reports and report packages, to create reports using the supplied TCR style
package. The styles described in this section are provided within a library in the
TCR style package, and the templates and sample reports in the style package
are all designed using the TCR recommend report layout.
15
3.1.1
An optional description
A footer containing the generation date and time of the report and a
page number
16
When choosing page orientations for your report, consider the following:
3.1.2
Design for the Web first, with no page orientation, and a printing view
second. Web browsers offer a print feature which allows users to
adjust page orientation. The Web browser dynamically scales the
content to fit within the chosen page orientation.
The primary accent color for report titles and table headers is dark blue
(#444E68). Table rows contain an alternating highlight color, which is a muted
grey (#F0F0F0). Table borders are black, which prints consistently on most laser
printers.
BIRT provides a feature to easily group information in a table. Background colors
separate group sections, and table group colors provide colors for as many as
three group levels. Background colors apply only to borders and header text. See
the grouping table section for more information on usage.
Copyright IBM Corp. 2007, 2008
17
The table background that displays the data uses a white background, in order to
keep the focus on the data rather than on the sections. The order of the group
colors were chosen so that grayscale printing shows a sharp contrast in grays for
each section.
Color numbers are provided in both hexadecimal and RGB values. BIRT uses
the system color picker to choose new colors; therefore, on Windows systems,
you must enter the RGB values.
Report Title
The report title section displays the primary title of the report.
Primary report title format:
3.3.2
Report Sub-Title
The report sub-title is an optional title used to further define the purpose of the
report. The sub-title is displayed directly underneath the border used to separate
the main title from the report.
Report sub-title format:
18
3.3.3
Secondary Title
Secondary titles are used to separate parameter sets. A secondary report title is
optional. The secondary title might provide a machine name or a work order
number. Not all reports need a secondary title; this space can be used by other
elements in the report.
Secondary title format:
3.3.4
Parameters
The parameters section provides a place to show the parameter values the user
entered to generate the report. The parameter list is displayed using a simple
table layout using a four-cell grid by default. The first and third columns contain
parameter names, and the second and fourth columns show the corresponding
parameter values.
This section should be kept concise. Try to limit parameter inputs for a given
report to 10 or fewer. If more than 10 parameters are necessary, try to find
alternative display formats (for example, a comma-separated list, or categorized
parameter tables with titles using the secondary-title format).
Consider using the following methods to keep this section concise:
Use a six-column layout when the total number of rows in the parameter
table exceeds 5 (a total of 10 parameters).
19
3.3.4.1
The parameter section is padded by 15 pixels on the top and bottom of the table.
This provides some visual separation from the heading that surrounds the
parameter list. The table is also indented 15 pixels from the left margin. This
indentation creates an association with the report title, indicating that the
parameters are for the entire report.
Parameter name format:
Cell padding: 5 pixel right cell padding; 3 pixel top and bottom cell
padding
3.3.4.2
Color: Black
20
Subsection format:
Cell padding: 3 pixel padding is part of the cell padding in the second
parameter table
3.4.1
Section title
Grouping tables
Form elements
Section Title
The section title introduces the section. The title is optional on reports with only
one section.
Section title format:
21
3.4.2
Charts
Charts convey information about the data in a simplified format. Charts should
always precede any supporting table data.
BIRT generates a raster-based image of the chart when generating the report;
most Web browsers do not provide native scalar vector graphics (SVG). (Mozilla
Firefox is currently the only Web browser with some SVG support.) The highestquality format BIRT supports is the portable network graphic (PNG) image
format, which allows for maximum color depth. Selecting a JPEG may cause the
image to be fuzzy, depending on the quality setting used for conversion. Because
charts are graphics in the final reports and cannot be dynamically resized, the
font size for charts is a fixed point size.
Follow these general guidelines for charts:
Include an axis title or legend to indicate what the data stands for, in
case the section heading does not convey that information.
Font: SansSerif
Legend placement: To the right of the chart, aligned with the top
(top-left alignment in BIRT) of the chart image
Axis label rotation: Long axis labels (15 characters or more) should
be rotated to a 45-degree angle on the vertical axis (normally the Yaxis) , and a negative 45-degree angle on the horizontal axis
(normally the X axis).
Indentation: Indent 20 pixels from the left margin to align with other
pieces in the section
All date formats should adjust to the country locale. To achieve this in
BIRT, any date field in a report should have the Data Type property of
the Data Item set to Date Time, and the Format DateTime property set
to one of the predefined values such as Unformatted, short date:
6/15/07 or any other selection except for Custom. All non-Custom
formats automatically format the date according to the country locale.
22
Dates spanning weeks in a single month should use the dd format and
axis labels that indicate the month (if it is not present in the section title).
Dates for a single week should use the day of the week (for example,
Monday or Tuesday) and an axis label to indicate the week (if it is not
present in the section title).
3.4.2.1
Hourly intervals spanning an entire day can use the hh format and an
axis marker to indicate the day in the locale-specific date format (for
example, April 4, 2007), if the day is not present in the section title.
Include an indication of the time zone for all times (using the base font
style) below the chart or in the description section of the report.
Chart Colors
The following chart shows the colors to use for report charts:
23
For charts depicting status, assign to each status value the appropriate color
from the Status Charting Colors.
For charts not depicting status information, use the Normal Charting Colors.
When using these colors, start from the top and move down the palette. The
sequencing of colors is intended to maintain contrast between colors in a pie
chart even when printing in grayscale.
Note that these colors are not the standard colors provided by BIRT. The color
values are provided in hexadecimal and RGB values. BIRT uses the system
color picker to choose new colors; therefore, on Windows systems, you must
enter the RGB values.
Heat Chart Colors Palette:
Heat charts are generated to show patterns in data over a period of time. Heat
chart colors are slightly different from the status colors shown above. The Heat
Chart color palette is shown below:
24
3.4.2.2
Pie Chart
25
3.4.2.3
Bar Chart
3.4.2.4
Axis markers and grids are optional. Avoid using both in the same chart.
Instead of axis markers, a bar chart can use a grid in the light grey
(#F0F0F0) color.
Status Bar
Status bar charts may be horizontal. Status bars show the complete
status of a group of items, like schedule results for the last 24 hours..
The status colors should conform to the palette referred to in Section
3.4.2.1
Do not combine status bars into a chart. A status bar is good summary
of a collection of status for a single object type.
The legend can be placed below the chart plot instead of placing it on the
right.
Legend layout details:
Orientation: Horizontal
Position: Below
Anchor: Middle
Stretch: Horizontal
Direction: Left Right
26
3.4.2.5
Line Chart
Axis markers and grids are optional. Avoid using both in the same
chart.
Instead of axis markers, a line chart can use a grid in the light grey
(#F0F0F0) color.
Series labels are optional, but required for accessibility. Use a thin
rectangle series marker with labels.
For line charts with too many data points, remove the markers and
series labels. Show the values in a tooltip.
27
3.4.2.6
Use legends for charts with multiple lines. Avoid using a legend for a
single-line chart; instead, use a section title, as shown in the above
example.
Area Chart
BIRT does not support staggering of the tails of the data series which
would indicate the base line of each series to the user,
For the above reasons, do not use grouped area charts. In cases where grouped
area charts are necessary, use a single (one chart, multiple lines) or multiple line
graphs (multiple charts, single lines) to summarize the data series.
Limit the number of data series in a stacked area graph. Too many
data series will compress the allotted spaces for each series.
Remember, the there is always an additional value being presented,
the total of the two areas. A good rule of thumb is nor more than 4
data series.
The color of the line is the same as that of the series taken from the
series palette.
28
3.4.3
Do not use grid lines in area charts because the area chart will hide
the background grid lines from the user.
For long legend entries, place the legend below the chart instead of
placing it on the right.
Standard Tables
Table format:
Margins: 20 pixels top and bottom margin on the table from previous
part of section. The section title provides a 10 pixel bottom padding
which results in a top padding of 0. The goal of this padding is to
provide white space between multiple elements in a section.
29
Use status icons and a text string to describe the status, examples
shown below:
Highlight alternative rows of the data section of the table with grey
(#F0F0F0).
Use the table header format for the primary header label.
30
3.4.4
Alignment: First header row has top left alignment. Second header
row has left alignment.
Grouping Tables
BIRT allows grouping rows of data by attribute. For example, you can group a set
of switch ports on an Ethernet switch by company, product name, and router
name. These groupings appear as a forced hierarchy in the table of information;
in this example, the groupings are based on country, region, and then city.
Each group is accented with a different background color. The background color
wraps around the side of the table, providing a visual indicator of the hierarchy.
The colors provide a strong grayscale contrast between groups, preserving the
grouping in printed output.
The group table style is similar to the table style. Instead of the two-pixel black
border on the top and bottom of the table, there is a one-pixel black right-hand
31
border. The group background colors provide the necessary separation from
other elements in the report.
Avoid deep nesting of groups in a table. Consider other approaches, such as
using a section title or multiple tables to decrease the number of groups.
This diagram shows the measurements for group tables:
BIRT provides a header and footer row for each group. The visual border is
created by adding more empty cells to the table, specifying a background color.
The wrap-around effect is caused by adding 5-pixel cells to the table for each
group. The bottom wrap is caused by setting the group footer height to 3 pixels.
(See the template discussion for more information on creating the effect.)
The group heading is approximately 20 pixels in height; this is mainly based on
the height of the font, which slightly varies for each group. This goal is to keep
the height of the groups consistent; however, in some languages this area might
grow or shrink because of font substitution to produce the necessary glyphs.
The group title aligns with the next level group indentation. For example, the first
group title is indented 5 pixels from the left-hand side of the table to match the
next level. The table area is considered part of the last group, so no indentation
is required on the table.
Nesting too deep or only one group?
When the nesting of groups gets too deep, consider converting the first group
into a section title. Switch the format from the group 1 format below to the report
section format on the first group. You will also need to add a 15-pixel indentation
into the next group in the table. Using this method reduces the overall complexity
of the report and can provide clean separation between the groups.
This kind of format change also works well with only one group. Using BIRT
grouping tables in this manner helps to break the tables out into sections. In this
case, follow the table style on the nested data section by adding the top and
bottom 2-pixel line to the header and data section. This simplifies the overall
design of the report and produces a consistent layout for the report content.
Group level 1 format:
Font: Verdana
32
Indentation: Text indents 5 pixels from the left-hand side of the table
Font: Verdana
Indentation: Text indents 10 pixels from the left-hand side of the table
3.4.5
Font: Verdana
Indentation: Text indents 15 pixels from the left-hand side of the table
Form Elements
Some reports become invoices or other printed contract documents. This type of
document typically requires a signature, and possibly a place for recording the
progress of an order. Form elements are optional. This example shows two form
elements, one without a title and one with a title:
Section format:
33
Remember that handwriting always takes more space than the label;
leave as much room as possible.
In grid layout, the first column is the label, and the second column is the
entry space.
Avoid using more than two entry fields in the same row.
Width: Text section extends to the left and right margin of the document
34
and a technical error message. You can use a dialog box to present users with
information about problems in a more nontechnical fashion.
A common use of the message dialog box, used within the templates, is to
provide a message dialog box when no data was returned for the report, rather
than generating an empty report.
Another example of a dialog box is in the Tivoli Storage Manager Express Daily
Status report. This daily status report is sent by e-mail to the administrator, giving
a daily summary of backup operations. If the product is about to reach its
maximum database size, a dialog box appears with a message. This dialog box
also suggests actions to take, (such as upgrading to the enterprise product or
creating another TSM Express server). This gives the user a clear indication of
the problem and what actions might correct the issue.
This illustration shows warning and error message dialog boxes:
For information messages in a report, follow the description format. Critical error
messages should display an error message number in addition to the error text
so users can look up more information about the message. The message should
suggest corrective actions for the user to take; remember that these messages
appear in a report which might be sent via e-mail or posted on an internal Web
site, so the reader may not be logged in to an administrative console. (The
corrective action could be as simple as logging in to the administrative console to
view the event.)
Message Box Format:
Width: 95%
Placement: Dialog box should appear right after the report title
Close dialog link: The link style should follow the user settings. This
link causes the message dialog box to close; the link should not appear
in PDF output.
35
Icon: Error status icon for error (message number ending in E), severe
(message numbers ending in S), and diagnostic (message number
ending in S) error messages; Warning status icon for warning messages
(messages number ending in W)
Message Text:
Details can be important, but some details might not add much to the
presentation of a report to upper management. Often, tables in a report provide
very detailed information mainly used by technical personnel, administrators, or
individual workers, while the manager or executives are looking primarily at
summary information. To create a single report that includes both summaries and
details, consider using collapsible sections.
A collapsible section should not be used in a small report with a single section
and chart. However, when displaying multiple charts in multiple sections,
collapsible sections can help with navigation and display of the report on the
Web. (Collapsible sections should always be expanded in PDF output, or when
printed.)
Collapsible Section Format:
36
pages) is aligned with the right margin of the document. Both text elements use
the base font and font size of the document (Verdana 11pt). The report footer is
also a part of the TCR master page in the TCR library.
37
This sample shows a report with table footers and a message dialog box:
38
39
Section 4Creating
4Creating reports and report packages
4.1 Introduction
This section covers how to create a report using TCR templates and styles and
how to create a file structure, generally in a BIRT project, that can easily be
imported into Tivoli Common Reporting. The file structure, containing report
designs and their associated resources, is referred to as a report design package
in the Tivoli Common Reporting Users Guide. (A report design package is one of
two types of report package.)
4.2.1
40
TCR_Table
TCR_Chart
TCR_ChartTableCombo
TCR_GroupTable(1_group)
TCR_GroupTable(2_groups)
TCR_GroupTable(3_groups)
CascadingParameters
ChartsWithDrillthrough
DateRangeParameters
DynamicChartDimensions
DynamicColumnSort
DynamicQuery
DynamicTableColumnsAndVisibilityControl
ExpandCollapseSections
MessageDialogs
ParameterValidation
QuickLinks
StatusBasedColoringOfCharts
TableFooterWithTotals
TableUsingStatusIcons
TableWithDrillthrough
41
4.2.2
4.2.3
Create a new project for your products reports. This project will be the
basis for your report package.
1. File -> New -> Project
2. In the New Project window, expand Business Intelligent and
Reporting Tools and select Report Project under it. Click Next.
3. Type <product name> Reports in the Project Name field. Click
Finish. For example, TBSM Reports, ITM Reports.
4. Copy the resources folder from the TCR project to the product
reports project.
5. Within the resources folder, create another folder named according
to your product name. This folder will have the same structure as the
tcr_common directory. Use this folder for your product-specific
resources such as status icon images, a library to store your data
source information, .properties file for your reports, and scripts used
in your reports. An example is shown in the figure below.
6. In the lib folder in <product name> Reports/resources/<product
name>/lib, create a library called <product name>.rptlibrary. In this
library, under data sources, create the primary data source that your
report will use. The datasets created in the report designs will access
this data source. Other reusable report items specific to your product
reports will also be created in the library.
42
4.2.4
2.
4.2.5
43
Replace <report name> with the name of the report that will be displayed as
your report title.
The following are examples of report names following this convention:
itm_utilization_cpu.rptdesign
tbsm_availability_summary_chart.rptdesign
44
45
4.3.1
TCR Theme
A theme is a collection of styles. A style is used to customize the appearance of
report elements, specifying formatting properties such as alignment, color, font,
size, background colors, and borders. BIRTs formatting properties follow the
CSS specification.
One theme is currently defined in the Tivoli Common Reporting library:
TCRTheme_v1. This theme contains all of the Tivoli Common Reporting
recommended formatting styles. The list of available styles is visible in the
Outline view of the library:
Some examples of styles used in the TCR Theme are report, main-title, tableheader-cell, parameter-table etc. All styles are described in Section 5.
For the TCR Theme to be available to a report design, it must be referenced as a
general property of the report. If you create a report based on one of the TCR
templates, it will include a reference to the TCR Theme. If you must add it
manually, you can do so in the report general properties editor:
Note that the theme reference includes the library name prefix.
46
4.3.2
Report Parameters
The Tivoli Common Reporting library contains a reusable report parameter
group, called Date Range. Within this parameter group, there are 3 individual
parameters, Begin Date, End Date and Report Period. The Date Range
parameter group is designed to allow the user to quickly select a standard report
period, for example, the last 7 days, or to enter a specific begin and end date for
the report. The Begin Date and End Date are DateTime parameters. The Report
Period parameter contains a predefined selection list of date ranges for a report.
The selection list allows choosing user-friendly date ranges such as Last week
or Last 90 days. It is possible to use the parameters without using the entire
Date Range parameter group, and DateRangeParameters sample report
provides such an example by only using the Report Period parameter..
4.3.3
Report Items
The Tivoli Common Reporting library contains the following reusable report
items:
4.3.4
Report Period, Begin Date, End Date: Text and Data items that
implement 3 fields to display date ranges in the Parameters section of a
report. Report Period displays the same text that is presented to the
user in the Report Period report parameter, described above. Begin
Date and End Date format the actual start and end dates for the Report
Period date range. All 3 fields are globalized to enable country
localization. The globalized keys and values in the
DateRangeParameters.properties file must be copied into a .properties
file for a report to provide the globalized values for the report period.
47
Header: The topmost portion of the report is the header. It contains the
Tivoli banner and the IBM logo. This is visible in the master page.
A report can have more than one parameter table, with each additional
parameter table placed below the previous table. To add a second
parameter table, select the second row of the report introduction grid that
contains the parameter table. Right-click and select Insert -> Row ->
Below. Copy the contents of the second row into this new third row, and
modify the data accordingly.
Footer: This contains the date and time when the report was generated,
as well as the page number. This is visible in the Master Page.
48
Header
Report
Introduction
Section 1
Section 2
G
ri
Report
Description
Footer
4.4.1
49
The parameter table is a grid using the paramtable style. It contains name-value pairs. The
parameter names are text elements using
param-name style and parameter value are
data elements using the param-value style.
6. Click any text element in the report layout to change its contents. In the
Properties Editor, select the Localization option, then click on the
button next to the Content Key textbox. This will open up the Select Key
dialog. Choose a key in the list or add a new key-value pair. Click OK.
The text will show up on the text element.
7. Select and delete elements that you do not wish to use. For example, all
the reports contain an optional report description at the bottom of the
report. If you do not want a report description, select the grid and delete
it.
8. To modify the report description:
a. Double-click on the text element in Row1 of the last grid.
b. Enter the report description text.
9. To add parameters, follow these steps for each parameter:
50
c.
On clicking Next, the Data Set Editor opens up, where SQL
queries can be entered. All the tables under the connected data
source show up. You can select column and table names by
clicking on them in the tree view of the data source. To create
dynamic queries refer to the DynamicQuery sample report.
Queries can be bound to parameters defined in the reports.
51
11. Double-click on any report element to open the element editor for that
object. To modify tables and charts follow the instructions in the following
sections.
4.4.2
52
Follow the instructions in the previous section, Using TCR Templates, to modify
the Report Introduction, Section Heading and Report Description. If you are not
using multi-column headers, delete Section 2. Else delete Section 1.
The second row of Grid 2 of this template contains a table that uses the tablewithout-group style. The header cells uses the table-header-cell style. The
details row uses the table-details style. If you want to use a footer for the table,
use the table-footer-cell style.
The second row of Grid 3 of this template contains a table that uses the tablewithout-group style. The first header cells use the table-header-cell style. The
second header cells use multi-column-heading-secondary-header style. The
Copyright IBM Corp. 2007, 2008
53
font has been forced to disable bold inherited from the default table-header-cell
style. Also a bottom border of color white (#FFFFFF) is added to the first header
row cells. The details row uses the table-details style. If you want to use a
footer for the table, use the table-footer-cell style.
To modify any of the table contents:
1. Add your data source and data set to the report design. If you are using
scripts to retrieve your data, continue to do so. Copy and paste your
scripts from your existing reports. In the TCR templates, the data source
is in a common library called the product library. It is recommended to
put your products main data source in a common library so that changes
can be made at one place.
2. If you have parameters that alter the database query for your report, link
them to the query. First, double-click your dataset. Then go to
Parameters, select a parameter, and link it to the report parameter by
clicking on the Link to Report Parameter column and entering the name
of the parameter to link to.
3. Select the table. In the property editor select the Binding tab. In the Data
Set field, select the dataset with which you want to associate your table.
When prompted about clearing existing data field information, click Yes.
4. Delete the existing data information from the details cell in the table. Go
to the Outline view. Select the column in the data set that you want to
display in the table. Drag and drop that data to the column.
5. Change the text in the table header to match your new column heading.
You can provide a tooltip for each column heading to explain what data
each column contains by using the title attribute in the div tag. Use the
property editor localization option to set the value.
6. Insert or delete columns to the right or left as needed. For a new column,
insert a text element in the column header. To do this, click on the cell,
click on Text in the Palette view on the left and click on the cell again.
Enter the column header name using the property editor localization
option to set the value. Optionally, you can add a tooltip and text directly
into the field, using the getNLS script function to localize the value, in a
similar format as for parameters above. (See the parameters in the chart
template for an example.) Make sure your new column cells use the
correct styles: the header should use TCRTheme_v<n>.table-headercell, and the details use TCRTheme_v<n>.table-details style.
If you have created a table from scratch, follow these steps to apply the correct
styles:
1. Apply the table-without-group style to the table
2. Select all cells in the table header by clicking on one cell and then
dragging the + sign across the other cells in the header. Note that if you
select the entire header row by clicking on the table outline, it will select
the header row as a whole and will not apply the style to individual cells.
Right-click and select Style -> Apply Style -> TCRTheme_v<n>.tableheader-cell.
3. Select all cells in the table details by clicking on one cell and then
dragging the + sign across the other cells in the details row. Note that if
you select the entire details row by clicking on the table outline, it will
select the details row as a whole and will not apply the style to individual
54
cells. Right click and select Style -> Apply Style ->
TCRTheme_v<n>.table-details.
4.4.3
55
Follow the instructions in the previous section, Using TCR Templates, to modify
the Report Introduction, Section Heading and Report Description.
The first group of the table uses section style. The header
text for this group uses section-title style.
56
57
click on Text in the Palette view on the left, and click on the cell again.
Enter the column header name using the property editor localization
option to set the value. Optionally, you can add a tooltip and text directly
into the field, using the getNLS script function to localize the value, in a
similar format as for parameters above. See the parameters in the chart
template for an example to do this..
4.4.4
58
Follow the instructions in the previous section, Using TCR Templates, to modify
the Report Introduction, Section Heading and Report Description.
Row 2 of Grid 2 contains a single cell, containing all four chart formats with the
cell. Choose which chart format you want to use. Click on the other charts in the
editor to select them, and then press the Delete key to delete them.
If you chose to use a Pie Chart, modify the chart contents as follows:
1. Add your data source and data set to the report design. If you are using
scripts to retrieve your data, continue to do so. Copy and paste your
scripts from your existing reports.
2. Double-click on the chart to open the Chart editor. Go to the Select Data
tab. Select the data set you want to use by clicking on the Use Data Set
radio button and selecting the data set from the drop down box. The
data you selected is available for preview.
3. Drag the column header you want in the value to the Slice size
definition on the left.
4. Drag the column header you want as the category to the Category
Definition.
5. You can set an optional grouping in the Optional Grouping section on
the right.
6. The slice outline is white in color and 1 pixel by distance. This
information is available in Format Chart tab -> Series -> Value Series.
Copyright IBM Corp. 2007, 2008
59
60
2. Double click on the chart to open the Chart editor. Go to the Select
Data tab. Select the data set you want to use by clicking on the Use
Data Set radio button and then selecting the data set from the drop-down
box. The data you selected is available for preview.
3. Drag the column header you want in the value to the Value (Y) Series
on the left.
4. Drag the column header you want as the category to the Category (X)
Series.
5. You can set an optional grouping in the Optional Y Series Grouping
section in the right.
6. All labels along the X axis and Y axis should use the default chart font. If
the strings are longer than 10 characters, they should be rotated to an
angle of 45 degrees. To rotate a label, go to the Format Chart tab ->
Chart Area -> X-Axis or Y-Axis. Click the Text Format button. In the
Label section, click the button with the 3 dots next to the Font text box.
In the rotation area, turn the needle to -45 degrees for the horizontal axis
(normally the X-Axis) and 45 degrees for the vertical axis (normally the
Y-Axis). This will result in the text being aligned at correct angle..
7. To add interactivity to your chart data, click on the Interactivity button on
the value series, choose event Mouse Over and action Show Tooltip.
Enter the tooltip text that you want to show.
8. Adding axis markers: Add markers to denote the acceptable range for
the data. Go to Format Chart tab -> Chart Area -> Y-Axis. Click the
Markers button. A range is already added for demonstration purposes. In
the Marker Properties section, enter the start value and end value of the
range to specify your acceptable limits.
9. Do not change the colors on the series palette. Refer to Chapter 5 for
series palette. For status based coloring refer to the
StatusBasedColoringOfChart sample.
10. All text on the chart should use the default chart font. Only axis titles are
bold. Use the localization options in the chart editor to change the fixed
text information.
If you chose a Area Chart, modify the chart contents as follows:
11. Add your data source and data set to the report design. If you are using
scripts to retrieve your data, continue to do so. Copy and paste your
scripts from your existing reports.
12. Double-click on the chart to open the Chart editor. In Select Chart
Type section, Select Sub-type is stacked by default. You can change
that for your needs. Go to the Select Data tab. Select the data set you
want to use by clicking on the Use Data Set radio button and then
selecting the data set from the drop down box. The data you selected is
available for preview.
13. Drag the column header you want in the value to the Value (Y) Series
on the left. You can add multiple series by adding new Series from the
drop down list and then dragging the column header over to the series
text box.
14. Drag the column header you want as the category to the Category (X)
Series.
61
15. You can set an optional grouping in the Optional Y Series Grouping
section in the right.
16. All labels along the X axis and Y axis should use the chart default font. If
the strings are longer than 10 characters, they should be rotated to an
angle of 45 degrees. To rotate a label, go to the Format Chart tab ->
Chart Area -> X-Axis or Y-Axis. Click the Text Format button. In the
Label section, click the button with the 3 dots next to the Font text box.
In the rotation area, turn the needle to -45 degrees for the horizontal
axis (normally the X-Axis) and 45 degrees for the vertical axis (normally
the Y-Axis). This will result in the text being aligned at the correct angle.
17. To add interactivity to your chart data, click on the Interactivity button
on the value series; choose event Mouse Over and action Show
Tooltip. Enter the tooltip text that you want to show.
18. Do not change the colors on the series palette.
19. Go to Format Chart -> Series. Rename the series.
20. Click on each individual series. Select the color of the line to match the
corresponding color in series palette representing the series.
21. All text on the chart should use the default chart font. Only axis titles are
bold. Use the localization options in the chart editor to change the fixed
text information.
If you chose any other chart type supported by BIRT (other than line chart, bar
chart, or pie chart), do the following:
1. Add your data source and data set to the report design
2. Copy one of the TCR charts (bar chart) to your cell.
3. Double-click on the chart to open the Chart editor. Go to Select Chart
Type tab. Select the chart type you wish to use.
4. Go to the Select Data tab. Select the data set you want to use by clicking
on the Use Data Set radio button and then selecting the data set from
the drop down box. The data you selected is available for preview.
5. Drag the column header you want in the value to the Value (Y) Series
on the left. Add multiple value series as required by your chart type or
add appropriate data.
6. Drag the column header you want as the category to the Category (X)
Series.
7. You can set an optional grouping in the Optional Y Series Grouping
section in the right.
8. All labels along the X axis and Y axis should use the chart default font. If
the strings are longer than 10 characters, they should be rotated to an
angle of 45 degrees. To rotate a label, go to the Format Chart tab ->
Chart Area -> X-Axis or Y-Axis. Click the Text Format button. In the
Label section, click the button with the 3 dots next to the Font text box.
In the rotation area, turn the needle to -45 degrees for the horizontal axis
(normally the X-axis) and 45 degrees for the vertical axis (normally the Yaxis) . This will result in the text being aligned at correct angle..
9. Adding axis markers: Add markers to denote the acceptable range for
the data. Go to Format Chart tab -> Chart Area -> Y-Axis. Click the
Copyright IBM Corp. 2007, 2008
62
63
<Green>217</Green>
<Blue>0</Blue>
</Entries>
</SeriesPalette>
For status-based coloring, refer to the StatusBasedColoringOfChart
sample.
12. All text on the chart should use the default chart font. Only axis titles are
bold. Use the localization options in the chart editor to change the fixed
text information.
4.4.5
64
Row 2 of Grid 1 contains a single cell, containing all three chart formats with the
cell. Choose which chart format you want to use. Click on the other charts in the
editor to select them, and then press the Delete key. Row 3 contains the table.
To modify the chart contents, follow the instructions given in the Using the Chart
Template subsection.
To modify the table contents, please follow the instructions given in Using the
Table Template and Using the Group Table Templates subsections.
65
66
4.5.2
67
The ChartsWithDrillthrough report contains a pie chart, line chart, and bar chart
(their visibility controlled by parameters), with the option to drill through to a subreport by clicking on values.
The master report looks like this:
68
To see how interactive features are added to the chart, double-click the chart. Go
to the Format Chart -> Value (Y) Series. Click the Interactivity button.
Select Event Mouse Click and Action Hyperlink. Click Edit Base URL button.
Note that the Drill-through radio button has been selected. The details of the
sub-report are provided. In this report, the sub-report is
ChartsWithDrillthrough_subreport. The report parameter of the drill-through
report maps to a row value of the chart. The chart plots Total Orders grouped by
product line. On clicking on a product line, the Product Details report is
generated, which contains the orders for the different products in that product
line. In the Values column, enter the report parameter and the expression to pass
a value from the higher level report to the drill-through report.
This report sample also shows how you can present the same data in different
ways. The pie chart, bar chart, and line chart represent the same data. There is a
parameter to select the type of chart you want to show. For example, if you select
the pie chart, the bar chart and line chart are hidden. The visibility of the charts is
controlled by the Visibility option in the properties editor.
Follow the instructions in the sections above in order to create a report from a
template that contains a chart. Use the instructions below to add interactive
features.
69
4.5.3
A hidden parameter, Sort By, is defined for this report. The sorting condition for
the table is: row[params["Sort By"]], direction ascending.
The labels on the column heading have drill-through links to the same report,
passing the column name to the parameter Sort By and opening the drill-through
report in the same window.
4.5.4
70
71
4.5.5
72
parameter grid is hidden, with an option to expand Parameter Group 1. Below the
chart, there is a similar option to expand details.
Clicking either link causes the hidden grid or table to become visible, as shown in
the next figure.
The purpose of this behavior is to initially show the main data while hiding
unnecessary details until they are needed. However, this ability is supported only
in HTML versions of the report; in PDF output, all sections are visible.
73
In the report design, note the grid containing the optional images and text
elements.
In the property editor, the two images are bookmarked as follows:
(tcr_common/images/expand.gif): collapsePGImage_2
(tcr_common/images/collapse.gif): expandPGImage_2
The text elements Expand Details and Collapse Details have been
bookmarked as expandPGText_2 and collapsePGText_2 respectively.
The table or grid to be hidden is also bookmarked.
The link for expanding uses the following JavaScript script:
javascript:var currTab=document.getElementById('--<bookmark
of table/grid to be hidden>--');
currTab.style.display='block';
document.getElementById('expandPGText_2').style.display='no
ne';
document.getElementById('collapsePGText_2').style.display='
block'; void(0)
document.getElementById('collapsePGImage_2').style.display
= 'block';
Copyright IBM Corp. 2007, 2008
74
document.getElementById('expandPGImage_2').style.display =
'none';
The link for collapsing uses the following script:
javascript:var currTab=document.getElementById('--<bookmark
of table/grid to be hidden>--');
currTab.style.display='none';
document.getElementById('expandPGText_2').style.display='bl
ock';
document.getElementById('collapsePGText_2').style.display='
none';
document.getElementById('collapsePGImage_2').style.display
= 'none';
document.getElementById('expandPGImage_2').style.display =
'block'; void(0)
The expand and collapse images are hidden in PDF output. This can be seen
in the visibility of the property editor.
To hide the table or grid when the report is initially viewed in HTML, this code
snippet in the OnCreate method of the table or grid is used:
if (reportContext.getOutputFormat() == "html" )
this.getStyle().display="none";
4.5.6
75
4.5.7
4.5.8
76
4.5.9
77
78
79
The table footer consists of 2 rows. The first row contains a total count of product
lines and a total number of orders; the second row contains a calculated average
number of orders for each product line. Each footer row uses the table-footercell style from the Tivoli Common Reporting library.
In the Eclipse/BIRT designer, the layout for this report is as follows:
80
The data items for Total and Average use built-in BIRT JavaScript functions
accessible from the Expression Builder:
81
end dates. The user can choose from the predefined list of date ranges or enter
a specific set of dates.
82
Note that the Report Period is displayed in the report output in the same format
used in the parameter selection list, and also as the calculated Start Date and
End Date. (This sample output shows no displayed records because none
matched the specified date range.) If both a beginning date and an end date are
entered on the parameter prompt, the reporting period is ignored, and the
specified beginning and end dates are used.
The scripting that implements this feature is in the beforeOpen() method of the
CustomerPayments data set:
// Filter on Report Period
var report_period =
reportContext.getParameterValue("Report Period");
if ((report_period != null) && (report_period != ""))
{
ModifyQueryAddDateRangeFromGroupValues (this,
"pay.PAYMENTDATE", report_period, dateToString,
params[Begin Date].value, params[End
Date].value);
}
The ModifyQueryAddDateRangeFromGroupValues() method is defined in
the ModifyQuery.js script library file. The this object refers to the data set and
is required in order to provide the context for the data set query within the
ModifyQueryAddDateRangeFromGroupValues() method.
This script changes the original query from:
SELECT cus.CUSTOMERNAME,
pay.PAYMENTDATE,pay.CHECKNUMBER,pay.AMOUNT
FROM CUSTOMERS cus, PAYMENTS pay
WHERE cus.CUSTOMERNAME = 'AV Stores, Co.' AND
cus.CUSTOMERNUMBER = pay.CUSTOMERNUMBER
ORDER BY cus.CUSTOMERNAME,
pay.PAYMENTDATE,pay.CHECKNUMBER
Copyright IBM Corp. 2007, 2008
83
To:
SELECT cus.CUSTOMERNAME,
pay.PAYMENTDATE,pay.CHECKNUMBER,pay.AMOUNT
FROM CUSTOMERS cus, PAYMENTS pay
WHERE pay.PAYMENTDATE between '3/24/2007' and
'6/22/2007' AND cus.CUSTOMERNAME = 'AV Stores, Co.'
AND cus.CUSTOMERNUMBER = pay.CUSTOMERNUMBER
ORDER BY cus.CUSTOMERNAME,
pay.PAYMENTDATE,pay.CHECKNUMBER
In addition, the report output uses JavaScript to display the beginning and end
dates in the report parameter section. The easiest way to use these elements is
to drag and drop the Begin Date and End Date parameter data items from the
Report Items in the TCR library to the layout view of the report design. The
parameter names are also included as text elements in the TCR library and can
be dragged onto the layout view of the report design.
The Begin Date data item (typically dragged from the TCR library into the report)
contains the following expression, which calculates the date from the entered
parameters:
getStartDateFromGroupNames(Report Period, Begin Date,
End Date);
The End Date field is calculated in a similar fashion from the
getEndDateFromGroupNames() method.
84
Customer City selects customer cities, where the country matches the
value of the country parameter.
The Employee Location group is based on a single dataset. This dataset selects
both territory and city from the customer table. In the parameter group, you can
specify the columns to cascade.
85
This sample demonstrates how a value from one dataset can be used in another
dataset.
The ProductlineSales dataset computes the total sales for a particular product
line (specified using a parameter). This value is stored in the hidden parameter
ProductlineTotalSales.
The ProductSales dataset retrieves the total sales for each product under a
specific product line. This dataset also contains a computed column called
PRODUCTSALESPERCENT, which is product sales as a percentage of the total
sales of the product line.
This computed column is calculated as
TOTALSALES/param["ProductLineTotalSales"]*100.
Thus a value computed by one dataset can be used in another. For the first
dataset to compute the value, it must be bound to a report element and be called
before the second dataset. In this sample, the first dataset is called when the
Total Sales data shown below the section subtitle is used.
86
87
The background color to highlight the cells is handled by setting the color in an
"onCreate" script action on the report cell containing both the icon and the text
value. You can access this "onCreate" method by selecting the cell in the outline
view and then clicking on the Scripts tab in the editor space. You can also set
the cell color on the Highlight tab of the cell properties editor, rather than using a
script.
To show accessing the icons in a different way, the second time the icons are
shown in the report, they are displayed using a dynamic text value. The dynamic
text value calls a global script, defined in the report "initialize" method, that
returns the properly formatted HTML image tag.
88
4.6 Scripts
The tcr_common/scripts folder contains collections of Javascript functions which
can be used in report designs. These scripts can be called from the Expression
Builder and used with almost any Text or Data item in a report. In addition, they
can be called from customizable methods of the report, such as beforeFactory(),
beforeRender(), or beforeOpen() of a data set.
To make the scripts available to a report, one or more includeScripts properties
must be included in the report design file. These cannot be added using the
Eclipse/BIRT designer; you must add them manually. To do this, use the XML
view of the Eclipse Report Design editor. The property elements should be
added near the beginning of the .rptdesign file, before any parameter elements:
<list-property name="includeScripts">
<property>tcr_common/scripts/ReportUtils.js</property>
<property>tcr_common/scripts/DateTime.js</property>
<property>tcr_common/scripts/ModifyQuery.js</property>
</list-property>
Note that the path to each script is based on the resources directory defined for
the project in the Eclipse/BIRT environment.
Most of the Tivoli Common Reporting templates and sample reports contain the
includeScripts property list. Include only those scripts required by the report.
Scripts are organized into .js files. The script files currently included with the
TCR style package are:
4.6.1
ReportUtils.js
General purpose methods such as trimString(), getNLS(), setReportTitle(), and
setRowCount().
4.6.2
DateTime.js
Date and time conversion and formatting functions. Use these methods to
convert between Java dates and times (used in BIRT) and Candle Data
Warehouse date and time strings. This script also implements conversion of
standard Report Period parameters to start and end date or time values.
89
4.6.3
ModifyQuery.js
Methods to modify a data set SQL query by adding or modifying a WHERE
clause. The generic ModifyQueryAddFilter() method can be used to add any
conditional expression to an existing query. The ModifyQueryAddDateRange()
method adds a date range condition to a query, the
ModifyQueryCandleDateRange() method modifies an existing filter condition that
uses Candle date or time string format and the
ModifyQueryCandleDateRangeFromGroupValues() modifies an existing filter
condition that uses Candle date or time string format with the values from the
DateRange parameter group.
4.6.4
Logger.js
Methods to log from anywhere within a report design. The
DateRangeParameters sample demonstrates the use of the logger script.
90
Section 5Best
5Best Practices
5.1 Projects and Libraries
To enable smooth integration into the Tivoli Common Reporting software, you
must use a consistent directory structure for your project. For each product,
create a separate directory structure starting with your product name. This
directory will prevent name collisions for .properties files or images used by
different products sharing a Tivoli Common Reporting server.
Each project should have a folder structure as shown below:
Directly underneath the project directory are the report design files (*.rptdesign),
a resources folder, and an optional templates folder.
Underneath the resources folder are two additional folders: a product-specific
resource folder, and the tcr_common folder, containing the Tivoli Common
Reporting style package files. The tcr_common folder can be created from
within the Eclipse SDK by copying the folder with that name from the TCR project
folder you created when you imported the TCR files.
Within each resources sub-folder are additional folders, as needed:
lib
images
properties
91
scripts
When working in a BIRT project in Eclipse, set the default resources folder (via
Window -> Preferences -> Report Design -> Resource) to the resources folder
immediately underneath the project folder. This way, your report designs will
have access to both product-specific and TCR resources.
Report Title: The title of the report appears in the browser title bar when viewed as
HTML. The report title is usually entered in the Title field of the properties editor.
However, the text entered here is static.
Report Description: The description is useful for explaining the purpose of the report.
This is optional. The descriptions in the sample reports and templates show how the
description might be used.
92
5.3.1
5.3.2
93
5.3.3
5.3.4
94
this.name=getNLS("<report_element_key");
For charts, insert the following code snippet in the beforeFactory method of the
report:
this.getReportElement("Pie Chart").name =
getNLS("<pie_chart_key");
this.getReportElement("Bar Chart").name =
getNLS("bar_chart_key");
this.getReportElement("Line Chart").name =
getNLS("line_chart_key");
5.4.1
Qualifier
Required
Description
Example
PRODUCT
Yes
tbsm
VERSION
No
v4
95
No
r2
Using this convention, the following are examples of valid JNDI names:
java:comp/env/jdbc/ibm/tivoli/tbsm
java:comp/env/jdbc/ibm/tivoli/itm/v6
java:comp/env/jdbc/ibm/tivoli/itm/v6/r2
96
5.6 Timestamps
5.6.1
Timestamps in Charts
The timestamps on charts should use the BIRT Short Date format:
MM/DD/YY hh:mm a
An example of this format is 08/30/07 12:33 PM.
To specify this format with the chart editor, go to Format Chart -> X-Axis.
Select Type as DateTime. Click the Format Editor button next to the type
field. Select Standard, Short in the Type field, and Date Time in the Details
field.. This timestamp format can be localized.
97
5.6.2
5.6.3
Timestamp in Footer
Timestamps in footers should use the BIRT General Date format:
MMMM d, yyyy h:mm:ss a z
An example of this format is August 30, 2007 4:05:12 PM EDT
98
5.7 Charts
The following recommendations apply to charts:
1. Limit bar charts to 5-10 result rows to avoid the chart becoming too
crowded and difficult to read. Two strategies to achieve this are as
follows:
a. Show only Top 5 or Top 10 categories on the chart, even if you
show all data in an accompanying table.
b. Break down the result set into groups so that no group has more
than 10 result rows.
2. Add spacing between bars in a bar chart. To do this, double-click on the
chart in the BIRT designer, select the Format Chart tab, select Chart
Area, and then click General Properties. Change the Unit Spacing
value from 0 to a positive number such as 10, 20 or 30.
BIRT Designer
1. Use the Outline View. You can use the Outline view to navigate to specific items in
a report design. This is often easier than trying to select the item from the Layout
view, especially when items are layered on top of one another. This can be
particularly difficult in tables, where a Data item might be inside a cell, row, or grid.
The structure of a report design is more apparent in the Outline view than in the
Layout view.
5.8.2
Tables
1. Create Grouped Tables from Templates: If you created a report with a nongrouped table, and now want to add grouping, start with a new report created from
the appropriate TCR grouped table template. Manually converting the styles and
indentation of a non-grouped report to a grouped one can be very time consuming.
5.8.3
Charts
Control Legend Wrap: Longer labels in a chart legend might be truncated because
of space limitations, with the final characters of the label replaced by ellipses. To
prevent this, set a wrapping width value. Select Edit Chart -> Format Chart ->
Legend -> Layout. Change the Wrapping width value to 100; experiment with
different values if 100 does not produce the desired result.
Remove Marker Area: In many of the bar chart templates and samples, a Marker
area appears as a grey rectangle over the chart area. In some cases, this rectangle
might cover some other information. To edit or remove the Marker area, select Edit
Chart -> Format Chart -> Y-Axis -> Markers. From the Axis Markers dialog, you
can change the Marker Properties or remove the marker altogether.
Color bar charts and line charts based on data or series value: TCR styles
provide pre-defined status colors as shown in Chart Colors.To use these colors, you
can use scripts. Select the chart, go to its Scripts tab and insert the following code.
Modify the values in the conditions based on your need. In this example, val is the
99
status of a server (up, down or unknown). To choose more status colors refer to
Chart Colors
function beforeDrawDataPoint( dph, fill, context )
{
var val = dph.getOrthogonalValue();
//var val = dph.getSeriesValue();
if (val == down) //status color for critical
fill.set(183,68, 61);
else if(val == up) //status color for normal
fill.set(144, 213, 0);
else //status color for unknown
fill.set(182,146,182);
}
100
Appendix A Terminology
BIRT
The Eclipse Business Intelligence and Reporting Tools project. This is an open
source Eclipse-based reporting tool written in Java. It has two main components:
a report designer and a runtime component. BIRT also offers a charting engine
for adding charts to your own application.
BIRT Report Designer
This is one of the two major components of BIRT. It is a graphical tool that is
used to create report libraries, report designs and report templates.
BIRT Rich Client Platform (RCP) Report Designer
A stand-alone version of the BIRT report designer, containing the minimal set of
Eclipse dependencies for the report designer.
Cascading style sheet (CSS)
A file that defines a hierarchical set of style rules for controlling the rendering of
HTML or XML files in browsers, viewers, or in print.
Chart
A graphical view of data.
Data Set
The definition in a report library that contains information about the raw data that
will be used by a report design or report template.
Data Source
The definition in a report library that contains location information for report data
retrieval.
Eclipse Platform
An open source, standard platform for building integrated development
environments (IDEs) that can be used to create applications, such as Web sites,
embedded Java programs, or Enterprise JavaBeans. The platform discovers,
integrates, and runs the integrated modules called plug-ins that exist within its
environment.
Eclipse Perspective
A set of Eclipse views, menus, toolbars, and editors that are useful for a
particular tool. A user can switch between perspectives.
Eclipse Rich Client Platform
A framework for building Java applications containing a minimal set of dynamic
plug-ins.
101
Eclipse view
A panel on the Eclipse Workbench. Some examples are the error view, the
console view, the outline view.
Eclipse Workbench
The user interface and integrated development environment (IDE) in Eclipse and
Eclipse-based tools such as IBM Rational Application Developer.
Eclipse workspace
The collection of projects and other resources that the user is currently
developing in the Eclipse workbench. Metadata about these resources resides in
a directory on the file system; the resources might reside in the same directory.
Expression
The report-specific logic to convert raw data into useful information for a user.
Globalization
The process of developing, manufacturing, and marketing software products that
are intended for worldwide distribution.
Grid
One of the available items on the BIRT report designer palette. A grid is used to
display information in a row-and-column format and contains other report
elements.
Grid Element
An element of a grid.
Group
A set of data rows with at least one shared column value.
Group report
A report that arranges data in groups.
Group key
The data set column that is used to group data for a report.
Hyperlink
A reference in a report that, when clicked, connects you to another area on the
same report, or to another report.
Image element
A graphic item in a report project that can be used in a report template or a report
design.
Internationalization
The process of designing and developing a software product to function in
multiple locales.
Copyright IBM Corp. 2007, 2008
102
103
Notices
This information was developed for products and services offered in the U.S.A.
IBM may not offer the products, services, or features discussed in this document in
other countries. Consult your local IBM representative for information on the
products and services currently available in your area. Any reference to an IBM
product, program, or service is not intended to state or imply that only that IBM
product, program, or service may be used. Any functionally equivalent product,
program, or service that does not infringe any IBM intellectual property right may
be used instead. However, it is the users responsibility to evaluate and verify the
operation of any non-IBM product, program, or service.
IBM may have patents or pending patent applications covering subject matter
described in this document. The furnishing of this document does not give you
any license to these patents. You can send license inquiries, in writing, to:
IBM Director of Licensing
IBM Corporation
North Castle Drive
Armonk, NY 10504-1785 U.S.A.
For license inquiries regarding double-byte (DBCS) information, contact the IBM
Intellectual Property Department in your country or send inquiries, in writing, to:
IBM World Trade Asia Corporation
Licensing
2-31 Roppongi 3-chome, Minato-ku
Tokyo 106, Japan
The following paragraph does not apply to the United Kingdom or any other
country where such provisions are inconsistent with local law:
INTERNATIONAL BUSINESS MACHINES CORPORATION PROVIDES THIS
PUBLICATION AS IS WITHOUT WARRANTY OF ANY KIND, EITHER
EXPRESS OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
WARRANTIES OF NON-INFRINGEMENT, MERCHANTABILITY OR FITNESS
FOR A PARTICULAR PURPOSE.
Some states do not allow disclaimer of express or implied warranties in certain
transactions, therefore, this statement might not apply to you.
This information could include technical inaccuracies or typographical errors.
Changes are periodically made to the information herein; these changes will be
incorporated in new editions of the publication. IBM may make improvements
and/or changes in the product(s) and/or the program(s) described in this
publication at any time without notice.
Any references in this information to non-IBM Web sites are provided for
convenience only and do not in any manner serve as an endorsement of those Web
sites. The materials at those Web sites are not part of the materials for this IBM
product and use of those Web sites is at your own risk.
A-1
IBM may use or distribute any of the information you supply in any way it
believes appropriate without incurring any obligation to you.
Licensees of this program who wish to have information about it for the purpose
of enabling: (i) the exchange of information between independently created
programs and other programs (including this one) and (ii) the mutual use of the
information which has been exchanged, should contact:
IBM Corporation
2Z4A/101
11400 Burnet Road
Austin, TX 78758 U.S.A.
Such information may be available, subject to appropriate terms and conditions,
including in some cases payment of a fee.
The licensed program described in this document and all licensed material
available for it are provided by IBM under terms of the IBM Customer Agreement,
IBM International Program License Agreement or any equivalent agreement
between us.
This information contains examples of data and reports used in daily business
operations. To illustrate them as completely as possible, the examples include the
names of individuals, companies, brands, and products. All of these names are
fictitious and any similarity to the names and addresses used by an actual business
enterprise is entirely coincidental.
Trademarks
IBM, the IBM logo, ibm.com, DB2 and Tivoli are trademarks or registered
trademarks of International Business Machines Corporation in the United States,
other countries, or both.
Microsoft and Windows NT are registered trademarks of Microsoft Corporation in
the United States, other countries, or both.
Other company, product, and service names may be trademarks or service marks
of others.
A-2
Printed in USA
SC23-8861-01
Report parameter
User input provided for a report, controlling the running and display of the report.
Report package
A collection of associated report designs and resource files that are organized
into a Tivoli recommended file structure for simplified importing into Tivoli
Common Reporting. A unique report package is usually created for each product.
Report style package
The report package provided by Tivoli Common Reporting containing Tivoli
recommended styles, templates and samples. These elements can be used as a
base in developing specific product or customer-focused reports.
Report template
A file containing a reusable report design. Templates are created and updated
with the BIRT report designer. The file extension for a template is .rptemplate.
Script editor
An Eclipse editor that allows the report designer to input JavaScript code for a
report element.
Style
A set of properties that control the appearance of report items.
Text element
A report item that displays user text.
Theme
A set of related styles.
104