General ibi WebFOCUS StyleSheet Syntax

A StyleSheet consists of declarations that identify the report components you wish to format and the formatting you wish to apply. A declaration usually begins with the TYPE attribute and is followed by the attribute=value pairs you assign to the report component. You can also include comments that provide context for your StyleSheet. Comments do not affect StyleSheet behavior. For details, see Adding a Comment to an ibi WebFOCUS StyleSheet. style sheets" /> StyleSheets" />

For information about identifying a report component, see Identifying a Report Component in an ibi WebFOCUS StyleSheet.

Specify an ibi WebFOCUS StyleSheet Declaration

Each StyleSheet declaration specifies a series of attributes in the form StyleSheet declarations" />

attribute = value, [attribute = value, ...] $

where:

attribute
Is the attribute you are specifying, such as TYPE, COLUMN, COLOR, or FONT.
value
Is the value you assign to the attribute.

Sample ibi WebFOCUS StyleSheet

Following is a request that includes an inline StyleSheet. The StyleSheet begins with ON TABLE SET STYLE * and ends with ENDSTYLE. StyleSheets" /> style sheets" />

TABLE FILE CENTORD
HEADING
" "
"C e n t u r y  C o r p o r a t i o n"
" "
"Order Revenue - 2000 Q3"
" "
"page <TABPAGENO"
" "
SUM ORDER_DATE/MtDY ORDER_NUM LINEPRICE AS 'Order,Total:'
BY LOWEST 9 ORDER_DATE NOPRINT
WHERE (ORDER_DATE GE '2000/10/01') AND (ORDER_DATE LE '2000/12/31');
ON TABLE SET ONLINE-FMT HTML
ON TABLE SET HTMLCSS ON
 
ON TABLE SET STYLESHEET *
TYPE=Report, GRID=Off, UNITS=Inches, $
TYPE=Data, FONT='Times', $
TYPE=Data, BACKCOLOR=Aqua, COLOR=Navy,
     WHEN=LinePrice GT 500000, $
TYPE=Data, COLUMN=LinePrice, BACKCOLOR=Aqua, COLOR=Navy, STYLE=Bold,
     WHEN=LinePrice GT 500000, $
TYPE=Title, FONT='Helvetica', $
TYPE=Heading, FONT='Helvetica', STYLE=Bold, SIZE=14, JUSTIFY=Center,
     COLOR=White, BACKCOLOR=Dark Turquoise, $
TYPE=Heading, LINE=6, BACKCOLOR=White, COLOR=Dark Turquoise, $
TYPE=Heading, LINE=7, BACKCOLOR=White, $
ENDSTYLE
 
END

Improving ibi WebFOCUS StyleSheet Readability

There are many ways to structure your StyleSheet declarations in order to make the StyleSheet easy to read. You can do any one, or a combination, of the following: StyleSheet declarations" />

  • Begin a declaration in any column using blank spaces or tabs.
  • Include blank lines between declarations.
  • Create declarations in all uppercase, all lowercase, or mixed case.
  • Use more than one declaration to format a single report component.
  • Include blank spaces or tabs in between the attribute, equal sign (=), value, comma, and dollar sign ($).
  • Split a single declaration across a line. The declaration will continue to be processed until the terminating dollar sign. For example, you can split a declaration like this:
    TYPE=HEADING, FONT=ARIAL,
    SIZE=14, STYLE=BOLD, $
  • Split an attribute=value pair across a line. Use the backslash (\) character as continuation syntax at the end of the first line if you are splitting an attribute or value in a declaration across a line. For example:
    TYPE=TITLE, COLUMN=N2, STY\
    LE=BOLD+ITALIC, COLOR=BLUE, $

Adding a Comment to an ibi WebFOCUS StyleSheet

You can add comments to a StyleSheet to give context to a declaration. Comments do not affect StyleSheet behavior. style sheets" /> StyleSheets" /> StyleSheets" />

You can add a comment:

  • On a declaration line. Add the desired text after the dollar sign ($). For example,
    TYPE=HEADING, STYLE=BOLD, COLOR=BLUE, SIZE=14, $ Sample comment
  • On its own line. Begin the line with either a dollar sign ($), or a hyphen and an asterisk (-*), followed by the desired text. For example,
    -* This is a sample comment
    $ This is another sample comment

Note: You can add comments anywhere in your request, not only in StyleSheets.