blob: 19c6cbcd0067093eaaae85bdd74067eb7a347986 [file] [log] [blame]
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.0 transitional//EN">
<html>
<head>
<title>BIRT Tutorial</title>
<link rel="stylesheet" href="../style/compose.css" type="text/css">
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
</head>
<body>
<p class="head">BIRT Tutorial</p>
<p class="subhead">Cascading Styles</p>
<h1>About Style Cascade</h1>
<p>
We've mentioned that BIRT uses CSS to define the styles for report items,
and we saw how to define and apply our own style. BIRT also follows the
"cascade" part of Cascading Style Sheets: you can set a property once for the
report, or a container, and have that value <i>cascade</i> down through the
contents of the container.
<p>
In BIRT, Grid, List and Table items are containers: they can hold other
report items. The report itself is the ultimate container for all report items.
<h1>Setting Report-Wide Properties</h1>
<p>
Our report currently uses the default font: a serif style. (Actually, by default
BIRT uses the font set in your browser. Many browsers use a serif style by default,
but if you've changed your default browser font, that is how the report will
appear.)
<p>
Let's use a sans-serif
style instead. We do this by using a BIRT-defined style.
If you familiar with CSS, this is like defining a style that selects the HTML
body tag.
<ul>
<li>Open or locate the Outline view.
<li>Scroll down to the bottom to find the Styles node.<li>Open the Styles node.<li>
Find the style named &quot;report&quot;. Double-click it to open the Style editor.<li>In the Font page, choose "sans serif" as the font type.
<li>Click OK.
</ul>
All items in your report will change to sans-serif font.
<p>
The names "serif" and "sans-serif" are defined by CSS: they are generic font
styles that don't depend on the specific fonts installed on a machine. CSS
generic font names avoid dependencies on specific fonts installed on the browser
machine; something that is important if your reports will be appear
as part of a public web site. You can also use font lists as in CSS. For
example: &quot;Helvetica, Arial, sans-serif&quot;.<p>
<h1>Other Default Styles</h1>
<p>
BIRT defines default styles for most report items and for list and table bands.
See the <a href="/birt/ref/ROM_Styles_SPEC.pdf">ROM Styles Specification</a>
for the complete list.<p>
The Styles node displays the styles that apply to each of the report items.
However, there are additional styles that apply to grouping levels and other
contexts. If you wish to use one of these, simply create a style with the
required name.<h1>Check the Report</h1>
<p>
Let's click the preview tab to see how our report looks after the formatting.
Not bad, but we still need the report heading.
<p>
</body>
</html>