Brio Software
Technical Publications
Home Previous Next Index Glossary
Data Analysis and Reporting with Intelligence Clients

Expression Line

Use the Expression Line to apply and display aggregate functions and computing fields. For each item in a report, you can display its JavaScript syntax and modify it to fit your own needs.

Expression Line

The Expression line includes the following components:

Data Function
Shows available data functions that can be applied to table columns.
X icon
Cancels and removes a formula. This icon appears only when you enter syntax.
Check icon
Accepts and applies the formula. This icon appears only when you enter syntax.
Edit Bar
Used to display, enter, and edit a Javascript expression.


Expression Syntax

The following table lists the default syntax for Report section items.

Report Expression Syntax 

Report Element
Syntax
Table Dimension

CurrBreak.Value["Column Name"]

“Column Name” refers to the dimensional column name. The column name can be modified.
Table Fact
Tables["Section"].Columns 
["Column Name"].Sum[currBreak] 
“Section Name” refers to either the Results or Table section. Column Name refers to the fact column name. Sum refers to the return of underlying values and can also be an applied Data functions such as Avg, Max, and Min.
Group Label
CurrBreak.Value["Column Name"] 
“Column Name” refers to the dimension or fact column name.
Group Fact
Tables["Section"].Columns 
["Column Name"].Sum[currBreak] 
“Section Name” refers to either the Results or Table section. “Column Name” refers to the fact column name.
To apply a break at the parent level (the highest level), use the following syntax:

Tables["Section Name"] .Columns

["Column"].Sum[currBreak. Parent] 


Snapping Together Expression Syntax

You can concatenate report expression syntax with other JavaScript expressions to customize the content of labels, facts, and dimensions.

For example, if you wanted a group header to show a union of the Total label and the amount, you could insert a field in the Expression line to concatenate Total with the table fact syntax.

Example in the Expression line: "Totals:" + Format (Tables("Results").Columns("Amount").Sum(currBreak), "#,##0")

Or, you could insert a field to show the sum (or any other data function) of the column divided by the sum of the parent level expressed as a percentage.

Example in the Expression line: Format (Tables("Results").Columns("Amount").Sum(currBreak) / Tables("Results").Columns("Amount").Sum(currBreak.parent), "0%")

To use this feature, add the labels in a computed field.

*

Tip   In a Report section, you will often concatenate some text with a value. For example, you might want to see "Total Sales: $1,234.56" in a group footer instead of just the number. However, since you have concatenated text to the beginning of the number, you cannot set the number format in the traditional way (by using the Properties dialog box). Since you have a concatenated object, you need to set the number format using JavaScript.

To set a number format on a concatenated item, use the following syntax:

Format(number, mask)

where number is the value to format and mask is the number format mask to apply. Using the example above, your completed expression would appear as follows:

"Total Sales: " + 
Format(Tables("Results").Columns("Sales").Sum(currBreak), 
"$#,##0.00") 

Home  |  Previous |  Next  |  Index |  Glossary

Privacy/Legal | Copyright 2002 Brio Software, Inc.