BackPrevious Page Next PageNext

CSS Styles

Creating CSS styles

Managing CSS styles

A CSS style file is like a style group, which contains a set of styles with many predefined properties. In JReport, the CSS style file, which is defined according to CSS 2.1 standard of W3C, is supported. Properties of all of the components in a report can be controlled by a CSS file. You can customize, edit and save a CSS style with visible UI of the CSS Editor in JReport Designer, and can also compile and save a CSS file manually according to the W3C standard. After that, these CSS style files can be imported to apply to a component. By using JReport CSS styles, you can create various visual presentation sets from a single report, and change the visual presentation of your report.

JReport supports some of the W3C CSS 2.1 standard properties at present, which are background-color, border-style/border-top-style/border-bottom-style/border-left-style/border-right-style, color, font-size, height, padding/padding-top/padding-bottom/padding-left/padding-right, text-align, and width.

Creating CSS styles

To create a CSS style in JReport Designer:

  1. Right-click an object in the design area and then select Save Style from the shortcut menu. The New CSS Style dialog appears.

    New CSS Style

  2. Define the type of the CSS style as required:
  3. Select the location in which the style will be defined in the Add Selector to Style drop-down list.

Managing CSS styles

In JReport Designer, you can manage CSS styles at any time in the CSS Editor. However you might find it easier to use a third party CSS editor such as Dreamweaver that allows you to see all of the CSS classes at one time.

To access the CSS Editor, click Home > CSS Editor.

CSS Editor

BackPrevious Page Next PageNext