The CSS ID property specifies the user-defined style to be applied to a text object when generating HTMLCSS output. This property, along with the Style Sheets and CSS Class Name properties, enables you to easily apply user-defined styles to your text objects for HTMLCSS report output.
Applies to |
Text boilerplate, file link objects (for which Source File Format property is set to Text). |
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), 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 a text object 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 ID property is used to uniquely identify the style for a text object in the HTMLCSS output for later processing (for example, in Javascript or DHTML). Thus, when you set the CSS ID property for a text object, you cannot use the same setting for another text object in the same report.
The CSS ID property can only be set to global styles defined in the style
sheet with a #
prefix. You nondefault set this property to
styles defined for specific tags.
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 cssId
attribute of the text object's tag.
When the CSS ID property is specified for a text object, design-time style (including conditional formatting style) will be ignored and only the user-defined style is applied to the object.
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 text object, as follows:<div
style=top:
left:
...
id=IdForTextObject_1>
text_object_1_data
</div>
<div
style=top:
left:
...
id=IdForTextObject_2>
text_object_2_data
</div>
.
.
<div
style=top:
left:
...
id=IdForTextObject_n>
text_object_n_data
</div>
A valid CSS ID property string: StyleIDName1
Note: #StyleIDName1
must be defined in a style
sheet specified by the Style Sheets property.
USERSTYLES
command line keyword
Copyright © 1984, 2005, Oracle. All rights reserved.