A script-enabled browser is required for this page to function properly.

<exception> XML tag

The <exception> tag delimits a formatting exception that you want to apply to a field (for example, the field should turn red when the value exceeds some limit). The <exception> tag must be nested within a <field> tag. It must also have a <condition> tag nested within it that defines the condition under which to apply the formatting exception.

Syntax

<exception 
  [lineColor="color_name | noLine"]
  [fillColor="color_name | noFill"]
  [textColor="color_name"]
  [hide="yes | no"]
  [font="font_name"]
  [fontSize="point_size"]
  [fontStyle="regular | italic | bold | boldItalic"]
  [fontEffect="regular | strikeout | underline 
     | strikeoutUnderline"]>
  condition_definition
</exception>

Parameters /Options

Description

lineColor

Is the name of the border color to apply when the condition is met. If noLine is specified, then the border is transparent (that is, invisible).

fillColor

Is the name of the fill color to apply when the condition is met. If noFill is specified, then the background is transparent.

textColor

Is the name of the text color to apply when the condition is met.

hide

Determines whether to hide the field when the condition is met.

yes

the field is hidden when the condition is met.

no

the field is not be hidden when the condition is met.

font

Is the name of the font to apply when the condition is met.

fontSize

Is the size of the font to be used when the condition is met.

fontStyle

Is the style of the font to be used when the condition is met.

fontEffect

Is the effect of the font to be used when the condition is met.

Usage notes

Example

The following example shows two formatting exceptions for field f_ename. The first exception changes the text color to red if both of its conditions are met. The second exception changes the text color to blue if its condition is met.

<field name="f_ename" source="ename" 
  label="Employee" textColor="green">
  <exception textColor="red">
    <condition source="deptno" operator="btw" 
       operand1="1" 
       operand2="20" relation="and"/>
    <condition source="sal" operator="gt" 
       operand1="1000"/>
  </exception>
  <exception textColor="blue">
    <condition source="deptno" operator="eq" 
       operand1="30"/>
  </exception>
</field>

See also

About XML in reports

Oracle Reports XML tags