HP Storage Essentials Storage Resource Management Report Optimizer Software 6.0 Building Reports Using the Web Intelligence Java Report Panel (August 2008)

Building Reports Using the Web Intelligence Java Report Panel 343
22
Saving formulas as variables
Overview
Creating custom calculations” on page 307 describes Web Intelligence custom
calculations and using formulas as part of calculations. You can create formulas directly in
a report cell, but it is often better to save a formula as a variable. By saving a formula as a
variable you can reuse it throughout the reports in a document without the need to
continually retype it.
This chapter shows you how to save formulas as variables and use them in reports. It
contains the following sections:
Creating, editing, and deleting variables
Using variables to simplify formulas
Creating, editing, and deleting variables
Creating custom calculations” on page 307 describes how you can create custom
calculations beyond the simple calculations provided by Web Intelligence. Calculations
are formulas that can include base report objects and functions. Web Intelligence allows
you to save a formula as a variable; a variable is simply a named formula. Saving
formulas as variables has the advantages of:
allowing you to re-use a formula in a report without the need to re-create it each time
simplifying complex formulas by breaking them down into variables
Example: Showing the amount of revenue generated per guest
You have a report that contains [Revenue] and [Number of Guests] objects. The formula:
[Revenue] /[Number of Guests]
gives the average revenue per guest. If you save this formula as a variable called Average
Revenue, you can re-use it throughout a report.
Creating formulas
Variables and formulas are closely linked because variables are named formulas. To find
out how to create a formula, see ”Creating formulas” on page 307.
Saving formulas as variables
There are two ways of saving a formula as a variable:
using the
Create Variable dialog box – you save an existing formula as a variable