.NODE

Applying Multiple Templates

Because any report could be used as a template, it is also conceivable that many reports could be applied to any single report as a template.

This can prove quite useful if the templates are doing different things. For example, one template might be applying the standard page headers and footers to all reports within a company, whereas another template could be used to apply department-based colors to the details section. Because both templates are encapsulated separately, they can be applied separately and will not affect each other. The end result is one report with both the corporate style (headers and footers) as well as the specific department's colors (in the Details section) applied.

TIP

Templates can be applied repeatedly, even if new fields are added to the report after the initial template was applied.

Simply choose Reapply Template in the Template Expert to have the template address any new fields.


Crystal Reports in the Real WorldStandardized Templates

Arguably the most powerful use of report templates is simply adding consistent headers and footers. As described previously, the job of placing header and footer information in exactly the right place time after time is time-consuming and boring. A very simple template can give you a head start on basic formatting.

To create your template, an image of the company logo will be used. For this example, the Business Objects logo (saved in JPG format) from the corporate Web site is used.

  1. Begin by creating a new report without a data source, as described earlier in the chapter. Your starting point should look like Figure 14.12.
     

    Figure 14.12. A blank canvas for the report template.

    graphics/14fig12.jpg  
  2. From the Insert menu, choose Insert, Picture. Browse for the logo.jpg file and add it to the top left of the report header. In the top right, add a text object and label it Data as of: and right justify the text. Add the special field Data Date to the right of the text.
     
  3. Add the special field Report Title to the page header, center justify the text, widen the field so it reaches to both edges of the report, change the font to 14, and add some vertical height so the text fits properly.
     
  4. In the page footer, add the special field Page N of M, centered with the field stretched to both left and right edges of the canvas. The template is now ready to be applied to all reports, effectively standardizing fundamental elements of report look and feel (see Figure 14.13).
     

    Figure 14.13. A sample standardized template.

    graphics/14fig13.jpg  

    NOTE

    To maximize flexibility, ensure that objects (like the logo) used in the template make full use of the repository. Not only is it important to standardize the look and feel, it should also be easy to update.

  5. Save the template as StandardTemplate.rpt.
     

Part I. Crystal Reports Design

Creating and Designing Basic Reports

Selecting and Grouping Data

Filtering, Sorting, and Summarizing Data

Understanding and Implementing Formulas

Implementing Parameters for Dynamic Reporting

Part II. Formatting Crystal Reports

Fundamentals of Report Formatting

Working with Report Sections

Visualizing Your Data with Charts and Maps

Custom Formatting Techniques

Part III. Advanced Crystal Reports Design

Using Cross-Tabs for Summarized Reporting

Using Record Selections and Alerts for Interactive Reporting

Using Subreports and Multi-Pass Reporting

Using Formulas and Custom Functions

Designing Effective Report Templates

Additional Data Sources for Crystal Reports

Multidimensional Reporting Against OLAP Data with Crystal Reports

Part IV. Enterprise Report Design Analytic, Web-based, and Excel Report Design

Introduction to Crystal Repository

Crystal Reports Semantic Layer Business Views

Creating Crystal Analysis Reports

Advanced Crystal Analysis Report Design

Ad-Hoc Application and Excel Plug-in for Ad-Hoc and Analytic Reporting

Part V. Web Report Distribution Using Crystal Enterprise

Introduction to Crystal Enterprise

Using Crystal Enterprise with Web Desktop

Crystal Enterprise Architecture

Planning Considerations When Deploying Crystal Enterprise

Deploying Crystal Enterprise in a Complex Network Environment

Administering and Configuring Crystal Enterprise

Part VI. Customized Report Distribution Using Crystal Reports Components

Java Reporting Components

Crystal Reports .NET Components

COM Reporting Components

Part VII. Customized Report Distribution Using Crystal Enterprise Embedded Edition

Introduction to Crystal Enterprise Embedded Edition

Crystal Enterprise Viewing Reports

Crystal Enterprise Embedded Report Modification and Creation

Part VIII. Customized Report Distribution Using Crystal Enterprise Professional

Introduction to the Crystal Enterprise Professional Object Model

Creating Enterprise Reports Applications with Crystal Enterprise Part I

Creating Enterprise Reporting Applications with Crystal Enterprise Part II

Appendix A. Using Sql Queries In Crystal Reports

Creating Enterprise Reporting Applications with Crystal Enterprise Part II

show all menu





Special Edition Using Crystal Reports 10
Special Edition Using Crystal Reports 10
ISBN: 0789731134
EAN: 2147483647
Year: 2003
Pages: 341
Similar book on Amazon

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