Specifies a rule for highlighting values in numeric data cells.
<blox:cellAlert
index="cellAlertNumber"
apply="row|column|cell"
background="background"
condition="condition"
description="description"
enabled="enabled"
font="font"
foreground="foreground"
format="formatMask"
group="groupName"
Image="Image"
Image_align="left|right|center"
link="link"
scope="scope"
value="value1"
value2="value2"
/>
where:
| Attribute | Required? | Description |
|---|---|---|
| apply | No | The area of the grid subject to highlighting. Possible
values:
|
| background | No | The cell’s background color. Use a color name or hexadecimal value. |
| condition | Yes | A condition to apply to the cell value. Cells that meet
the condition activate the alert. Possible values:
The following possible values work together with the value and value2 attributes:
|
| description | No | A description of the cell alert. This description appears as a tool tip when the user hovers the mouse pointer over the cell. |
| enabled | No | Specifies whether the cell alert is active. Set to false to disable a cell alert. The default is true. |
| font | No | The font name:style:point use for the cell’s text.
If any of the three attributes is not specified, the default or the currently inherited font value is applied. However, the colons separating the attributes should be included. For examples: font="Arial:bolditalic:12" font=":Bold:12" |
| foreground | No | The cell’s text color. Use a color name or hexadecimal value. |
| format | No | Format mask to apply to cell data. |
| group | No | The name of a group of cell alerts to be treated as a traffic lighting group. Cell alerts with the same group name will show up as one set of traffic lights in the traffic lights creation and management user interface. |
| Image | No | A custom Image that points to the defined link. If you define a link but do not specify a custom Image, a default Image information Image is displayed. The URL to the Image can be either absolute or relative:
|
| Image_align | No | Sets the position of the custom Image specified by the Image attribute.
Valid values are:
|
| link | No | A hyperlink for HTML rendering or a call to a JavaScript™ method.
When the link is to a URL, it always opens in a new window. The
following entities in the link value are replaced by the indicated values
when the link is generated. Entities must start with an ampersand (&)
and end with a semicolon (;).
In the following example, the link for the cell alert is set to:
link="decoderequest.JSP?row=&RowHeader;&column= &ColHeader;&value=&Value;&rowIndex=&RowIndex;&col Index=&ColIndex;" If the cell with the value of 1234.55
on the third row of the Time dimension and the fourth column of the Product
dimension is clicked on, the URL passed through will be:
decoderequest.JSP?row=Time=Q3&column=Product=Chocolate%20 Nuts&value=1234.55&rowIndex=2&colIndex=3 |
| scope | No | The cells to which the alert should be applied, specified
as a series of dimension and member sets enclosed in braces. Use unique names
to ensure the right member is found. In Essbase, using display names will
not work if DataBlox’s useAliases is set to false (users
can set this through the user interface). For MSAS and Alphablox Cube Server
data sources, use unique names starting with the cube name to ensure the correct
member at the correct level is found. For SAP BW, always use unique names
starting with the query name. Using display names will result in data exception
or random data. The scope applies to all axes of the result set, not just the row and column axes. Specify the scope as follows: scope="{d0:m00[,m01,... m0n]} {d1:m10[,m11,...m1n]}..."
where d0 denotes a dimension and m00 denotes a member
within that dimension. For example, for Essbase:
scope={Product:Coke} {Scenario: Actual, Budget}
For
MSAS, Alphablox Cube Server, and SAP BW data sources:
scope="{[My Cube].[Product]:[Code]} {[My Cube].[Scenario]:
[Actual], [Budget]}"
For relational data sources, use "{columns: columnName [,columnName2,...]}". The following member search functions are available for specifying the
level of members the cell alert should be applied to:
|
| value | No | The value to compare when condition is LT, GT, EQ, LTEQ, GTEQ, or the lesser value when condition is BETWEEN. |
| value2 | No | The greater value when condition is BETWEEN. |
| index | No | The number of the cellAlert to define. If you do not specify this attribute, the next available cellAlert number is used. For instance, if cellAlerts 1-4 are already defined, cellAlert 5 is used. |
Cell alert formatting applies only to numerical content. The number of the cell alert dictates the order in which it is evaluated. Each data cell value is evaluated against all defined alerts, starting with the first cellAlert (index="1"), to the highest defined alert number. The first cell alert that matches the data cell's value and scope is the only alert applied to that cell. Be sure to define cell alerts in the appropriate order if there are overlaps.
<blox:cellAlert index="1"
condition="any"
format="#,###/1000;[red](#,###/1000)"
background="#3333FF"
scope="{Scenario: Budget}" />
For MSAS, Alphablox
Cube, and SAP BW, the scope should be scope="{[My Cube].[Scenario]:
[Budget]}.<blox:cellAlert index="3"
condition="any"
format="#'[red](#'%')"
background="#9999FF"
scope="{Scenario: Variance
For MSAS, Alphablox
Cube, and SAP BW, the scope should be scope="{[My Cube].[Scenario]:
[Variance %]}.<blox:cellAlert index="4"
condition="any"
format="#.##*100%;[red](#.##*100%)"
background="#CCCCFF"
scope="{Scenario: Variance %}"
font="Times New Roman:bold:14" />
PresentBlox.getGridBlox().setcellAlert(2, "condition=GT, value=1000,
scope={Market:Central}, foreground=green, background=white, align=right");
For
MSAS and SAP BW, the scope should be scope="{[My Cube].[Market]: [Central]}.<blox:cellAlert index="1"
condition="any"
background="cyan" />
This will apply a cyan background to all cells that contain numerical data. If a cell contains no data, this background color will not be applied.
<blox:cellAlert index="1"
condition="Between" value="1000" value2="3000"
format="00.00"
foreground="Orange"
scope="{[My Cube].[Market]:[East],[West],[South],[Central]}" />
<blox:cellAlert index="2"
condition="Between" value="3001" value2="5000"
scope="{[My Cube].[Year]:[Qtr1],[Qtr2]}"
format="00.00"
foreground="Blue" />
<blox:cellAlert index="3"
condition="GT"
value="5000"
format="00.00"
foreground="Magenta" />
<blox:cellAlert index="4"
condition="LT"
value="1000"
format="(00.00)"
foreground="Red" />

scope="{Accounts: Profit}"

scope="{Accounts: Profit, Sales}"
scope="{Accounts: not(COGS)}"

scope="{Accounts: Profit, Sales}, {Market:
East, West}"
or scope="{Accounts: not(COGS)}, {Market:
not(South)}"
