The CSS Class Name property specifies the user-defined style to be applied to a report or report object when generating HTMLCSS output. This property, along with the Style Sheets and CSS ID properties, enables you to easily apply user-defined styles to your reports and report objects for HTMLCSS report output.
Applies to |
Reports, frames, repeating frames, text boilerplate, fields, file link objects. |
Values |
Any text string, not to exceed 1024 characters; without any special characters. |
Required/Optional |
Optional |
The user-defined style specified by this property must be defined in one of the style sheets specified by the Style Sheets property.
If you set the CSS Class Name property at the report level (in the Property Inspector for the report), the styles are inherited by all report objects contained in the paper layout. However, if you specify the CSS Class Name property or the CSS ID property for a particular report object (a frame, repeating frame, text boilerplate, field, or File Link object), the styles are generally applied only to that object, and in most cases are not inherited by child object(s).
Both the CSS ID property and the CSS Class Name property apply styles to text objects. The difference is that CSS ID specifies a style that is defined for a text object that will be manipulated in the report output by JavaScript or Dynamic HTML (DHTML). If the text objects in your report output will be used with JavaScript or DHTML, use the CSS ID property to specify the user-defined style for the text object; otherwise, use the CSS Class Name property.
The CSS Class Name property can only be set to global styles defined in
the style sheet with a .
prefix. You can not set this property
to styles defined for specific tags.
For frames and repeating frames, only background styles such as background-color, border-width, and so on, are applied. Text styles are not applicable for frame and repeating frame objects.
When you save a report as JSP, HTML, or XML, the value of this property
is saved as part of the report definition through the new cssClass
attribute of the object's tag.
When the CSS Class Name property is specified for an object, design-time style (including conditional formatting style) is ignored and only user-defined style can be applied to the object.
For example, if the design-time style is defined as:
font:bold 9pt Arial italic; color:blue
And the user-defined style specified by CSS Class Name is defined in the external style sheet as:
font:10pt Times New Roman; background-color:yellow
Then the style of the text object to which the CSS Class Name property is applied will look like this (design-time style is ignored and only user-defined style is applied):
my text
The style attributes for the user-defined styles specified by the CSS ID and CSS Class Name properties are merged when formatting a text object. If the same attribute is defined in both, then the style specified by CSS ID will take precedence.
For example, assume that the CSS Class
Name property is set to SalStyle
and the CSS ID property
is set to SalID
.
SalStyle
is defined in the external style sheet as:
font: bold 9pt Arial italic; color:blue
SalID
is defined in the external style sheet as:
color:red
;
The output of the text to which these properties are applied will look like this:
my text
<div>
tags to
apply the style definition to the object, as follows:<div
style=top:
left:
...
class=ClassNameForObject_1>
object_1_data
</div>
<div
style=top:
left:
...
class=ClassNameForObject_2>
object_2_data
</div>
.
.
<div
style=top:
left:
...
class=ClassNameForObject_n>
object_n_data
</div>
A valid CSS Class Name property setting: StyleClassName1
Note: .StyleClassName1
must be defined in a style
sheet specified by the Style Sheets property.
USERSTYLES
command line keyword
Copyright © 1984, 2005, Oracle. All rights reserved.