Understanding Report Templates

A report template is nothing more than a regular report (RPT) file. It can be any RPT file. Templates are applied to other reports so that their formatting and layout can be used as a basis for the other reports. What is useful about the application of templates to other reports is that formatting is applied to the report as well as the layout. An example of this would be a report that has four fields in a detail section, where all sections are "squished" together before applying a presentation-quality template. After the template is applied, the location of the fields in the template would force the fields in the existing report to span out and possibly even change some font information, depending on the specific template.

Using Report Templates

Think of a template as the form that everyone in a company must comply to. Templates can house many types of objects. These objects can be applied to a report after the data-intensive portion of the report design is completed. Applying an existing template to a report can save hours or potentially days of mundane formatting tasks.

Some types of tasks that can be accomplished by (but are not limited to) applying a template to a report are as follows:

  • Corporate logos and other images

  • Consistent page numbering formatting

  • Font style/color/typeface for data fields

  • Field border and background formatting

  • Field sizing

  • Group headers and footers formatting

  • Summary field formatting

  • Watermarks

  • Tricky formatting

  • Lines

  • Boxes

  • Repository objects

  • Report titles

  • Website links

  • Formatting based on data-field type

How Are Templates Better Than Styles in Previous Versions?

Templates are better than the Styles in prior versions of Crystal Reports in so many ways that it's challenging to explain in a short coffee break topic. However, because not every report designer has used Crystal Reports prior to version 9, it's a worthwhile subject. (For those of you new to Crystal Reports with this version, feel free to skip this coffee break.

The main issue with the old feature of Report Styles in previous versions of Crystal Reports (such as 8.5) was that they were not customizable. The styles that one person created when the feature was initially introduced were the only options available. Even if you just didn't like the color red as the group name field and wanted to change it to blue, you were not able to, which was very limiting. This limitation alone made the Styles feature practically useless outside of learning how to create very simple reports.

These styles were also limited to data and group fields. No images or static text objects were included, and again because the styles could not be modified, they could not be updated in this way. The styles were hard-coded into the Crystal Reports designer so that no external RPT files were used, whereas Templates allow the use of any RPT file.



Sams Teach Yourself Crystal Reports 9 in 24 Hours
Sams Teach Yourself Crystal Reports 9 in 24 Hours
ISBN: B003D7JUVW
EAN: N/A
Year: 2005
Pages: 230

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net