Introducing the Crystal Reports Designer


This chapter takes you through the required steps to create your own basic reports in the Crystal Report Designer. After you've installed the Crystal Reports XI Designer, you are ready to open it and familiarize yourself with the environment. This section briefly introduces the following components of the application interface:

  • Report sections

  • Application toolbars

  • Application menus

If you have already registered your installation, you should be presented with the Getting Started page shown in Figure 1.1. This page provides quick access to existing Crystal Reports files while also enabling you to begin designing new reports via the Report Expert Wizards or from a blank report template.

Figure 1.1. The Getting Started page provides quick access to existing Crystal Reports files as well as the Report Expert Wizards.


Crystal Report Sections

From the Getting Started page, select the Blank Report link (listed below the New Reports heading). You'll see a window labeled Database Expert; click Cancel. If the Field Explorer window is now displayed on the right side of the new report screen, click the Close button. You will now be presented with a new Report1 Tab beside the original Start Page tab.

On the Report1 tab, you are presented with a blank report template that is divided into five report sections. As Figure 1.2 illustrates, report sections are identified by name on the left side of the design area. These sections segment the Crystal Reports design environment into logical areas to facilitate more intuitive report creationthese include the Report Header, Page Header, Details, Report Footer, and Page Footer sections (if your install displays initials instead of these report section names, go to the File menu, choose options and uncheck Short Section Names under the Layout tab). Each of these sections has unique properties and printing characteristics that you can modify. When creating reports, you place objects (such as data fields) into the various sections according to report requirements. If a report object such as an image is placed in the Report Header section, the image displays and prints only once per report, on the first page. If the same image is placed in the Page Header section, the image then displays and prints once per page. The same holds true for custom sections, such as Group Headers and Group Footers. The Details section implies that whatever is placed in this section displays and prints once for each and every row retrieved from the data source.

Figure 1.2. Report sections provide an intuitive way to create and organize your data when designing reports.


Note

Although Crystal Reports is commonly used for Web reporting initiatives, the design environment is built on a paper metaphor with pages as a concept to facilitate the presentation of information.


Report sections can contain a variety of different object types, including database fields, text, pictures, charts, and map objects. Additional objects, such as formula and subreport objects, are also positioned within report sections and are covered later in the book in greater detail. The Section Expert is used to view or modify the properties of the report sections. To access the Section Expert, perform one of the following actions:

  • Right-click on the section's label (or name, located on the left sidebar) you want to work with, and then select Section Expert from the pop-up menu.

  • Click on the Section Expert button.

  • Select the Section Expert option from the Report menu.

Note

When designing reports, you should consider the following items when working with report sections:

  • It is good practice to print a validating test page of each report you are designing.

  • Consider keeping all font sizes the same within each section for maximum eye appeal.

  • Print preprinted forms on the same machine to avoid discrepancies in the interpretation of the report layout by different print drivers and printers.


Crystal Reports also provides some more advanced section formatting options, reviewed later in the book, such as underlaying and suppressing sections based on certain criteria (formulas). These features are accessible from the Section Expert dialog.

Using Toolbars and Menus

Toolbars are the graphical icon bars at the top of the Crystal Reports application environment, containing various buttons that you can click to activate the most frequently used application commands. Toolbars act as shortcuts to access commonly used functions of the design application, and you can enable or disable them to appear or disappear at the top of the application area by selecting Toolbars from the View menu, which is located in the uppermost area of the application. As Figure 1.3 shows, there are five main toolbars that you can use within the Crystal Reports design environment:

  • Standard The most commonly used application functions, including New, Open, Save, Print, Preview, Export, Copy, Cut, Paste, and Help.

  • Formatting Functions that pertain specifically to modifying object properties with regard to Font, Font Size, Bold, Italics, Underline, Alignment, Currency, and Percentage formats.

  • Insert Tools Quick access to the building blocks of all reports including Text Objects, Summary Fields, Groups, Online Analytical Processing and Cross-Tab Grids, Charts, and Maps, and Drawing items such as lines and boxes.

  • Expert Tools Functions that enable you to access the main application experts quickly, such as the Database, Group, Select, Section, Formula Workshop, and Highlighting Experts.

  • Navigation Tools Functions that enable refreshing of the report data and navigation through the pages of the involved reports.

Figure 1.3. The five Crystal Reports Design toolbars provide quick and easy access to commonly used application commands during report design.


Note

ToolTips are pop-up descriptions that appear when your cursor rests over any of the toolbar buttons. ToolTips are enabled by default. To disable ToolTips on your toolbars, deselect the Show ToolTips check box from within the Toolbars dialog.


In much the same way that the toolbars offer quick and easy access to commonly used commands, the menu items at the top of the application environment provide listings to virtually all the application functions available in Crystal Reports. The menu items act as shortcuts to all the commands within the design application, and they include the following items:

  • The File menu includes file-specific commands to create a new report file, open an existing report, close a current report, save a report, save a report with an alternative filename, export to a different file format, and save the current data set with a report. In addition, the File menu contains commands that enable you to send a report to a printer, select a specific printer, modify the page setup and margins, add summary information to a report, and set a variety of report options.

  • The Edit menu includes commands used to modify various aspects of a report, including commands to undo and redo actions, as well as to cut, copy, and paste report and OLE objects. Additionally, you can edit fields, formulas, summaries, and subreport links.

    Note

    Object Linking and Embedding (OLE) enables you to insert objects (OLE objects) into a report from other applications and then use those applications from within Crystal Reports to edit the objects if necessary. If Crystal Reports did not make use of OLE, you would have to exit Crystal Reports, open the original application, change the object, return to Crystal Reports, delete the object originally inserted, and then insert the newly revised object.


  • The View menu includes commands used to customize the user interface of the Crystal Reports application. The View menu commands enable you to navigate between the application's Design and Preview views, access the three main explorers (Field, Report, and Repository Explorers), access the new XI Dependency Checker window, access the new XI Workbench window, access the Toolbars dialog, zoom in and zoom out of a report, as well as turn on and off the application rulers, guidelines, grids, ToolTips, and group tree from both the Design and Preview views of the report.

  • The Insert menu includes commands used to insert text objects, summaries (counts, sums, medians, and so on), field headings, groups, subreports, lines, boxes, pictures, charts, maps, report template objects, and other objects into your report.

  • The Format menu provides easy access to a variety of commands useful in formatting your reports for presentation purposes. This menu includes commands used to change the characteristics of the objects in a report. The Format menu provides quick access to commands for modifying font properties (color, size, borders, background color, and drop shadows for example), chart, line height, and hyperlink properties, and formatting for entire sections of the report. The Format menu also provides commands to arrange report objects (move, align, and size) and to specify desired highlighting characteristics via the Highlighting Expert.

  • The Database menu includes commands used to access the Database Expert, from which you can add and remove data source tables for use within reports, specify links between data source tables, and modify table and field alias names. This menu also provides easy access to the set database location and enables you to log on and off SQL and ODBC servers, browse field data, and display and edit the report SQL syntax. In general, the Database menu enables you to maintain the necessary specifications for the report with regard to the data source(s) with which the report interacts.

  • The Report menu includes commands used to access the main application experts (also referred to as wizards), identify the desired records or groups to be included in a report via the Select Expert and Selection Formulas (often referred to as applying report filters), construct and edit formulas, create and view alerts, specify report bursting indexes, modify grouping and sorting specifications, refresh report data by executing the query to run against the database, and view report performance information.

  • The Chart menu is only visible after selecting a chart or map object and includes specific commands used to customize your charts and maps. Depending on the type of chart you select, the Chart menu includes commands to zoom in and out of charts; apply changes to all instances of a chart; discard custom changes made to the chart; save the chart template to a file; apply and modify template specifications for the chart; change the titles, numeric axis grids, and scales of the chart; and auto-arrange the appearance of the chart. After selecting a map object, the Chart menu then includes additional commands used to configure the overall style of the map, reorganizing the layers of report elements, changing the geographic map, and hiding or showing the Map Navigator.

  • The Window menu includes commands used to rearrange the application icons and windows, as well as providing a list of report windows that are currently open and a command that enables you to close all report windows at once.

  • The Help menu includes commands used to quickly access the Crystal Reports online help references, commands to register Crystal Reports and locate the Getting Start page, and quick access to the About Crystal Reports dialog and several key Business Objects websites for technical support and product information. Lastly and new to Crystal Reports XI, the Help menu provides online access to Crystal Reports updates, downloaded and installed automatically from the Web. These updates can be set to occur automatically or manually.

Report Design Explorers

Several report design explorers, intended to streamline the report design process, compose another key component to Crystal Reports XI. The design explorers are application tools that greatly enhance a report designer's efficiency while working with reports. They are design tools you will use in building reports throughout the remainder of the book.

The report design explorers are dialog windows that display various objects relevant to the report in a hierarchical tree view facilitating quick access to and formatting of each respective object and its properties. The explorers enable you to easily locate and navigate to specific report objects, such as the report header or a corporate logo image, to customize the object for design purposes. All the objects included in a report (report sections, groups, database fields, formulas, parameters, images, charts, and so on) are organized and displayed within one of the design explorers. There are three distinct explorers:

  • Report Explorer Provides a tree view of each report section in the report and each of the report objects contained within each section. You can work with each report object directly from the explorer rather than navigating to each object separately in either the Design or Preview tab of the report.

  • Field Explorer Displays a tree view of database fields, formulas, SQL expressions, parameters, running totals, groups, and special fields. You can add any of these field types directly to a report from the Explorer dialog. Fields that have already been added to the report or fields that have been used by other fields (such as formula fields, groups, summaries, and so on) have a green check mark icon in front of them.

  • Repository Explorer Provides a tree view of each object contained in the Crystal Enterprise report repository. You can work with each report repository object directly from the Repository Explorer rather than locating each object separately for inclusion in the report during the report design process.

Note

It is important to emphasize that since Version 10, the centralized Repository is only available for use with BusinessObjects Enterprise. See Chapter 18, "Using a Semantic LayerBusiness Views and Universes," for more details on this topic.


Locating and Using the Report Design Explorers

Each of the explorer dialogs can be docked in place or used in a free-floating state. By default, the Report and Field Explorers appear docked on the right side of the report design environment. However, you can manually dock each of them in other locations if you prefer. The explorers can also be used in free-floating mode, in which case each of the explorer dialog windows can be dragged to any location within the report design environment and float in place until you either close or reposition it. To view each of the report design explorers, click the View menu and select each desired explorer individually, as shown in Figure 1.4.

Figure 1.4. By default, the design explorers, workbench, and dependency checker are docked on the right side of the report designer application but can be moved about and toggled on and off to facilitate report design.


Tip

To save space in the design environment, the individual explorers can be dragged on top of each other and provide their functionality through respective tabs in a single dialog. This is the default position for the Field and Report Explorer in a fresh install but note in Figure 1.4 how the Report Explorer has been dragged into its own dialog with the Repository Explorer exposing itself through a tab in that same dialog. Also new in XI is the ability to autohide the explorer windows by clicking on the thumbnail toggle button at the top of each explorer. The explorers will then autohide on the sides of your report until you are ready to use them again.


The report design explorers create an intuitive way for report designers to add and format report objects quickly while constructing reports. As you progress through the remainder of the book, you will be using these explorers on a regular basis, so it's important that you understand the basics of these application features.

The Workbench and Dependency Checker

Two new features presented in XI are the Workbench and the Dependency Checker. The Workbench provides a tool within the Crystal Reports Designer that enables the logical grouping and management of reports into projects. The Dependency Checker is another new tool that checks a specified report, or all reports in an existing Workbench report project for several types of errors, including formula compilation problems, database errors, repository object errors (if you're using BusinessObjects Enterprise), and hyperlink errors. You can check for these types of errors and invoke the Dependency Checker from under the main Report menu or from within the Workbench window. Both the Dependency Checker and the Workbench can also be accessed from the main View menu and can be located and locked in the same way as the Report Explorer.




Crystal Reports XI(c) Official Guide
Crystal Reports XI Official Guide
ISBN: 0672329174
EAN: 2147483647
Year: N/A
Pages: 365

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