Crystal Reports 2008: Report Design I Fundamentals of Report Design

Learner’s Guide BOC310

Copyright
©

2009 SAP® BusinessObjects™. All rights reserved. SAP BusinessObjects owns the following United States patents, which may cover products that are offered and licensed by SAP BusinessObjects and/or affliated companies: 5,295,243; 5,339,390; 5,555,403; 5,590,250; 5,619,632; 5,632,009; 5,857,205; 5,880,742; 5,883,635; 6,085,202; 6,108,698; 6,247,008; 6,289,352; 6,300,957; 6,377,259; 6,490,593; 6,578,027; 6,581,068; 6,628,312; 6,654,761; 6,768,986; 6,772,409; 6,831,668; 6,882,998; 6,892,189; 6,901,555; 7,089,238; 7,107,266; 7,139,766; 7,178,099; 7,181,435; 7,181,440; 7,194,465; 7,222,130; 7,299,419; 7,320,122 and 7,356,779. SAP BusinessObjects and its logos, BusinessObjects, Crystal Reports®, Rapid Mart™, Data Insight™, Desktop Intelligence™, Rapid Marts®, Watchlist Security™, Web Intelligence®, and Xcelsius® are trademarks or registered trademarks of Business Objects, an SAP company and/or affiliated companies in the United States and/or other countries. SAP® is a registered trademark of SAP AG in Germany and/or other countries. All other names mentioned herein may be trademarks of their respective owners.

C O N T E N T S
About this Course
Course introduction...................................................................................................xiii Course description.....................................................................................................xiv Course audience.........................................................................................................xiv Prerequisites................................................................................................................xiv Additional education.................................................................................................xiv Level, delivery, and duration...................................................................................xiv Applicable certifications and designations.............................................................xiv Course success factors ................................................................................................xv Course setup ................................................................................................................xv Course materials .........................................................................................................xv Learning process ........................................................................................................xvi

Lesson 1

Planning a Report
Lesson introduction ......................................................................................................1 Defining database concepts .........................................................................................2 Database terms and definitions ...........................................................................2 Planning and developing a report prototype............................................................3 Report prototype layouts......................................................................................3 Developing a report prototype.............................................................................3 Report Requirements Checklist............................................................................3 Activity: Developing a report prototype............................................................4 Debrief: Planning a report ...........................................................................................8 Lesson summary ...........................................................................................................9

Lesson 2

Creating a Report
Lesson introduction.....................................................................................................11 Creating a report..........................................................................................................12 Report creation methods ....................................................................................12 Specifying the data source .................................................................................13 Adding tables...............................................................................................................18 Adding tables to a report....................................................................................18 Linking database tables ......................................................................................19 The design environment.............................................................................................21

Table of Contents—Learner’s Guide

iii

Understanding the Design window .................................................................21 Working with toolbars in the Design window ...............................................23 Inserting objects on a report.......................................................................................25 Working with the Field Explorer.......................................................................25 Working with the Report Explorer....................................................................27 Working with the Repository Explorer.............................................................30 Working with the Workbench............................................................................33 Determining data field types .............................................................................35 Previewing a report ....................................................................................................37 Previewing reports ..............................................................................................37 Viewing a report ..................................................................................................38 Working in the Design and Preview tabs ........................................................40 Saving a report ............................................................................................................42 Adding summary information ..........................................................................42 Saving a report .....................................................................................................43 Saving a preview of a report ..............................................................................44 Checking a report for errors ..............................................................................45 Activity: Creating a report..................................................................................47 Positioning and sizing objects ...................................................................................49 Positioning objects using a grid ........................................................................49 Positioning objects using guidelines ................................................................51 Positioning objects using free-form placement ...............................................53 Locking an object’s position and size ...............................................................53 Moving objects .....................................................................................................53 Aligning objects ...................................................................................................56 Resizing objects ....................................................................................................56 Cutting, copying, and pasting objects ..............................................................57 Formatting objects ......................................................................................................58 Formatting fields using the Formatting toolbar .............................................58 Formatting fields using the Format Editor.......................................................58 Locking an object’s format .................................................................................63 Using text objects .................................................................................................63 Activity: Positioning, sizing, and formatting objects......................................65 Quiz: Creating a report ..............................................................................................67 Lesson summary .........................................................................................................68

Lesson 3

Selecting Records
Lesson introduction.....................................................................................................69 Defining the Select Expert .........................................................................................70 Using the Select Expert........................................................................................70 The Select Expert’s features ...............................................................................71 Determining the criteria for record selection...........................................................72 Defining record selection ...................................................................................72 Changing record selection to be case insensitive ............................................74

iv

Fundamentals of Report Design—Learner’s Guide

Understanding saved and refreshed data ...............................................................76 Saving data with a report....................................................................................76 Refreshing data in a report.................................................................................76 Applying record selection..........................................................................................78 Setting selection criteria ......................................................................................78 Activity: Applying record selection...................................................................79 Setting additional criteria ..........................................................................................80 Setting additional record selection criteria ......................................................80 Activity: Setting additional selection criteria...................................................81 Modifying record selection ........................................................................................82 Modifying existing record selection .................................................................82 Modifying a record selection formula ..............................................................82 Activity: Refining the record selection..............................................................86 Applying time-based record selection .....................................................................88 Setting record selection based on a date ..........................................................88 Activity: Applying a time-based record selection...........................................89 Quiz: Selecting records ...............................................................................................91 Lesson summary .........................................................................................................92

Lesson 4

Organizing Data on a Report
Lesson introduction.....................................................................................................93 Sorting records ............................................................................................................94 Applying a sort order to records .......................................................................94 Using sort controls...............................................................................................95 Activity: Applying sorting options....................................................................97 Grouping records ........................................................................................................99 Creating groups ...................................................................................................99 Navigating using the Preview Panel.................................................................99 Navigating in the report using drill-down ....................................................100 Applying sort order options when grouping ................................................100 Modifying groups .............................................................................................103 Changing the definition of a group ................................................................103 Deleting groups .................................................................................................104 Activity: Creating and modifying groups......................................................105 Creating nested and multiple groups ............................................................106 Reordering groups ............................................................................................107 Activity: Creating and reordering multiple groups......................................108 Adding a specified order group ......................................................................109 Activity: Adding a specified order group......................................................112 Grouping on time-based data ..........................................................................113 Activity: Grouping on a date field...................................................................114 Summarizing data .....................................................................................................116 Inserting a summary .........................................................................................116 Inserting a group and summary at the same time .......................................118

Table of Contents—Learner’s Guide

v

Activity: Inserting summaries..........................................................................120 Creating a group selection based on summary data ....................................121 Activity: Grouping on summary data.............................................................123 Creating a grand total .......................................................................................123 Activity: Inserting a grand total.......................................................................124 Quiz: Organizing data on a report .........................................................................126 Lesson summary .......................................................................................................127

Lesson 5

Formatting a Report
Lesson introduction...................................................................................................129 Adding graphical elements......................................................................................130 Adding a line to a report ..................................................................................130 Adding a box to a report ..................................................................................132 Adding a graphic to a report ...........................................................................133 Adding a dynamic image object .....................................................................135 Activity: Adding graphical elements..............................................................136 Combining text objects with database fields ........................................................140 Embedding a database field into a text object ...............................................140 Preventing truncation of text objects ..............................................................141 Formatting individual elements of text objects .............................................142 Setting tabs in a text object ...............................................................................143 Applying specialized formatting ............................................................................145 Formatting multiple objects .............................................................................145 Applying predefined templates.......................................................................146 Applying text rotation.......................................................................................148 Applying accounting conventions ..................................................................149 Applying numeric, currency, date, time, and date/time formatting.........151 Activity: Applying formatting elements.........................................................157 Inserting fields with pre-built functions ................................................................159 Inserting special fields ......................................................................................159 Formatting special fields ..................................................................................161 Embedding a special field into a text object ..................................................162 Activity: Adding special fields.........................................................................162 Debrief: Validating the report design..............................................................164 Quiz: Formatting a report ........................................................................................166 Lesson summary .......................................................................................................167

Lesson 6

Applying Section Formatting
Lesson introduction...................................................................................................169 Formatting sections...................................................................................................170 Defining the Section Expert..............................................................................170 Exploring the Common tab ......................................................................170

vi

Fundamentals of Report Design—Learner’s Guide

..........................................................................207 Numeric calculations .198 Boolean formulas .............................................................................................................................................................................181 Quiz: Applying section formatting .......................................................................................................................................................................................................................................................................................................................................................192 Formula creation methods ...............................................204 Activity: Applying date calculations................189 Working with formulas in the Field Explorer......................207 Creating a numeric calculation ......................................................................................196 Applying Boolean formulas....................198 Creating a Boolean formula .............................................................................................................198 Activity: Applying a Boolean formula................................175 Exploring the Layout tab.....................202 Activity: Applying an If-Then-Else formula...................................................................................................186 Formulas .192 Creating a formula in the Formula Editor .........................................................................................192 Creating a formula in the Formula Workshop....................207 Activity: Applying numeric calculations.............................................................................................180 Defining a summary report ...............................201 Applying If-Then-Else formulas......................................................................................................................................................................................186 The components of a formula...........................204 Date calculation ..........................................................204 Creating a date calculation .......181 Activity: Creating a summary report......................................................................................................................................................179 Creating summary reports.......185 Defining a formula and its purpose........................................202 Creating an If-Then-Else formula ......................................190 Deleting a formula .......................................................180 Viewing the summary report in the Preview window .............192 Adding comments to a formula .................................................................................................173 Exploring the Color tab.................................................................................................................................................................................205 Applying numeric calculations........................................176 Formatting a section .....188 Special characters used in Crystal syntax...............................................................177 Activity: Formatting sections............183 Lesson 7 Creating Basic Formulas Lesson introduction .........................................................202 If-Then-Else formulas ..................210 Table of Contents—Learner’s Guide vii ............................................................................186 Crystal syntax.........................................................................................................................................................................................................................202 Applying date calculations.......................................................................................................................................................191 Creating formulas..........208 Applying string manipulation..........................................Exploring the Paging tab..........................................................................................................................................................................................................................................................................................................189 Data types ..........................................................180 Creating a summary report ..................................

.....................................................................................................................................................226 Lesson 9 Representing Data Visually Lesson introduction..............................................................................................................................................................................................................................................................................................................225 Lesson summary.................................................................................................................................................................................................244 Exploring the Titles tab ...........................................216 Using the Highlighting Expert....................................................................................................................................................215 Determining trends in data.221 Applying attribute properties .......................................................................................................240 Activity: Charting on detail information...............................................................214 Lesson 8 Applying Conditional Reporting Lesson introduction....................................................................................................................................................223 Activity: Formatting data conditionally.......244 Exploring the Data Labels tab ..........................................................................................................................................................................................String manipulation........................227 Creating a chart ..................................239 Charting on details or formula information .....................................................................................................................................................235 Exploring the Text tab .............................................243 Editing charts in the Chart Options dialog box ....................................................................242 Customizing a chart ............................................223 Quiz: Applying conditional reporting ....................228 Exploring the Type tab ........................238 Activity: Charting on summary data..............................................229 Exploring the Data tab ...........................210 Activity: Applying string manipulation formulas...........232 Exploring the Axes tab ............228 Inserting a chart using the Chart Expert ...........234 Exploring the Color Highlight tab .......................233 Exploring the Options tab ...................................................................................................228 Choosing a chart location and type .....................................210 Creating string manipulation formulas..........................................................................................................................219 Formatting data conditionally ......................................................................................................217 Activity: Using the Highlighting Expert......................................................................................................................221 Applying on or off properties ....................216 Conditionally formatting fields using the Highlighting Expert ................................212 Debrief: Creating basic formulas....................236 Charting on summary data ...............245 viii Fundamentals of Report Design—Learner’s Guide ................222 Applying conditional formatting functions ..........................................................................................................................................237 Drilling down on a chart .............................221 Conditional formatting ..216 Setting highlighting priorities ...................................................243 Exploring the Appearance tab ................

...............251 Lesson 10 Distributing a Report Lesson introduction......................................................................................................271 Answer Key Debrief: Planning a report .......................................................254 Exporting reports .........................................................................................................................256 Exporting a report to Microsoft Word ........................................................255 Exporting a report to application formats ............................................247 Using the zooming features with bar and line charts .......................................................................................................276 Quiz: Selecting records ...................................................................................................264 Viewing requirements in BusinessObjects Enterprise .................................................278 Quiz: Formatting a report .275 Quiz: Creating a report ...................................................................................................................................247 Auto-arranging a chart...................257 Activity: Exporting a report to Microsoft Excel...........................................................................264 Saving a report to BusinessObjects Enterprise ..281 Quiz: Representing data visually .......................................................................................................................................................................248 Activity: Customizing a chart.....................................................................................................................................................................................................................................................................254 Exporting formats..............................................246 Exploring the Gridlines tab ..............................280 Quiz: Applying conditional reporting ...........Exploring the Legends tab ................................................................................................................................277 Quiz: Organizing data on a report ....................................246 Exploring the Axes tab .......................................................254 Exporting destinations ....................................................................................................250 Lesson summary .....................................................................................................................282 Quiz: Distributing a report .........253 Exporting a report .................................261 Saving to BusinessObjects Enterprise ........................248 Quiz: Representing data visually .................................................................266 Activity: Saving a report to BusinessObjects Enterprise.......................256 Exporting a report to Microsoft Excel ...283 Table of Contents—Learner’s Guide ix ..........258 Activity: Exporting a report to Microsoft Word................................................................................270 Lesson summary ...............................................................................................269 Quiz: Distributing a report .......................................................................................................................256 Saving an export option ..........................................................................................................................................................................................................279 Quiz: Applying section formatting ...........

x Fundamentals of Report Design—Learner’s Guide .

..............5 hours ❒ ❒ ❒ ❒ ❒ ❒ ❒ Defining the Select Expert Determining the criteria for record selection Understanding saved and refreshed data Applying record selection Setting additional criteria Modifying record selection Applying time-based record selection Lesson 4 Organizing Data on a Report................A G E N D A Fundamentals of Report Design Introductions........................................................................................................................................................1..30 minutes ❒ Defining database concepts ❒ Planning and developing a report prototype Lesson 2 Creating a Report..........5 hours ❒ Sorting records ❒ Grouping records ❒ Summarizing data Agenda—Learner’s Guide xi .....1...1...................................... Course Overview.....................30 minutes Lesson 1 Planning a Report.................................5 hours ❒ ❒ ❒ ❒ ❒ ❒ ❒ ❒ Creating a report Adding tables The design environment Inserting objects on a report Previewing a report Saving a report Positioning and sizing objects Formatting objects Lesson 3 Selecting Records.......................

.....................................30 minutes ❒ Exporting a report ❒ Saving to BusinessObjects Enterprise xii Fundamentals of Report Design—Learner’s Guide .......................................3 hours ❒ ❒ ❒ ❒ ❒ ❒ ❒ Defining a formula and its purpose Creating formulas Applying Boolean formulas Applying If-Then-Else formulas Applying date calculations Applying numeric calculations Applying string manipulation Lesson 8 Applying Conditional Reporting..........................................................................................................45 minutes ❒ Determining trends in data ❒ Formatting data conditionally Lesson 9 Representing Data Visually..............................................45 minutes ❒ Creating a chart Lesson 10 Distributing a Report.............................1 hour ❒ ❒ ❒ ❒ Adding graphical elements Combining text objects with database fields Applying specialized formatting Inserting fields with pre-built functions Lesson 6 Applying Section Formatting..Lesson 5 Formatting a Report...................................................................................1 hour ❒ Formatting sections ❒ Creating summary reports Lesson 7 Creating Basic Formulas..............

About this Course—Learner’s Guide xiii .About this Course Course introduction This section explains the conventions used in the course and in this training guide.

Business Reporting Solutions • Crystal Reports 2008: Report Design III . Applicable certifications and designations This is a core course for the Business Objects Certified Professional . xiv Fundamentals of Report Design—Learner’s Guide . This two-day instructor led classroom course is designed to give you comprehensive skills and in-depth knowledge to plan and create reports that will help you analyze and interpret information. and deliver reports via the web or embedded in enterprise applications.Course description Crystal Reports 2008® is a powerful.Report Processing Strategies Level. dynamic. learners who attend this course should have the following experience: • Windows conventions • Basic database concepts Additional education To increase your skill level and knowledge of Crystal Reports. Course audience The Report Processing Strategies course builds on knowledge and skills acquired though experience using Crystal Reports or from previous courses.Crystal Reports certification path. delivery. you will find that this course is an in-depth approach to the entire report creation cycle from planning a report prototype to distributing a report. As a business benefit. and duration This core instructor-led offering is a two-day course. visualize. Prerequisites To be successful. explore. the following courses are recommended: • Crystal Reports 2008: Report Design II . actionable reporting solution that helps you design.

Learners and instructor working as a team. Course materials The materials included with the course materials are: • Name card • Learner’s Guide The Learner’s Guide contains an agenda. Provide feedback on the course content. About this Course—Learner’s Guide xv . Your comments will assist us to improve future courses. Course setup Refer to the setup guide for details on hardware. and course-specific requirements. The Learner’s Guide is designed to assist students who attend the classroom-based course and outlines what learners can expect to achieve by participating in this course. you will receive an electronic feedback form as part of our evaluation process. and facility. learner materials. instructor. • Evaluation form At the conclusion of this course. software. and practice activities. Active participation by all learners.Course success factors Your learning experience will be enhanced by: • • • • Activities that build on the life experiences of the learner. Discussion that connects the training to real working environments.

Additional resources include: • Sample files The sample files can include required files for the course activities and/or supplemental content to the training guide. • Online Help Retrieve information and find answers to questions using the online Help and/or user’s guide that are included with the product.

Learning process
Learning is an interactive process between the learners and the instructor. By facilitating a cooperative environment, the instructor guides the learners through the learning framework.

Introduction
Why am I here? What’s in it for me? The learners will be clear about what they are getting out of each lesson.

Objectives
How do I achieve the outcome? The learners will assimilate new concepts and how to apply the ideas presented in the lesson. This step sets the groundwork for practice.

Practice
How do I do it? The learners will demonstrate their knowledge as well as their hands-on skills through the activities.

Review
How did I do? The learners will have an opportunity to review what they have learned during the lesson. Review reinforces why it is important to learn particular concepts or skills.

Summary
Where have I been and where am I going? The summary acts as a recap of the learning objectives and as a transition to the next section.

xvi

Fundamentals of Report Design—Learner’s Guide

Lesson 1

Planning a Report
Lesson introduction
You need to understand the basic concepts of report design, so you can plan what information to include on your report. After completing this lesson, you will be able to: • Define database concepts • Plan and develop a report prototype

Planning a Report—Learner’s Guide

1

Defining database concepts
You need to know where your information is stored and in what form before you can work out your reporting requirements. After completing this unit, you will be able to: • Define database terms

Database terms and definitions
By understanding basic database concepts, you will be better prepared to understand what’s needed when planning a report.
Term Definition

Database

A database is a bank of data that provides the information for a report. A database is also referred to as a data source. A table is a container of information that can hold many pieces of data, such as records. Tables are stored in databases. In a database, a record is a complete unit of related information. Each record is made up of one or more fields, and each field can hold one piece of data (known as a value). A field is the basic building block of a record. A field can be empty (NULL) or contain a value. A relational database contains tables that can be linked together based on the relationship between the fields in two or more tables. A report is an organized presentation of data. A comprehensive, customized, and attractive report can provide management with the information it needs to run an organization effectively. A link is a field that is common to two or more tables and that serves as a connecting point between those two tables. Linking means that records are matched up from two or more table(s) and ensures that all the data in each row of multiple tables refers to the same customer (transaction, invoice, and so on) on a report.

Table

Record

Field

Relational database

Report

Link

2

Fundamentals of Report Design—Learner’s Guide

Planning and developing a report prototype
As a starting point in the report design process, you should outline the information you want the report to provide. After completing this unit, you will be able to: • Determine the layout and content of a report • Develop a prototype of a report

Report prototype layouts
By taking a systems-oriented approach to reporting and developing a prototype, you will produce clearer and more readable reports.
Tip: With the paper prototype in hand, you can put your full effort into learning and using the program, rather than trying to design and learn at the same time. For more details on the report planning process, see the Crystal Reports User’s Guide.

Developing a report prototype
To develop a report prototype, gather the information on which the report will be based. This stage of the report planning process, referred to as requirements gathering, consists of the report designer asking the report requestor a series of targeted questions, sometimes in the form of a checklist. After determining the outline of the report request, you develop the prototype by: • Sketching the report on a blank piece of paper, usually the size the report will be printed on. • Filling in a form. Sketching the report helps if you need to see the report visually; however, a form with all the categories listed enables you to develop the prototype without missing a section. As well, the form is more professional than a quickly sketched visual and can be used as a sign-off point in a report request. Having a list of questions (based on the Report Requirements Checklist) can also help to keep you on track.
Note: The Report Requirements Checklist is based on Crystal Reports terminology. Use this checklist as a starting point for a version specific to your organization’s needs.

Report Requirements Checklist
You can use these guidelines to jumpstart the planning process. • Define the overall purpose of the report. The purpose statement helps you focus on your primary needs, and it gives the report both a starting point and a goal. • Define the readers of the report.

Planning a Report—Learner’s Guide

3

Plan the report so it includes the information each user is looking for. • Define the data used in the report. What type of data source will you need to connect to? • Determine the report title. Write out a working title for the report. You may decide to change it later, but at least you will have a title to use when creating the prototype report. • Define header and footer identifying information. Header information typically includes a company logo, a print date, and the title of the report. Page numbers usually appear in footers. • Define specific data that should appear in the body of the report. The body should contain all the data needed to fulfill the statement of purpose you wrote for the report. It should also contain all of the data needed by the various users that you have identified. • Determine if the data is organized into groups. How? By customer? By date? By hierarchy? Or by other criteria? • Determine if the data is sorted based on record or group values. Data can be sorted based on a specific record or on a group. • Determine if the data exists or if it needs to be calculated. Some report information can be drawn directly from data fields; other information will have to be calculated based on data field values. • Determine if the report is to contain only specific records or groups. You can base a report on all records in a given database, or on a limited set of records from the database. • Determine if the data needs to be summarized. Do you want to total, average, count, or determine the maximum or minimum value included in all the values in any column on the report? Do you want to include a grand total at the bottom of a selected column? • Define how to identify key information through formatting options. What formatting options can be used to highlight key data on a report?

Activity: Developing a report prototype
Objective
• Determine the layout and content for a report and then develop a paper prototype.

4

Fundamentals of Report Design—Learner’s Guide

Instructions
Work through the scenario to determine the basic requirements of a report. Read through the scenario and then create a report prototype. You can use the Report Requirements Checklist as an aid in this activity or sketch the report prototype on a piece of paper. To build a prototype, determine these requirements for the report: • • • • • • • • • • • • Purpose Audience Report title Database information Header and footer information Information to be included in the body of the report Groups to be set up Information to be sorted in a specific order Specific records to be displayed Calculations or formulas Summarized data to be included Formatting to highlight specific information

Scenario
You are a new report designer for the Sales team in a bike manufacturing company called the Xtreme Bike Company. Your first assignment is to create a report that will display orders placed by each customer of your organization. The database administrator tells you that the customer information and the order information are stored in two separate tables in the Xtreme company database. She advises you to use an ODBC connection to the database. The sales manager tells you that the standard is to use the company logo at the top of the report as well as a title and a print date that’s labeled. He also tells you that a page number that’s labeled in the bottom of the report is the corporate standard as well as the copyright information. The main section of the report should contain the customer’s name and city. As well, the order information should include the date the order was placed, the amount of the order, and the order ID number. For this report, the team needs to see records selected from the country of the USA and for 2004 only. The customers and the cities should be sorted alphabetically, starting with “A.” While the report should display USA as the only country group, the only regional groups the team needs to see at this time are the Western Sales Territory and the Eastern Sales Territory. They are not interested in any other specific groups at this time, so you can tag them as “Unassigned Regions.” They also want to see information grouped on the dates that orders were placed with the order dates sorted with the most recent information first. The team also needs to see such summarized data as the number of orders for each order date group. Include the subtotal of the order amount for each order date group as well as a report grand total for the order amount. As well, include a percentage of the order amount based

Planning a Report—Learner’s Guide

5

on each month’s subtotal compared to the grand total. ensure the order date group as well as the subtotal and grand total is easily found on the report. The team also needs to see the number of unique customers. Format the column headings. so that navigating the report is easier. To highlight key information with specialized formatting options. Report Prototype Form Report Prototype Form Purpose Audience Report title Database information Header Footer Body of report Groups Sorting Record selection Calculations or formulas 6 Fundamentals of Report Design—Learner’s Guide . Use two different font styles for the report title for contrast.

Report Prototype Form Summarized data Key information/Formatting Signoff: Planning a Report—Learner’s Guide 7 .

Debrief: Planning a report 1. Why is it important to plan a report before creating it? 8 Fundamentals of Report Design—Learner’s Guide .

you are now able to: • Define database concepts • Plan and develop a report prototype Planning a Report—Learner’s Guide 9 .Lesson summary After completing this lesson.

10 Fundamentals of Report Design—Learner’s Guide .

After completing this lesson.Lesson 2 Creating a Report Lesson introduction Creating a basic report using Crystal Reports will help you turn data into information. you will be able to: • • • • • • • • Create a report Add tables Describe the design environment Insert objects on a report Preview a report Save a report Position and size objects Format objects Creating a Report—Learner’s Guide 11 .

the Start Page appears at the top of the screen. You can create a new report with Crystal Reports using these methods: • Use one of the Report Wizards provided. a search functionality.Creating a report In order to create a report. you must first connect to your database that contains the data you need. will find it easier to design a report using one of the Wizards. sometimes referred to as Experts. After completing this unit. or someone who is familiar but is rushed. sample reports. The Start Page includes links to recent reports you’ve opened. and an update service. the Help system. you will be able to: • Describe methods of creating a report • Choose a data source type Report creation methods When you launch Crystal Reports. You step through the report-building process of a specific type of report when using an Expert. A user who is unfamiliar with Crystal Reports. 12 Fundamentals of Report Design—Learner’s Guide . report creation methods.

Specifying the data source For any new report you want to create. Another quick method to build a report is to create it from an existing report. the dialog box that displays will be one of several Data dialog boxes that allow you to specify the data source from either an existing connection or by creating a new connection. you choose the data source you will use to create the report. This existing report can be used as a template since it may already contain much of the information and formatting you need. Creating a Report—Learner’s Guide 13 . After you open the report you want to use as a template. the first step is to specify the data source.” • Create a report from another report. save it to a new file using the Save As command on the File menu. Regardless of which option you select from the START A NEW REPORT list on the Start Page.• Construct the report manually. piece by piece. You can custom design a report using this method by starting with a blank report and building the elements of the report from “scratch. The Start Page also contains dynamic content from Business Objects. After you select the type of report you want to build from the Start Page.

the Database Expert opens automatically. The options in the Database Expert are: • My Connections 14 Fundamentals of Report Design—Learner’s Guide .If you choose to use a blank report as the basis of your new report.

com driver included with Crystal Reports allows for access to customer data. You access sources through either an ODBC layer or directly through native drivers. • Create New Connection This folder contains a number of subfolders of data source options. Expand the Create New Connection list and locate ODBC (RDO). Note: Salesforce. To connect to an ODBC data source 1.This option shows all data sources that you are currently connected to. or a PC-type database such as Microsoft Access. Creating a Report—Learner’s Guide 15 . 3. It is an interface that gives applications the ability to retrieve data in data management systems.com driver refresh when deployed to crystalreports. ODBC stands for Open Database Connectivity. The data you use to create reports in your organization is stored in either a client-server database such as MS SQL Server.com.com is an on-demand customer relationship management (CRM) company. From the Database Expert. A salesforce. Click ODBC (RDO) . Reports that use a salesforce. select Create New Connection. 2.

5.The ODBC (RDO) dialog box opens. meaning you might be prompted for a user ID and password. and then click Finish. enter your user ID and password. displaying the connection information needed to log onto the selected data source. 16 Fundamentals of Report Design—Learner’s Guide . The second window of the ODBC (RDO) dialog box appears. Locate and then click the appropriate data source. and then click Next. 4. the sample database has not been secured. For this course. In the Connection Information section of the ODBC (RDO) dialog box. if required. Tip: In your organization the database may be secure.

Creating a Report—Learner’s Guide 17 .The Database Expert displays with the connection to the data source highlighted.

Select the table you want to add to your report. Click OK. you can add one or more tables to base your report on. and then expand Tables. you will be able to: • Add tables to a report • Describe linking Adding tables to a report After selecting the data source. After completing this unit.Adding tables After connecting to your data source. Click the > arrow to add it to the Selected Tables list. 2. expand your data source. 3. From the Database Expert. 4. 18 Fundamentals of Report Design—Learner’s Guide . you will add the information upon which the report will be built. To add tables to a report 1.

Linking database tables If your report contains data from two or more database tables. • Auto-Arrange When you click this button. • Order Links Creating a Report—Learner’s Guide 19 . Auto Link in the Database ExpertLinks tab automatically chooses links for your tables based on common fields in tables or indexed fields (if your database supports indexed fields). • Auto-Link Use this area to choose a method of linking tables. You define the linking setup in the Links tab of the Database Expert. Click By Name to link tables by their names or By Key to use foreign key information. Click the Link button to link tables automatically (by name or foreign key. you will need to link the tables when creating your reports. Note: The color flags indicate that these fields are indexed. Linking requires that you use a field that is common to both tables. the program arranges the tables to fit in the most efficient manner inside the Links display area. as selected). The other options in the Links tab include: • Links display area The display area shows all the tables currently in your report along with links and indexes. You link database tables so records from one table match related records from another. Indexed fields can increase the speed of data access and reduce the time it takes for the program to evaluate data.

the Order Links dialog box appears. the index indicator in front of the field shows the colors of the indexes the field is part of. When you click the button. 20 Fundamentals of Report Design—Learner’s Guide . If a field is part of several indexes. Click OK. Confirm the tables are linked correctly. • Link Options This option opens the Link Options dialog box when you click a link line to select it. The numbering of the index indicators reflects the sequence in which the indexes were created. • Delete Link This option removes the selected link. To link tables 1. Establish the link processing order you want for the available linked tables. 2. • Index Legend This option opens the Index Legend dialog box so you can see a key to the index indicators (arrows) used in the Links display area. you must have more than two tables available for linking. • Clear Links This option removes all the links in the tables.To activate this button.

After completing this unit. You can do the initial formatting. When a field is placed on the report. The report created in the Design tab is a kind of virtual report. and totaling needs. and more. it does not retrieve the data. and so forth. specify sorting. Thus. you begin in the Design window. set up complex formulas. While working in the Design tab you manipulate “representatives” or placeholders of objects. you will be able to: • Describe the Design window area • Describe toolbars Understanding the Design window When creating a report. without tying up the computer or network resources needed to gather the data. you can add and delete fields and other objects. It designates and labels the various sections of the report. place objects in the sections where you want them to appear. the program uses a frame to identify the field on the tab. move them around.The design environment The Design window is the environment in which you will create the report. The Design tab is where you do most of the initial work when creating a report. also referred to as the Design tab. not the objects themselves. it has the structure and instructions for creating the final report. but it is not the report itself. grouping. To turn the Design tab Creating a Report—Learner’s Guide 21 . The Design tab offers faster previewing of information and layout because you are not working with the actual data itself.

• Report Footer This section is used for information you want to appear only once at the end of the report (such as grand totals) and for charts and cross-tabs that include data for the entire report. The bulk of the report data appears in this section. It can also be used for charts and cross-tabs that include data for the entire report. or output it in any other way. When you begin creating a report. Data adding occurs whenever you preview the report. Column headings. • Details This section is used for the body of the report and is printed once per record. and other summary information are often placed here. or “title page” information is included in the Report Header. The actual data appears in the report. Place the data fields on which you want to report in this area. • Page Footer 22 Fundamentals of Report Design—Learner’s Guide . Items placed here print only on the last page of the report. • Page Header This section is used for information that you want to appear at the top of each page. and other similar information. This section can also be used to display field titles above the fields on a report. and page numbers are common entries in the Page Header. This information (database fields and text) prints for every record selected on the report. Items placed in the Report Header print only on the first page of the report. • Report Header This section is used for the report title and other information you want to appear at the beginning of the report. total number of pages. company logo.report into a final report or into a report that you can fine-tune. Crystal Reports automatically creates five areas or sections in the Design window. Often the name of the report. the print date. print it. Grand totals. This can include such things as chapter names. you add data. Objects in the Page Header print at the top of every page of the report. the name of the document. print dates.

Working with toolbars in the Design window The Report Designer window includes several toolbars. Note: The names of the five areas can also be shortened to their abbreviated forms (RH.This section usually contains the page number and any other information you want to appear on the bottom of each page. however. PH. RF. Each section is indicated by a section boundary. • Formatting This toolbar contains commands for formatting the selected field. Page numbers are often placed in the Page Footer. you can drag the bottom line only to affect the size of the section. You set the Short Section Name option in the Design View area of the Layout tab in the Options dialog box from the File menu. You can also set this option by right-clicking on one of the section names and selecting Show Short Section Names from the shortcut menu. D. These lines indicate the separation of the areas and do not print to paper. Objects placed here print at the bottom of every page. The toolbars are: • Standard This toolbar contains several commonly used commands. and PF). Crystal Reports groups several commonly used commands on a toolbar that remains on screen at all times unless you choose to turn it off using the Toolbar command on the View menu. You can move these bars to change the amount of space reserved for each section. • Insert Tools Creating a Report—Learner’s Guide 23 . You click and drag the section divider to the desired position.

As you approach the edge of the screen. place the pointer over the icon and hold it there until a tooltip appears. • Expert Tools This toolbar provides quick access to many advanced experts. 24 Fundamentals of Report Design—Learner’s Guide . Drag the entire toolbar to the desired location. increasing the speed with which you create reports. Note: The ability to customize Crystal Reports by using Add-ins in the Report Designer allows report developers to extend the functionality of the application. • Navigation Tools This toolbar provides buttons for refreshing a report’s data and for moving around the report. the toolbar automatically stretches to match that side. This flexibility provides opportunities to customize Crystal Reports to your company's specifications. This customization can include application-specific toolbars. Tip: If you are not sure about the function of a button on the toolbar. You can position them on any of the four sides of the screen. branded billboards. • External Command This toolbar is where organizations can access custom applications or plug-ins that they have created for Crystal Reports.This toolbar provides quick access to advanced report enhancing features. or float them on your design area. between groups of buttons. To move a toolbar. The toolbars are floating toolbars. You activate a toolbar command by clicking the appropriate icon. Each toolbar displays an icon that visually describes the command it represents. splash screens. or on the unused area at the beginning or end of the toolbar. and launching of other applications. click and hold in an unused part of the toolbar. The toolbar eliminates some of the steps needed to activate a command.

and resize on your report. You can dock the Field Explorer dialog box. lines. Alternately. modify. • Selected the Field Explorer from the View menu. you need to place information on the report. and boxes are examples of the types of objects you can place. After completing this unit. you will be able to: • • • • • Describe the Field Explorer Describe the Report Explorer Describe the Repository Explorer Describe the Workbench Determine data field type Working with the Field Explorer Database fields. or delete fields on the Design and Preview tabs. group name fields. move. You’ll see the Field Explorer after you have: • Clicked the Field Explorer button on the Standard toolbar. parameter fields. similar to the Design tab.Inserting objects on a report To create a report. In free-floating mode. formula fields. You access and insert these objects onto the report from the Field Explorer. The Field Explorer’s toolbar offers these functions: • Insert to Report Creating a Report—Learner’s Guide 25 . SQL expression fields. dock the Field Explorer as a tab. The Field Explorer displays a tree view of database fields and special fields that you can add to your report. drag the Field Explorer to any location. Use the Field Explorer to insert. and running total fields that you have defined for use in your report. It also shows formula fields.

You can insert more than one field at a time by selecting multiple fields. SQL expression field. • Duplicate Use this option to make a copy of the formula that you have selected in the Field Explorer. • Browse Use this option to browse data for a database field. parameter field. parameter field. or running total field. you can drag and drop it in the Design or Preview tabs. parameter field. SQL expression field. right-click. or running total field. to insert a field. On the Standard toolbar. • Edit Use this option to modify an existing formula field. or running total field. • New Use this option to create a formula field. SQL expression field. • Delete Use this option to remove a formula field. parameter field. You can also select multiple fields. formula field. or running total field. or SQL expression field. and choosing Insert to Report. To insert fields onto a report 1. Tip: Each button on the Field Explorer’s toolbar has an associated shortcut option that’s displayed in the tooltip. • Rename Use this option to modify the name of an existing formula field.Use this option to add a field to the report. and choose Delete to remove them all at once. SQL expression field. right-clicking. 26 Fundamentals of Report Design—Learner’s Guide . click Field Explorer. Once the copy is created you can rename and edit it. Alternatively.

Expand the individual tables to see all the fields they contain. 5. and then clicking in the report to place them. You can also drag and drop fields to add them to the report. 4. Select the field you want to appear in the report. a check mark appears on the field in the Field Explorer. Expand the Database Fields folder to see all the tables chosen from the database(s). You can right-click the field in the Field Explorer to invoke a shortcut menu that displays the Insert to Report option. right-clicking.” You can work with report objects directly from the explorer. Tip: You can insert more than one field at a time by selecting multiple fields. this dialog box remains on screen until you close it. Working with the Report Explorer The Report Explorer appears when you select the Report Explorer command from the View menu. Click Insert to Report and then click to place it in the report. choosing Insert to Report. To speed the report building process. or when you click the Report Explorer button on the Standard toolbar. You can move this dialog box wherever you want. If you select this option while a child node is highlighted. 3. all remaining nodes are expanded. 2. only the nodes that are part of the child are expanded. The Report Explorer's toolbar provides buttons that let you expand or collapse your report's tree view and choose the report items to display by type: • Expand Use this option to expand all child nodes of the tree view under the selected node. Creating a Report—Learner’s Guide 27 . If you select this option while the root node is highlighted. After you place a field onto a report. The Report Explorer displays a tree view of the sections in your report and lists the report objects contained in each section and works like a “report navigator.The Field Explorer dialog box appears.

and so on. if you right-click a section node. When you right-click the selected item. The root node is the report itself. similar to the Design tab. Graphical objects include charts. Likewise. you see a menu that contains the actions you can carry out on the item. • Show/Hide Grids and Subreports Use this option to show or hide cross-tabs. OLAP grids. Within each section. and so on. You can dock the Report Explorer dialog box. boxes. • Show/Hide Graphical Objects Use this option to show or hide graphical objects in your report. For example. • Show/Hide Data Fields Use this option to show or hide data fields in your report. maps. You can also dock the Report Explorer as a tab. Data fields include formula fields. or if the selected node has no children. format. the report's fields and objects are listed. In free-floating mode. and text objects. while the first-level nodes represent the report's sections. the menu contains the options to hide. and subreports in your report. suppress. The content of the Report Explorer represents the content of the report in a tree view. 28 Fundamentals of Report Design—Learner’s Guide . if you right-click a text object. drag the Report Explorer to any location. lines. and OLE objects. to format its font or color. Any item you select in the tree view will be selected in the report (in either Design or Preview modes). BLOB fields.Note: This option has no effect if selected while a report object is highlighted. You can modify report fields and objects by selecting them in the Report Explorer. summary fields. the menu contains the options to edit the text.

Web Intelligence reports). you cannot add additional fields or report objects when using the Report Explorer. Creating a Report—Learner’s Guide 29 . however. Click the Report Explorer icon on the Standard toolbar. These indicators are available if you are using a Microsoft Windows operating system only. • Items with hyperlinks are shown as blue text with a solid underline. but you can delete them.Note: • You can select multiple fields for formatting by using Ctrl-click. Items with Report Part hyperlinks are shown as green text with a dashed underline. To use the Report Explorer 1. • You can use the openDocument function to create hyperlinks to other types of reports (for example. • Items connected to a BusinessObjects Enterprise Repository are shown with the repository icon beside them.

3. These objects are accessible to users and report developers for use in new reports. Physically.The Report Explorer appears. Working with the Repository Explorer The repository is the central location for you to store and manage your report objects. 2. the repository is a database that stores supported object types: • • • • • Text objects Bitmaps Custom functions Commands (queries) List of Values 30 Fundamentals of Report Design—Learner’s Guide . Apply the changes. Right-click the field you want to format and select the option you want to apply from the shortcut menu.

In free-floating mode. Creating a Report—Learner’s Guide 31 . similar to the Design tab. The BusinessObjects Enterprise Repository is contained in BusinessObjects Enterprise. Use these filters to find specific items by words from the Name or Author fields in the Add Item dialog box. You can also select options to sort multiple items by name or by type. • Advanced filtering Use this option to display filtering options at the bottom of the Repository Explorer. Note: Text entered in the filtering fields of this option is not case sensitive. Click the Repository Explorer icon on the Standard toolbar. By maintaining a shared repository of report objects. A central location for report objects also helps with the task of managing your data—an important benefit in maximizing productivity and minimizing costs at your company. • Logon/Logoff Use this option to log on/off the repository in BusinessObjects Enterprise. Note: If you aren’t logged on. you can modify a particular object and update all reports containing that object as they are opened for use. you can install a version of BusinessObjects Enterprise to access the repository. You can dock the Repository Explorer dialog box. • Insert a new folder Use this option to add a new folder to the repository. Depending on the version of Crystal Reports you have. drag the Repository Explorer to any location. Tip: Hover your mouse’s cursor over any object in the Repository Explorer to see a tooltip. you delete all the items it contains.The Repository Explorer’s toolbar provides buttons that let you add new folders. Use this dialog box to limit the type of repository items displayed in the Repository Explorer. and so on: • Change view settings Use this option to open the View Settings dialog box. You can also dock the Repository Explorer as a tab. search for items. Tooltips for text objects and bitmaps include Author and Description information as well as the complete text of the SQL statement. To open the Repository Explorer 1. a no server connection message is displayed in the Repository Explorer. When you delete a folder. • Delete the item/folder Use this option to permanently remove the selected item or folder from the repository.

and Authentication text boxes.Tip: Another way to do this is to click the Repository Explorer option under the View menu. If you’re not logged onto the repository in BusinessObjects Enterprise. Enter the appropriate information into the System. displaying the contents of the repository. 2. Click OK. The Log On to BusinessObjects Enterprise dialog box opens. Expand the top node to see the repository contents. click the Logon button on the toolbar in the Repository Explorer. 4. Password. if required. 32 Fundamentals of Report Design—Learner’s Guide . 3. 5. The Repository Explorer appears. User name.

When you have connected to your system.Working with the Workbench The Workbench is a folder structure that can represent the type of projects you work on. report package. remove. reports. a method of checking for errors in a report. Many of the options that are available on the shortcut menu are also available on the toolbar. you can create projects (folders) that contain one or more reports. the Open dialog box appears so that you can search for a Crystal report that you have previously created. the program adds a new folder under the root node that is called Workspace. • Remove Use this option to remove a report. you can choose an object package to add to the Workbench. Creating a Report—Learner’s Guide 33 . • Rename Use this option to rename a folder in the Workspace area. For example. and object packages. The option is available for individual reports or for folders of reports. You can reorganize the files in a folder or folders by dragging and dropping them where you want them to appear. ○ Add New Project When you select this option. This section describes only the additional options that are not available on the toolbar. You can right-click any item in the workspace area of the Workbench to see a shortcut menu. if you are a report designer in the financial department of an organization. you could have separate folders for Accounts Payable and Accounts Receivable. Use the options on the toolbar to add. The Workbench includes a toolbar: • Add Use this option to add a new object to the Workbench: ○ Add Existing Report or Add Current Report When you select this option. Crystal Reports begins checking the report(s) immediately and displays the results in the Dependency Checker. or rename folders. the program prompts you to log onto your BusinessObjects Enterprise system. • Check Dependencies Use this option to initiate the Dependency Checker. In the Workbench. You can add reports to this folder. ○ Add Object Package When you select this option. You can also drag report files from Windows Explorer and drop them into the folder of your choice in the Workbench. or folder from the Workspace area. Project folders offer a way to organize the reports in the Workbench. • Open Use this option to open the report or report package that you have selected in the Workspace folders.

The Workbench appears.) When you choose this option.Note: • You cannot undo this option. point to Add. the Publish Object dialog box appears. Enter a name for the project. 2. • Publish to BusinessObjects Enterprise Use this option to publish a folder of reports to BusinessObjects Enterprise. 34 Fundamentals of Report Design—Learner’s Guide . and then click in the white space area of the workspace to set the project folder. you remove all of the items in it at the same time. To add a new project to the Workbench 1. Right-click Create a new project in the workspace of the Workbench. Click the Workbench button on the Standard toolbar. You can publish your reports individually or as an object package. 3. and then click Add New Project. (Object packages can be scheduled in BusinessObjects Enterprise as a single entity. An untitled folder appears. • When you remove a folder.

From the Field Explorer. Determining data field types You can take a look at a sample of the actual data in the table before you place the field on your report in the Browse Field Data dialog box.To add a report to the Workbench 1. Locate the report you want to add from the Open dialog box. Click the project folder in the Workbench. The report is added to the folder. 2. Scroll through the list. 3. Click Close when finished. Select the field. 2. From the Add menu. 3. click Browse. click Add Existing Report. To browse field data 1. 4. Creating a Report—Learner’s Guide 35 . The Browse Data dialog box opens. and then click Open.

If you have large tables with more than 500 records. depending on what has been set up. 36 Fundamentals of Report Design—Learner’s Guide .Note: The default setting is either to display the first 500 records or to time out at five seconds. Tip: You can also browse the field data in the database tables after you place the field on the report by right-clicking the field and selecting Browse Field Data from the shortcut menu. you will not see examples of all the data contained in the fields.

Previewing a report When you create a new report. the HTML Preview tab shows a converted format. the HTML Preview option lets you see an instant rendering of your report to HTML without leaving the Crystal Reports design environment. you can review the spacing and formatting of your report and see the actual results of all your summaries. After completing this unit. and displays the report in the Preview tab. • From that point on. By switching between the two tabs. you are ready to preview your design. and record and group selections. which shows you the date and time that the data was last refreshed. Creating a Report—Learner’s Guide 37 . you begin in the Design tab. makes the necessary calculations. Note: You retain full design capabilities in the Preview tab. it retrieves data from your underlying data source(s) and saves it with the report (unless you have set up the program not to save data). you can make adjustments in your report design to yield the best results on the web. Once in the Preview tab. • Click the HTML Preview button on the Standard toolbar to see an HTML rendering of your Crystal report as it will appear when published to the web. When you need to make sure that your report design is appropriate and correct over the web in a zero-client environment. When you save data with a report. You can view the report in the Preview tab to see the results of your design. With the data in place. Unlike the Preview tab. the data is saved in a cache file with the report on the client machine. you can evaluate the formatting and layout of your design. Tip: The area at the bottom of the Report Designer environment is called the page controls area. formula calculations. which shows the true report format. The program works with data in this manner: • The first time the Preview tab is used. The program gathers the data. you will be able to: • • • • • Describe the methods of previewing a report View a report Explain the differences between working in the Design and Preview tabs Describe page controls Describe the status bar Previewing reports Once you have placed data fields on your report. • Click the Refresh button to the far right of the Report Designer’s screen. The methods to switch to the Preview window are: • Click the Print Preview button on the Standard toolbar. the program uses the saved data whenever you preview the report unless you specifically refresh it or add a field that requires the program to retrieve new data.

Once the report is open in HTML Preview. You can use the group tree and toolbar to navigate from one page of the report to another without scrolling up and down. Viewing a report Crystal Reports provides two views for previewing a report: • Standard view • Preview panel Standard view In the standard view. Do this in the Servers tab of the Options dialog box in Crystal Reports. you will see a stationary group tree to the left of the report and a stationary toolbar above the report. you don’t have to do any special configuration to make the HTML Preview feature work. the report is displayed one page at a time. a progress indicator displays. you need to configure the HTML Preview feature. the program must use a stand-alone Report Application Sever (RAS) to generate the preview. For stand-alone reports (unmanaged reports). In this case. If you open a large report in HTML Preview. The HTML Preview also displays the page margins so you know what the report will look like if it is printed.In the case of reports that are published to BusinessObjects Enterprise (managed reports). 38 Fundamentals of Report Design—Learner’s Guide .

The Preview panel typically displays the names of the groups and subgroups you created in your report. The Preview panel view presents a split screen: • The right pane displays the report. • The left pane displays a high-level outline of the report. When you click the tree node for the group that interests you. customize these names using the Options tab of the Insert Group or Change Group Options dialog box. you can move to the beginning or end of the report. Preview panel You can display or hide the Preview panel using Toggle Preview Panel on the Standard toolbar. the navigation features of the Group Tree view make your work extremely efficient. Creating a Report—Learner’s Guide 39 . For longer reports or reports in which you want to jump back and forth between different groups. or you can move backward and forward through the report one page at a time. showing the hierarchy of groups and subgroups in a familiar tree format. the program jumps immediately to the part of the report that contains the information for that group. For shorter reports or reports in which you're primarily interested in seeing the “bottom line” totals. the standard view provides all of the functionality you need. You can.Using the navigation buttons in the Preview tab. however.

it is quicker to make the changes in the Design tab. you will find it easier to work in the Design tab when working with multiple sections and areas. Some additional things to consider are: • The Design tab and Preview tab are tied together internally. Zooming in at a high magnification level lets you focus on the finer details of your report. whichever is the most recent. and how many records were returned. Working in the Design and Preview tabs Often. its position on the report. When you hover your cursor over a button on the toolbars. You have the same formatting capabilities in the Preview tab as you do in the Design tab. If the data was initially retrieved or refreshed today. to cancel the printing of the report. and so on.Zooming in and out Zooming enables you to move from a full-page view to a zoom between 25% and 400% as well as the Whole Page and Page Width options. By default. Page controls Page controls enable you to move forward or backward through the report one page at a time. the status bar displays a tooltip. providing essentially the same functionality you have when working with a report in the Design tab. The Data Age indicator indicates the date the data was last refreshed or initially retrieved. Magnification factors can be set to different percentages in the Design and Preview tabs. letting you see if graphics are positioned properly. Any changes made in one are reflected in the other. the status bar is shown (a check mark appears beside the command on the menu). to move to the first or last page. However. You can show or hide the status bar by using the Status Bar command on the View menu. it indicates the time it happened. and to close tabs. Menus (both menu bar and shortcut menus) and toolbars remain active. when you are making numerous changes. Taking a “bird’s-eye view” of your report gives you an idea of the overall layout of your report. You may sometimes want to work in the Preview tab where you can see the effects of your changes instantly and how the report will be printed. The status bar The status bar is found at the bottom of the Design tab and displays the selected field name. 40 Fundamentals of Report Design—Learner’s Guide .

When you place a field in the Design tab.• The Preview tab has a single vertical ruler at the left of the tab rather than the individual section rulers seen in the Design tab. the process of building and modifying a report is the same in both the Design tab and the Preview tab. • The record counter. Working in the Preview tab has a different feel from working in the Design tab. In the Preview tab. you are actually selecting every value in the field: • The program places a sizing frame around the specific value you select. While section names appear only once in the Design tab. only the field frame is highlighted in the Design tab. When you highlight the field. a single field frame represents all those values. • It highlights every other value in the field. whereas. When you highlight a field or formula field value. With a quick look you can tell which report section the data is printing from. depending on the number of records in the database. or even thousands of values. Tip: When working in the Preview tab. not just the placeholders (as in the Design tab). you are working with the actual data. the values themselves appear. they print each time a section prints in the Preview tab. The functionality of the ruler is the same. and the Page Forward/Page Back controls are all active in the Preview tab. hundreds. sizing handles appear on the frame and the frame changes color. • The Preview tab highlights every value when you select a field. • The Preview tab identifies report sections in the shaded area to the left of the data. remember that each change you make may require extra time to process because you are working with the actual data. Instead of a field frame representing many field values. Creating a Report—Learner’s Guide 41 . Aside from the differences in appearance. however. the Data Age indicator. Each field in a database contains dozens.

To add summary information 1. The Document Properties dialog box appears with the Summary tab active. or a comment about some particular data on the report). After completing this unit. you will be able to: • Add summary information • Save a report • Check a report for errors Adding summary information You can save summary information with the report. a report title. There may be times when you want to include non-printing comments with a report (a personal note to the report recipient. The comments do not print with the report. they remain in the Summary tab of the Document Properties dialog box where they can be reviewed on demand. report title. Summary information contains such things as the report author. 42 Fundamentals of Report Design—Learner’s Guide . a note to explain more thoroughly the data on which the report is based. Select File ➤ Summary Info.Saving a report You can add information to better describe the report and then save your report to a number of options in the Save dialog box. Summary information provides a facility for including anything from a short note to hundreds of lines of text with your report. and comments.

• My Connections This folder shows a list of data sources to which you are connected. the corresponding button will not be displayed. My eBooks.COM Crystalreports.com is a report-sharing service that you can use to distribute your reports over the Web. instead of by email or hard copy. • Favorites This folder contains your frequently-accessed files. If one of these folders does not exist on your machine. • My Documents This folder typically contains the History. Save. Enter the desired information and click OK when finished to return to your report. Creating a Report—Learner’s Guide 43 . The Open. • Enterprise If your company has deployed BusinessObjects Enterprise.2. and Save As dialog boxes enable you to open or save a report conveniently to personalized folders that are created by your operating system. • CR. and My Pictures folders. The personalized folders are: • Desktop This folder contains the contents of your Windows Desktop. a web-based report management tool. Saving a report The saving function is the same in Crystal Reports as in many other applications. you can log onto the system so you can view the reports stored on the Enterprise system.

but do not preview. the addition of the preview picture may increase the size of the file. • Because the snapshot is saved in the report file. You can also preview a sample of the data. Also. select the Save Preview Picture check box. If you turn on the feature in the Design tab. Note: The Save Preview Picture check box is active by default. Click OK. 44 Fundamentals of Report Design—Learner’s Guide . 2. if required. In the Summary tab of the Document Properties dialog box. and save the report but do not preview. To save a snapshot of a report 1. the snapshot will not be taken. The Document Properties dialog box opens. the snapshot will not be updated. • The snapshot is only updated when you preview.Saving a preview of a report You can save the first page of a report as a preview or “snapshot” of a report so that you can view the report when opening it. Some considerations include: • You must preview the report before a snapshot can be taken. 4. Preview the report. Select File ➤ Summary Info. if you modify the report in the Design tab. 3.

or when you select the command on the Report menu for a report that you have open in Crystal Reports. Click the report you want to preview. 2. Click File ➤ Open. Errors listed in the Dependency Checker show the following information: • Error type Icon Meaning Success. or you can select a report in the Workbench to check for errors. You will see a snapshot of the first page of the report. Checking a report for errors The Dependency Checker appears when you check a report or project for errors in the Workbench. The Dependency Checker registers several types of errors: • Report part hyperlink errors • Repository object errors • Formula compilation errors You can use the Dependency Checker on an opened report in the Report Designer.To preview the snapshot 1. Click the Preview button (last button on the toolbar). The Dependency Checker has verified that there are no errors in the file. Creating a Report—Learner’s Guide 45 . 3.

• Description of the error • Location of the file that contains the error Double-click an error to open the target report and go to the report object so that you can fix the problem. description. The Dependency Checker has found an error that you must fix so that the report will run correctly. • Sort By Use this option to sort the messages by type. • Options Use this option to open the Dependency Checker tab of the Options dialog box.Icon Meaning Warning. for example. 46 Fundamentals of Report Design—Learner’s Guide . The Dependency Checker has found something in the file that might be a problem. but you don’t have to fix it to have the report run correctly. You can verify the warning. • Clear Use this option to remove the selected message. Use this tab to select the conditions that you want to check for when you run the Dependency Checker. • Copy Use this option to copy the message to the clipboard so that you can paste it into another application. If the report object cannot be found (because. When you right-click a message in the Dependency Checker. you receive a message that recommends you run the check again. a shortcut menu appears with these options: • Go To Use this option to open the report that contains the error and to go to the object that is causing the problem. or location. number. you’ve deleted part of the report since checking for errors). You can also select a message and press Enter or double-click to open the report. • Clear All Use this option to remove all of the messages. Error.

A status message appears in the Dependency Checker. 2. right-click the message and select Go To to open the report that contains the error and to go to the object that is causing the problem. Activity: Creating a report Objective • Create a report from a blank report by using the Customer table and Orders table from the Xtreme Sample Database (via an ODBC data source). preview it. Delete the print date and page number that appear by default. Select a report or project in the Workbench. Add these database fields in the report: • • • • • • Customer Name City Region Order Amount Order ID Order Date 4. Once you have placed your data fields onto your report. Click the Dependency Checker button on the Workbench toolbar or on the Standard toolbar. 3. Instructions 1. 2. 5.To check a report for errors using the Dependency Checker 1. Create a report by using the Blank Report option on the Start page. Tip: You can also select a message and press Enter or double-click to open the report. 3. Creating a Report—Learner’s Guide 47 . Add the Customer table and the Orders table. If an error occurs.

Add summary information (Report Author. Click Zoom to further explore the magnification options.Create a project called Report Design I in the Workbench.Add the newly created report into this project folder. Open the Report Explorer. 11. 8. Change the magnification in the Preview tab with the toobar button.Check the report for errors by using the Dependency Checker. Note: Save all subsequent activity reports to My Documents. 12.6. Comments) and save a snapshot. notice the objects listed in the Report Explorer that appear on your report. Your report should look similar to this example in the Preview window. 48 Fundamentals of Report Design—Learner’s Guide .rpt to My Documents. 10. Note: Add all subsequent activity reports to this project in the Workbench. 9. 7. 13.Save the report as Creating a report.

You can reposition and resize objects from either the Design or the Preview tab. each one marking the intersection of a vertical and horizontal gridline. copy. Creating a Report—Learner’s Guide 49 . A grid is an imaginary series of vertical and horizontal lines across your working area.Positioning and sizing objects Once you have placed fields and objects on your report. and paste objects Positioning objects using a grid Different reporting needs require different methods of positioning objects on your report. A series of dots can be displayed on the Design area. The default setting in Crystal Reports is Snap to Grid. much like graph paper. you will be able to: • • • • • • • • Position objects using a grid Position objects using guidelines Position objects using free form placement Lock an object’s position and size Move objects Align objects Resize objects Cut. After completing this unit. you may want to reposition or resize them. Tip: Positioning and sizing objects is easier in the Design tab because you are moving only the placeholder rather than the representative data.

4. This functionality makes it easy to line up objects both horizontally and vertically. 3. You also can choose to see the grid in both the Design and Preview windows. Tip: You can also right-click over a blank area of the report window. The Grid display and Snap to Grid on/off options are independent of each other. The Options dialog box appears. As you move objects around. 50 Fundamentals of Report Design—Learner’s Guide . 2. Confirm that Snap to Grid is selected to have objects align automatically. and then access the Snap to Grid from the shortcut menu.When using Snap to Grid. Select the Grid check box to visually display the grid in the Design tab. Click File ➤ Options ➤ Layout. your objects are placed at a gridline. To select the grid display option 1. Click OK. they “snap” from gridline to gridline.

To select the guidelines option 1. Caution: You can have as many guidelines as you want. in one step. Creating a Report—Learner’s Guide 51 . any object attached to it will be stretched because the other side is anchored by the other guideline. When the Guidelines check box is selected. aligning the object against the horizontal and vertical rulers to let you clearly see the placement. but beware of “guideline clutter. The guideline handles will not appear in the Preview tab unless you select an object on the report. In this case. you can insert a guideline and attach the objects to it. Click File ➤ Options. objects can be attached at both ends. Tip: Remember that guidelines are visible in both the Design and Preview windows only if you have the Show Guidelines in Design and Show Guidelines in Preview check boxes selected under File ➤ Options ➤ Layout. When you click a field to move or resize the object.Positioning objects using guidelines If you want to line objects up with one another. you can move the guideline to reposition all the objects attached to the guideline. Crystal Reports automatically places a vertical marker in the ruler for each field you place in the Details area. if you move a guideline. These markers or “handles” let you move the fields and their column headings horizontally on your report at the same time by moving the guideline arrowhead. tracker guidelines appear. Then.” If you find yourself with many guidelines on your report.

Select the Guidelines check box in the Design (or Preview) area. and then click OK. Objects dragged to this guideline “attach” themselves to it.The Options dialog box appears. if not visible. 52 Fundamentals of Report Design—Learner’s Guide . 3. However. Note: Clearing the Guidelines check box in the Options dialog box causes your guidelines to disappear within the Design window. Attach all the objects that you want to manipulate then drag the guideline arrowhead to move all the objects together. ensuring that all objects are lined up together. the arrowheads still show in the ruler lines so you can still move objects that are attached to the now invisible guideline. 2. A small triangle (arrowhead) displays pointing to the Design window with a dashed line extending from it to the opposite side of the Design area. To create guidelines 1. Click the Layout tab. Click in either the vertical or horizontal ruler. 2.

To remove a guideline 1. Drag the object away from the guideline. fields. To remove all guidelines 1. 2. Moving objects You need to select an object before you can move or resize it. charts. Positioning objects using free-form placement If you turn the gridlines and Snap to Grid off. Select the object whose size and position you want to lock. Drag the guideline arrowhead in the ruler away from the Design window. you cannot drag the object in the Report Designer and the Size and Position command becomes inactive. On the Formatting toolbar. maps. and OLE objects. charts. click Lock Size/Position. In the Design and Preview tabs. To lock an object’s size and position 1. you have the freedom to place objects anywhere on the Design window you want. cross-tabs. Creating a Report—Learner’s Guide 53 . fields. You can choose to show the grid or not. and OLE objects. Tip: For the examples and activities in this training guide. keep Snap to Grid selected. you can select lines and boxes with other objects such as text. OLAP grids. When you set this option. Right-click the guidelines and select Remove All Vertical Guidelines or Remove All Horizontal Guidelines from the shortcut menu. you can select multiple objects such as text. Removing a guideline is similar to removing a tab from a word processor ruler line. Locking an object’s position and size You can lock the position of the selected report object so it can’t be moved. maps. cross-tabs. Objects can even be placed offset from one another. In the Design tab. OLAP grids.To remove an object from a guideline 1.

use the Forward command to move the selected object forward (up) one layer in the stack. • To Back When you have multiple objects in a stack. In order to access an object you have moved backward. the last object you select. Move your cursor over the object until the four-way cursor appears. Click the object once to activate the handles. 2. Click and drag the object to a new position. use the To Front command to move the selected object to the front (top) of the stack. then no object will be moved. • Forward When you have multiple objects in a stack.Some of the operations deal with the concept of the main object. The other objects will remain in their original locations. 54 Fundamentals of Report Design—Learner’s Guide . Ctrl-click each object in succession. However. Click the object once to activate the handles. To select a single object 1. then the main object and those that can be accommodated will be moved. use the Backward command to move the selected object backward (down) one layer in your stack. Certain limitations apply in certain operations: • If the new location of a multiple objects selection does not accommodate all the selected objects. You can also right-click the section and click Select All Section Objects from the shortcut menu. if the new location does not accommodate the main object. The Move submenu includes these commands: • Backward When you have multiple objects in a stack. To move a single object 1. • To Front When you have multiple objects in a stack. To select multiple objects 1. 3. you can move objects that are above it out of the way or move those objects backwards. use the To Back command to move the selected object to the bottom of the stack.

This method is handy when you want to move objects or line them up. and then click the appropriate command. Create a new guideline by clicking in either the horizontal or vertical ruler bar with the cursor. 3. Click the first object once to show its handles. handles appear on all the objects 3. you can move the guideline arrowhead to move the objects. Once you have selected all desired objects. As you do this. click and hold on any of the selected objects and drag the objects to a new position. 2. click an unused area of the Design window to clear your object selections. Select the objects. Once your objects are in their new position. Right-click an object. 1. To move multiple objects with a guideline When you placed your database fields into the Details area. To move objects in a stack 1. and then click and hold on any of the selected objects.To move multiple objects with the four-way cursor 1. click and hold to draw an imaginary box around the objects you want selected. Using the cursor. release the Ctrl key. the fields were attached to guidelines. 3. all objects partially surrounded by the marquee are selected. 2. Creating a Report—Learner’s Guide 55 . Once you have selected multiple objects. then hold down the Ctrl key on your keyboard and click the other objects. 2. To select multiple objects with a marquee or lasso Tip: Clear any selected objects before using the marquee or lasso by clicking in the white section of the Design tab before you draw the lasso. When you release the mouse. Drag objects to that guideline to attach them to the line. The four-way cursor appears as you drag the objects to a new position. You can move all fields attached to a guideline by grabbing the guideline arrowhead and moving it to a new position. 1. Once all objects are attached. point to Move.

Certain limitations apply in certain operations: • You can select multiple objects in the same section or different sections of a report and align them. Middles. if you select an object in the Report Header and another object in the Page Header. 2. To make an object the main object. To align objects 1. This cursor may appear as vertical. Some of the operations deal with the concept of the main object. the object is selected. Click Format ➤ Align and select the required alignment from the list. Click the object once to select it. Bottoms Baseline Lefts. When the broken line frame and handles appear. Select the objects.Aligning objects The main object is the object that you want to align other objects with. the last object you select. with the condition that the alignment will not result in an object being moved to a different section of the report. Rights To Grid (Snap to Grid) You can change the main object by right-clicking a new object. Centers. or diagonal. you can align them vertically but not horizontally since moving objects horizontally would result in moving one of the objects to a different section. You can align selected multiple objects based on the position of the main object: • • • • Tops. Resizing objects You can resize objects according to: • Width • Height • Size To resize an object 1. You can also right-click the object and select Align from the shortcut menu. depending on the handle you have grabbed. 2. Drag one of the handles with the double-arrow sizing cursor to change the size of the object. For example. 56 Fundamentals of Report Design—Learner’s Guide . horizontal. click it last when doing a control-click multiple selection.

bitmap. To cut. and pasting objects To facilitate faster report design. and so on). you are copying the actual data value of that object. Click Edit ➤ Cut/Copy/Paste. Cutting. To resize objects based on the main object 1. Copy. you can copy and paste objects with data to other applications (as text. 3. you can copy and paste objects from one section to another area. and Paste cannot be applied to subreports. and dragging it to the desired location. Same Height. Right-click the object (or the main object in multiple selections) and select the applicable operation from the shortcut menu. you can press Ctrl-X or Shift-Delete for Cut. the object retains its data. copy. or paste an object Several methods can be used: 1.You can resize multiple objects at the same time by selecting them. If you paste the object into other applications. holding down the Control key. or Ctrl-V or Shift-Insert for Paste. Select Same Width. Alternately. The size of the main object is used to resize the other selected objects. not just the object definition. then using the double-arrow sizing cursor to stretch or shrink objects. or Same Size to resize the objects. metafile. You can copy an object from the Preview tab to the clipboard. The last object you select is the main object. Tip: If you select a single object. Ctrl-C or Ctrl-Insert for Copy. Note: Cut. 2. 2. This way. Right-click the main object and select Size from the shortcut menu. retaining the object’s properties. You can also click Format ➤ Size. Creating a Report—Learner’s Guide 57 . When you copy an object. you can copy it easily by clicking it. Ctrl-click the objects once to select them. copying.

you may want to change their appearance. 2. Some of the more frequently used features of the Format Editor are the options listed on these tabs: • • • • Common Border Font Number Common tab of the Format Editor On the Common tab. Click the appropriate formatting button on the Formatting toolbar. Crystal Reports enables you to change many of the attributes such as font.Formatting objects Once you have placed fields or objects on your report. more complex method of formatting. rotate and align text. add tooltip text. and lock the size and position of the selected object. and highlighting. keep the field together if a record spans more than one page. and underline through the Formatting toolbar and the Format Editor. fonts. text formatting and alignment. limit the number of lines the field can print. control borders of the field. These attributes can be combined to make your reports presentation quality. font color. After completing this unit. Select the object you want to format. For example. you can suppress the field. border lines. font size. and attributes that you prefer. Database fields can be formatted to print with the colors. you might prefer your numbers to be printed with two decimal places and your dates to be in the North American format. 58 Fundamentals of Report Design—Learner’s Guide . Formatting fields using the Format Editor Using the Format Editor is another. To format fields using the Formatting toolbar 1. you will be able to: • Format fields using the Formatting toolbar and the Format Editor • Lock an object’s format • Use text objects Formatting fields using the Formatting toolbar The Formatting toolbar includes such options as font formatting. These fields can also be formatted to change the way the data displays on your report.

and the color for the border and the background. drop shadows. Clicking Background opens a second color selection list for you to choose a fill color for the text object. Creating a Report—Learner’s Guide 59 .Border tab of the Format Editor On the Border tab. you can select line styles.

Font tab of the Format Editor On the Font tab. You can also add a strikeout (a line through text) and underline effects. The sample box shows you the results of your choices. your options include the changing the font. 60 Fundamentals of Report Design—Learner’s Guide . size. style. and color.

or applying a condition to a specific format using a formula. the Format Editor offers these options on the Number tab. Creating a Report—Learner’s Guide 61 . Number tab of the Format Editor If you select a numeric field to format.Tip: Many of the attributes you see in the Format Editor have the formula buttons next to them. These buttons are used for conditional formatting.

if applicable. If the value to be printed is “0” (zero). • Customize Under the Customize button. ○ Negatives This option offers several different ways to display negative values. you can set various options: ○ Suppress if Zero This option functions similar to a spreadsheet. • Currency symbol area This option enables you to display a currency symbol and its type. ○ Rounding This option enables you to round a number to the specified number of decimal places or to the nearest whole number if no number of decimal place is indicated. ○ Decimal Separator 62 Fundamentals of Report Design—Learner’s Guide . ○ Decimals This option enables you to include decimals or not. then no value is shown.• System Default Number Format This option checks the settings in your Windows control panel and uses those settings for your numeric fields.

you may want to combine the first and last name of customers from your database on a mailing label. and so on. Click OK. Suppose you want to put a title on your report. The input box allows you to specify what that separator is. For example. center. if a number field is chosen. Text objects have some word processing capabilities. You can create left. Using text objects Text objects are containers that hold information giving you flexibility and control when inserting text into your report. you can also lock the format of an object so it can’t be changed accidentally. 2. you need to create a text object. ○ Thousands Separator This option enables you to turn the thousands separator on and off. right. Locking an object’s format Similar to locking an object’s position and size. Select the options on the appropriate tab that you want to apply.This option enables you to specify what character to print as a decimal separator. To change the attributes of a field 1. To do this. then the Number tab is displayed. a word. and decimal align tabs inside text objects. and use tabs. move. 2. or a paragraph. The Format Editor opens. Database fields and formula fields can be embedded inside text objects along with other text. color. A text object can contain a character. Select the object. The tab that is displayed depends on the type of field selected. allowing you to type text as well as set. Click Lock Format on the Formatting toolbar. ○ Leading Zero This option enables you to turn leading zeroes on and off as well as specify the format. tabs. Creating a Report—Learner’s Guide 63 . Right-click a field and select Format Field from the shortcut menu. 3. To lock the format of an object 1. For example. Text objects and the elements inside them can then be independently formatted with fonts.

2. This functionality is called the Move/Resize mode. ready to edit. Double-click the object. Position the text object where you want it on your report. The text object opens on your report with its own ruler line. A ruler line opens above or below the text object. When working with text objects. 4. Click outside the text object to finish the editing process. If you want to add a new paragraph in a text object. Click outside the text object to cancel the selection. The object now appears with four corners surrounding the text inside. The cursor flashes inside the text object at the insertion point. To insert a text object 1. then press Enter to move to the next paragraph. To move or reposition a text object 1. 2. 64 Fundamentals of Report Design—Learner’s Guide . This action inserts a return inside the text object. Click Insert Text Object on the Insert Tools toolbar. Once selected. 2. This line indicates you are inside the text object. empty text object attaches to your cursor. Edit the text inside the text object. The insertion point flashes inside the text object to indicate the position where inserted text will appear. You can also click Insert ➤ Text Object. click the border once to select them. and then click to release. handles appear around the object.Tip: When you have completed any editing changes. Click the text object to move it to a new position or resize it. do not press Enter to end the process. A new. 3. Click outside the text object or click Esc to cancel the selection. You can also set tabs and indents similar to the functionality in a word processor. You can also right-click the text object and select Edit Text Object from the shortcut menu. 3. To edit the text inside a text object 1. Enter the text you want to print on your report inside the text box.

3. If the text object is too close to the top of the screen to add a ruler line.Change the color of the text inside the text object to Navy. Creating a report. Creating a Report—Learner’s Guide 65 . 6. 11. Format the Region field and column heading to be centered. Rearrange the columns in this order using the guidelines: Region. Create a text object that will print “Customers & Orders Report” as the title in the Report Header. 8. Format the Order Amount field to print with no decimal places and with no dollar signs ($). Customer Name. and formatting objects Objective • Position. 5. Order Amount. Center the title and increase the font size of the text to 20 point. Activity: Positioning. not the actual data. and Order ID. Instructions 1. Change the color of all column headings to print bold and in blue. sizing. 7. City. 2. 13. 10. it will appear below.Add a single border and a drop shadow to the title. Tip: Remember to make changes in the Design tab because you’re working with placeholders. and format different fields and objects on a report. Resize the fields and column headings to accommodate the data. which speeds up the report creation process.Add this report to the folder in the Workbench. 4. if required. Order Date.rpt.Make sure the title prints in the center of your page. 12.rpt. Use Select All Section Objects. Open the previous report. size. 9.Tip: The place where the ruler line appears depends on the position of the text object. 14.Save the report as Positioning+ objects. Use the Report Explorer to format the Order Date to print with no time portion using the Format Editor.

66 Fundamentals of Report Design—Learner’s Guide .Your report should look similar to this example.

How do you select multiple report objects? Creating a Report—Learner’s Guide 67 . What objects can be stored in the repository? 4. What is the Workbench? 5.Quiz: Creating a report 1. What is the difference between using the Design tab and Preview tab? 2. What is the difference between using Print Preview and Refresh? 3.

you are now able to: • • • • • • • • Create a report Add tables Describe the design environment Insert objects on a report Preview a report Save a report Position and size objects Format objects 68 Fundamentals of Report Design—Learner’s Guide .Lesson summary After completing this lesson.

as in sales for a particular region or inventory for a category of products. Most often you are interested in only a select set of records. you will be able to: • • • • • • • Define the Select Expert Determine the criteria for record selection Understand saved and refreshed data Apply record selection Apply additional record selection criteria Modify record selection Apply time-based record selection Selecting Records—Learner’s Guide 69 . After completing this lesson.Lesson 3 Selecting Records Lesson introduction Rarely will you want a listing of every record in your database.

You are not presented with a pick list of fields. displaying the fields. Click Select Expert on the Expert Tools toolbar. a number of distributors are listed. 3. right-click that field and choose Select Expert from the shortcut menu. Choose Report ➤ Select Expert from the menu. a dialog box opens. you set the record selection of your report to include only the data you want in your report. To activate the Select Expert To activate the Select Expert.000 last year. you will be able to: • Explain the functionality of the Select Expert and its components • Define the features of the Select Expert Using the Select Expert The report you created previously will print all records in your database. you want to restrict the records printed for a particular set. If the field you want to set record selection on is on your report. To do this. 70 Fundamentals of Report Design—Learner’s Guide . in the Xtreme database that ships with Crystal Reports.Defining the Select Expert You can filter or select the records you want to see included on your report in the Select Expert. If you have not selected a field by clicking it to make it active before using one of these methods. The Select Expert opens automatically for the field you select. you can: 1. For example. You may want to report on only those in North America or only those who sold more than $30. however. 2. After completing this unit. Often.

Tip: Your record selection criterion does not have to be based on a field in your report. the Select Expert opens. • Help: This option opens the Crystal Reports online Help. the report is not affected. You can choose any field from the database as a basis for record selection. • Cancel: This option closes the dialog box ignoring any changes you made while in the dialog box. The Select Expert’s features In addition to the New and Delete buttons. the report is then updated to reflect those changes. • Browse: This option opens a Fields dialog box that shows a sample of values from the database. Once you have indicated the field you want to set the record selection on and have clicked OK. the Select Expert contains several function buttons including: • OK: This option accepts any changes you have made and closes the dialog box. • Show Formula: This option expands the Select Expert to include a display of the formula created. Selecting Records—Learner’s Guide 71 .

$50. only records from California (CA). or are you interested in specific regions. BC. or NY. which are then displayed in the report. only records with sales that are the same amount (that is.000 and $20. only records from CA.000 for the last year. 72 Fundamentals of Report Design—Learner’s Guide . • is not one of This option enables you to exclude a series of values as the criteria. for example. do you want to focus on one city or state.000.Determining the criteria for record selection Setting the filters or options limits the number of records. so that those matching records will be excluded on the report. Using the drop-down list. BC. Maybe a date range or all records below a particular value will work best. so that only records matching one of these will be included on the report. for example.000 and $20. After completing this unit. you can build selection criteria that meet your needs. you will be able to: • Describe the options that define record selection criteria • Change record selection to be case insensitive Defining record selection The first step in record selection is to define your criteria for selection. including $10. • is equal to This option enables you to specify one specific value as the criteria.000 for the last year. • is between This option enables you to select records that have a value falling between or matching one of the two specified values. meaning no selection at all. for example.000) or greater than or over $50. only records with last year’s sales between $10. Depending on the field you select. not records from CA. the available options in the drop-down list are: • is any value This option selects all records. • is greater than or less than This option enables you to indicate a specific value that records must be above or below to be included on the report. for example. • is greater than or equal to or less than or equal to This option enables you to include all records in which the linked field value is above or below (or equal to) to be included on the report. so that only matching records are included on the report. is inclusive and includes the end values. or NY. only records with sales greater than or over $50. for example. • is one of This option enables you to specify a series of values as the criteria.000. For example. for example.

” • does not start with This option enables you to indicate character(s) or value(s) that each data field does not begin with in order to pass the selection criteria. Note: If you are familiar with the Crystal formula language. and critical could all be selected using “is like c*. For example. for example. used by Crystal Reports. a second drop-down list appears that contains some sample data from your database.000. comical. with this option. You can also activate the Formula Editor from this extended window and modify this formula. Selecting Records—Learner’s Guide 73 . The Select Expert dialog box defaults to “any value.000 and $20. comical. if any. with this option. excludes records with last year’s sales between $10. you can enter your formula here. the record selection decides whether or not to allow the record to pass.” • is not like This option permits DOS wildcard characters (? and *) to specify criteria that must be excluded. a scroll list of all Crystal Reports date ranges is made available. • is not in the period This option enables you to specify a date range in which records must not fall in order to be included on the report and is only available if a date field is chosen.” • is like This option permits DOS wildcard characters (? and *) to specify criteria that must be met. for example.000 and $20. Once the percentage is calculated. for example. only customers whose names begin with the letter “A. You can choose values directly from the drop-down list or manually enter the value at the cursor prompt. • formula This option expands the dialog box where you enter your criteria.000. You can click Show Formula>>> to view the formula(s). is inclusive and excludes the end values.” If you enter a choice other than “any value” in the drop-down list box. • starts with This option enables you to indicate character(s) or value(s) that each data field must begin with in order to pass the selection criteria. for example. crystal. • in the period This option enables you to specify a date range in which records must fall in order to be included on the report and is only available if a date field is chosen. including $10. using “is not like c*” would exclude crystal.• is not between This option enables you to exclude records that have a value falling between or matching one of the two specified values. no customers whose names begin with the letter “A. you may want only the records in which profits are over a certain percentage. and critical. a scroll list of all Crystal Reports date ranges is made available. for example.

To change record selection to case insensitive in a report 1.” “ca”.Changing record selection to be case insensitive If you are not confident that data entry was consistent and California could have been entered as “CA. Otherwise. Click OK.” or even “cA” in your database. Ca. Click File ➤ Options. you will want to ensure that your record selection statement is case insensitive. you would not filter out all the records from California. 3. Select the Database Server is Case Insensitive check box to control the case sensitivity of the record selection formula(s) in your report. To change record selection to case insensitive globally 1. 2. The Report Options dialog box appears. Click File ➤ Report Options. 74 Fundamentals of Report Design—Learner’s Guide .

On the Database tab. Click OK. select the Database Server is Case Insensitive check box to control the case sensitivity of the record selection formula(s) in all reports.2. 3. Selecting Records—Learner’s Guide 75 .

but they aren't hitting the database every time they open a report. they don't access the database server directly. Crystal Reports retrieves data from the database. Change your database logon.Understanding saved and refreshed data In Crystal Reports. • Change the order of groups (only for reports in the Report Application Server). • Change the linking parameter on a subreport (the subreport is refreshed). or once a week. To save data with a report 1. Add a new field that doesn't exist in the saved data. reports with saved data not only minimize data transfer over the network. 2. you can refresh reports with saved data on an as-needed basis. Sales representatives then always have access to current sales data. Alternatively. Change the report's parameters. and drill down for details on columns or charts. For example. but also lighten the database server's workload. • Verify the database—if the database structure has changed substantially. Refreshing data in a report When you refresh a report that doesn't have saved data. then it’s already active. Click File ➤ Save Data with Report. instead. you have the option to use data that is saved to your local machine or use data that is directly taken from the data source. After completing this unit. Save the report. Note: If the Save Data with Report option is checked. Consequently. When users navigate through reports with saved data. the program discards the report's saved data and retrieves new data. they access the saved data. You can schedule these reports within BusinessObjects Enterprise. if your sales database is only updated once a day. you will be able to: • Describe the difference between saved and refreshed data Saving data with a report Reports with saved data are useful for dealing with data that isn't continually updated. then you can run the report on a similar schedule and save it with data. so they automatically refresh from the database on a predetermined basis. 76 Fundamentals of Report Design—Learner’s Guide . otherwise. Drill down in a report where Perform Grouping On Server is selected and the details section is suppressed. Saved data is discarded and refreshed when you perform any of these tasks in a report: • • • • • Select the Refresh command.

the program will not automatically refresh a report. Once you are working with the data in the Preview tab. To refresh data 1. Crystal Reports only retrieves data when necessary. Alternately. there may be times when you want to retrieve new data for the report. However. When you preview your report in the Preview tab. the program runs the report again and retrieves fresh data if you: • Add fields to the report after the report was run.By design. Click Refresh on the Navigation Tools toolbar. or export it to a file. you may have created a report several days earlier and you want to see it run with the most current data. Aside from these circumstances. The program runs your report and retrieves the required data. • Add a formula that references a field that was not in the report when you ran it the first time. the program runs your report and retrieves the required data. click Report ➤ Refresh Report Data or press F5 on the keyboard. For example. Selecting Records—Learner’s Guide 77 . Refreshing report data is intended for times such as this. print the report. • Expand your record selection criteria to include more records than were needed when you first ran the report.

Click OK. you are setting the selection criteria. 3. choose the criteria method. Click OK.Applying record selection When you apply a filter to your report. Enter the values to be used by the criteria in the second drop-down list. You can pick from the list of samples or type in your own choices. Applying record selection to your report allows you to limit or restrict the records that are displayed. 6. Choose the field you want to use. 5. 2. The Choose Field dialog box opens. After completing this unit. limiting the number of records returned. 78 Fundamentals of Report Design—Learner’s Guide . Click Select Expert. 4. From the drop-down list. To apply record selection 1. you will be able to: • Set selection criteria Setting selection criteria Record selection is determined by the selection criteria. Clicking OK creates a tab in the Select Expert for that field.

rpt. Pennsylvania (PA). Ohio (OH). Your report should look similar to this example. Save the report as Applying record selection. and California (CA) appear on the report. 3. 4. Open the Positioning+ objects.Activity: Applying record selection Objective • Select only the records you want to see included on your report.rpt that you created in the previous lesson. Selecting Records—Learner’s Guide 79 . 2. Add the report into the folder in the Workbench. Set record selection so that only companies from British Columbia (BC). Instructions 1.

5. you would create a record selection using the appropriate date and. 2. you may want to select from a list of clients in certain regions who sold over $30. Another method is to use "is in the period. 80 Fundamentals of Report Design—Learner’s Guide . From the report. Remember that if the field you want to set criteria on is included in the report. After completing this unit." This method provides you with options to select a predetermined start and finish date for the period of time you request. you need to create a report showing staff names and their hire dates. To do this. For example. These steps ensure that only the fields that meet all criteria are included on the report. Click OK. The easiest method is to use the "is between" option in the Select Expert.Setting additional criteria You can also add multiple criteria to record selection. 3. Click OK. Click the New tab. The Choose Field dialog box opens. 6. For example. To do this. Set the criteria for the field. use the "is between" option and enter the first day of the first month of the year in the top drop-down list and the last day of the last month of the year in the bottom drop-down list. you need a report that shows each staff member that had been hired between a certain period. if needed. you can select it first then activate the Select Expert. activate the Select Expert. This record selection will return the records of all employees who were hired in that year. prompting you to select a field for record selection. your report will require more than one selection criteria. The Select Expert dialog box opens. 4. If you want to see all the employees hired in a specific year. ready for you to set the criteria as you did for the first field. Select the desired field. Crystal Reports reads the date from your system and displays the appropriate data each time the report is refreshed. formula fields in the Select Expert.000. To set additional selection criteria 1. which produces even more refined results. you will be able to: • Set additional record selection criteria Setting additional record selection criteria Often.

Your report should now contain only those records that meet both selection criteria. Selecting Records—Learner’s Guide 81 . Save the report as Setting additional selection criteria.rpt. 4. Add the report into the folder in the Workbench.rpt from the previous activity. Open the Applying record selection. Your report should look similar to this example.Activity: Setting additional selection criteria Objective • Refine the record selection by adding additional criteria. Note: With this step you are narrowing the selection even further. 2. Add a new criterion to your record selection to include all companies with Order Amount over $1000. Instructions 1. 3.

However. you will be able to: • Modify existing record selection • Modify a record selection formula Modifying existing record selection Sometimes you may need to modify the record selection in order to produce the results you intended. and then click Select Expert. To modify existing record selection criteria 1. Note: You can remove the record selection by clicking the Delete button in the Select Expert. Crystal Reports links multiple selection criteria with an “and” statement. make sure no fields are selected. By default.Modifying record selection You can change the record selection filters or modify the record selection’s formula. For example. From the Design or Preview tab. Modify the selection. selecting the state equal to CA or BC and company sales over $30. Remember that you are only removing the record selection.000. not the records. 3. there may be times when you want to modify the actual formula of the record selection request. After completing this unit. using the record selection formula that shows only BC and CA companies with no other selection criteria. Click OK to apply the changes. For example. 2. The Select Expert opens.000 would result in Californian or British Columbian companies that sold over $30. Modifying a record selection formula You can set up different types of record selection requests without any previous knowledge of the formula language using the values listed in the Select Expert. the formula in the Select Expert would look like this: 82 Fundamentals of Report Design—Learner’s Guide .

the result set would look like this: If you wanted to show BC and CA companies with sales over $30. the record selection formula with “and” would look like this: Selecting Records—Learner’s Guide 83 .000.Using the record selection formula that shows only BC and CA companies with no other selection criteria.

000. the record selection formula with “or” would look like this: 84 Fundamentals of Report Design—Learner’s Guide .This record selection would result in: If you wanted to show BC and CA companies or companies with sales over $30.

To change the formula to modify record selection 1. Selecting Records—Learner’s Guide 85 . the formula gives back all companies in the regions regardless of their last year’s sales.000. Open the Select Expert and click Show Formula.The selection formula with “or” would result in: Because you are asking for companies in BC and CA or companies with sales over $30.

Add the report into the folder in the Workbench. Refresh the report to see the difference in the data displayed.” 4. 2. Save the report as Refining the record selection. Change your record selection criteria back to “and.rpt from the previous activity. 86 Fundamentals of Report Design—Learner’s Guide . Instructions 1.000 or companies in British Columbia (BC) or California (CA). Click OK when done. Select the region to be only BC and CA. Refresh the report to see the difference in the data displayed. Open the Setting additional selection criteria. Activity: Refining the record selection Objective • Modify the record selection to further refine the record selection. 5. Remove the word “and” and replace it with “or.rpt.The formula is shown in the lower panel. 3. Change your record selection criteria from “and” to “or.” 6.” 3. 7. 8. 2. The record selection in this example will result in a listing of companies that sold over $30.

Your report should look similar to this example. Selecting Records—Learner’s Guide 87 .

you need to create a report showing staff names and their hire dates. The easiest method is to use the “is between” option in the Select Expert. 88 Fundamentals of Report Design—Learner’s Guide . Crystal Reports reads the date from your system and displays the appropriate data each time the report is refreshed. For example. Tip: Watch out for “is between” and “is less than” when entering dates. or to show all sales reps that have placed five or more orders in the past month. use the “is between” option and enter the first day of the first month of the year in the top drop-down list and the last day of the last month of the year in the bottom drop-down list. You may want to see all accounts that have not been accessed in the past year. If you want to see all the employees hired in a specific year.000 in product from you in Q1 of your fiscal year.” This method provides you with options to select a predetermined start and finish date for the period of time you request. If no time is entered.Applying time-based record selection Setting a time-based record selection is useful when you want to determine results based on a certain date or time range. you would create a record selection using the appropriate date and. After completing this unit. you will want to select records based on a date field. you may want to find out which customers bought over $10. you need a report that shows each staff member that had been hired between a certain period. formula fields in the Select Expert. To do this. if needed. Another method is to use “is in the period. you will be able to: • Set record selection criteria based on a date Setting record selection based on a date Often. the program assumes you meant “midnight” and you might miss an entire day’s results. To do this. For example. This record selection will return the records of all employees who were hired in that year.

Right-click the date field and select the Select Expert from the shortcut menu. The Select Expert opens. 3. In the Select Expert. Activity: Applying a time-based record selection Objective • Create a record selection based on a date. 4. click the option you want to use from the first drop-down list. (Use saved data. Click OK when you are finished. enter the appropriate dates.rpt from the previous activity. Instructions 1.To apply time-based record selection 1. Depending on the option selected. Save the report as Applying time-based record selection. 2. Open the Refining the record selection. 5. Preview the report. 3. 4. 2.rpt. Selecting Records—Learner’s Guide 89 . Add the report into the folder in the Workbench. Create a record selection based on the Order Date to show records for orders placed in 2004 only.) Note the number of records returned with the record selection applied.

90 Fundamentals of Report Design—Learner’s Guide .Your report should look similar to this example.

When you want to see new data from the database after modifying the record selection. When you want to refresh the data on your report.Quiz: Selecting records 1. When would you use a time-based record selection? 5. What tool is used for filtering or selecting records in Crystal Reports? 2. what are the three methods you can use? Selecting Records—Learner’s Guide 91 . what option would you use? 3. Why would you want to ensure your record selection is case insensitive? 4.

Lesson summary After completing this lesson. you are now able to: • • • • • • • Define the Select Expert Determine the criteria for record selection Understand saved and refreshed data Apply record selection Apply additional record selection criteria Modify record selection Apply time-based record selection 92 Fundamentals of Report Design—Learner’s Guide .

Lesson 4 Organizing Data on a Report Lesson introduction Once you have selected the fields on which you want to report from your database and have placed them on the report. you can now organize those records in a meaningful way and perform basic calculations. After completing this lesson. you will be able to: • Sort records • Group records • Summarize data Organizing Data on a Report—Learner’s Guide 93 .

Crystal Reports displays the records in their natural order. then by company in descending order of Last Year Sales. 94 Fundamentals of Report Design—Learner’s Guide . For example. 2. To apply a sort order to records 1. 3. the order in which they appear in your database. All fields currently on your report are listed in the Report Fields list on the left. you may want to sort in alphabetical order or from highest to lowest sales. Each field in the Sort Fields list can be assigned a sort direction in ascending or descending order independently. you will likely want to sort them in a meaningful sequence. You can also click Report ➤ Record Sort Expert . If you do not specify a sort order. After completing this unit. For example. you could sort your list by Region in alphabetical order. Assign an Ascending or Descending order individually in the Sort Direction area. Click the Record Sort Expert button on the Expert Tools toolbar.Sorting records Using a record sort order enables you to list the records in a particular order. that is. Add the fields from the Report Fields list to the Sort Fields list on the right using > (Add). making the report more meaningful. The Record Sort Order dialog box opens. you will be able to: • Apply a sort order to records Applying a sort order to records Once you have selected the records to print and positioned them on your report.

it is important to consider the following points: • Sort controls apply across an entire record set.The selection is indicated with an A (ascending) or D (descending). Using sort controls You may want to design your report so that users can modify a sort field or sort direction without refreshing information from the database. Tip: You can also click a field and drag it into the sort position you require. To remove a field from the Sort Fields list 1. • Sort controls cannot be used in sub-reports. You can do this using a Sort Control. 4. and then preview your report. When planning to include a Sort Control in your report. Organizing Data on a Report—Learner’s Guide 95 . Select the field and click the Up or Down arrow above the Sort Fields area. Select the field and click < (Remove). To create a sort control 1. In a multiple-level sort. • The use of sort controls causes any open drill-down tabs to close (a warning prompt alerts users). You can also double-click the field. click Record Sort Expert. • Sort controls cannot be created within a cross-tab or an OLAP grid. Click Descending to change the sort direction. not all sorts have to be the same (ascending or descending). To reorder fields from the Sort Fields list 1. A Sort Control is useful for several reasons: • It allows users to sort report data for further analysis without leaving the canvas of the report. Once the data is grouped. • It reduces the time users spend waiting for data to be sorted. • It eliminates processing demand on the database. Tip: The default is Ascending for each field as it is added to the Sort Fields list. The Record Sort Expert appears. you cannot sort only one group. • It allows users to sort fields in the report even if they do not have a connection or rights to access the database at the time of viewing. depending on which sort order was selected. on the Report menu. Click OK.

right-click the text object that you would like to use as a Sort Control. Click Bind Sort Control. The Sort Control dialog box appears. When 96 Fundamentals of Report Design—Learner’s Guide . that field must be included in the Sort Fields list. 3. 3. On your report. Select a sort field and click OK. and click outside the text object to complete the process. 5. Note: To enable a Sort Control on a field. Repeat Step 4 for any other sort controls you want to create. 2. Users can sort the fields you have selected by clicking the sort arrows that appear beside the text object. Enter a name for the new Sort Control. Select a sort field and click OK. Click OK when finished. 4. 2. 2. Click and drag your cursor to the report location where you would like to insert the Sort Control. • If you want to add a new text object: 1.Note: Sort fields that begin with "Group" specify that the sort was done automatically when the data was grouped. The order of the fields in the Sort Fields list is the initial order by which data is sorted. The report promotes the selected field temporarily to the top of the sort order. Create your Sort Control: • If you want to use an existing text object: 1. 4. 3. On the Insert menu. Highlight the fields that you want to sort by and click the > arrow to add them to the Sort Fields list. click Sort Control.

Click Bind Sort Control. 4. The Sort Control dialog box appears. Create a sort control on Region. 5. Notice how the regions change based on the sort direction chosen. 3. Instructions 1. Open the Applying time-based record selection.rpt.rpt from the previous lesson. Save the report as Applying sorting options. Remove the sort control on Region. 7. Sort the records in your report to print in ascending order by Region and City then descending order by Order Date. The Sort Control is removed from the report. 2. Click < Not Interactive >. Add the report into the folder in the Workbench. Right-click the text object that contains the existing Sort Control.a second Sort Control is used. 6. Note: Grouping hierarchy is not affected by Sort Control. 4. the first is returned to its original position in the sort order and the second is promoted to the top sort. 3. Preview the report. making the report more meaningful. Click OK to return to your report. To remove a sort control 1. 2. Activity: Applying sorting options Objective • Sort records to list the records in a particular order. Organizing Data on a Report—Learner’s Guide 97 .

Your report should look similar to this example. 98 Fundamentals of Report Design—Learner’s Guide .

a Group Header and Group Footer surround the Details area. Select the Toggle Preview Panel icon in the Standard toolbar. For example. These new areas are visible in the left margin of the Design window. Organizing Data on a Report—Learner’s Guide 99 . When you group records. Clicking the minus sign (-) collapses the group. you may want to break data into meaningful groups. 2. To expand a group in the Preview Panel 1. You can group information based on report fields. on database fields that are not in the report. no plus or minus icons will appear beside the group names. Navigating using the Preview Panel The Preview Panel appears in the left margin of the Preview window. After completing this unit. It functions like a directory tree with a heading for each group in your report. Once you have created a group. you add new areas to your report. This grouping cannot be achieved with multi-level sorts since it is one long list. If your report has only one level of grouping. you create a more readable and usable report. when you insert a group. Crystal Reports can then summarize the information in each group. Also. the Group #n Name field is automatically created in the Group Header.Grouping records By grouping records into meaningful sequences. Click the plus sign (+) icon next to the group name. and on formula fields. and so on. you will be able to: • • • • • • Create groups Modify groups Create nested and multiple groups Reorder groups Add a specified order group Group on time-based data Creating groups Even though your records are now sorted. Each group you create has its own header and footer. you may want all the customers from one region together in one group: all California customers together. all BC customers together. there can only be one summary using multi-level sorts. with the ability to expand the group to see further levels of grouping.

lowest to highest. you could create groups based on geographical areas or sales territories and name them accordingly such as Western Region. 1 to 9. Click the Close View button beside the page controls to close the drill-down group tab. For example. and so on. you can also drill down on the various groups to obtain information for the specific group. • in descending order Z to A. The options for sorting your groups are: • in ascending order A to Z. To drill down on group headers 1. highest to lowest. • in specified order You can create your own group based on data other than the fields in the database. 2. • in original order 100 Fundamentals of Report Design—Learner’s Guide . An extra tab opens beside the Design and Preview tabs. 9 to 1. and so on. Central Region. Double-click a group on the actual report.Navigating in the report using drill-down In the Preview window. and so on. displaying the information for that group. Eastern Region. Applying sort order options when grouping You apply sort order options when grouping in the Insert Group dialog box.

then all the records will print on that page. for example. the region name would print just above the first record of that region. If not. Each group generated by the report prints a group header before printing the Details area information. Summary information about the group is commonly found in the group footer. Organizing Data on a Report—Learner’s Guide 101 . After the last record of the group has printed. If the group contains so many records that the group needs to span over more than one page. Group names are commonly found in the group header. If. the group footer prints. • Keep Group Together This option prevents a group from being split across pages and forces groups to stay together. These options include: • Customize Group Name Field The name of the group can be customized to suit your needs.This option leaves the records in the same order as they were stored in the database. you had grouped your report by region. they will be printed on the next page. • Repeat Group Header On Each New Page The name of the group in the Group Header using the Group Name Field is printed on the report. • Use a Formula as Group Sort Order This option enables you to use a formula to specify the sort order of groups. The Options tab in the Insert Group dialog box lists the other types of grouping options available. this option forces the Group Name Field to repeat on each new page for a particular group. If there is enough room to print all records from a group on the current page. You can choose from an existing field or build a formula that displays a different group name.

you would see all the formatting options for dates. Options exist for number/currency and text fields as well.Note: If you do not want to include the group name with the group. so check your grouping and sorting options after refreshing a report to ensure the results returned are still appropriate. The dialog box closes and returns to the report. A dialog box opens. Right-click the group name and select Format Field from the shortcut menu. Click Insert ➤ Group. showing the options associated with the group. 4. To format a group 1. select the field you want to group on. The Insert Group dialog box opens. 3. Select a sorting option from the second drop-down list. You have a new group for every change in this value. Format the field. you can clear the Insert Group Name with Group option on the Layout tab in the Options dialog box under the File menu. if you clicked a date field group name to format. Preview your report. You can also click the Insert Group button on the Insert Tools toolbar. When you have finished defining your group(s). For example. 5. 102 Fundamentals of Report Design—Learner’s Guide . Tip: Grouping overrides record sort. 2. 2. click OK. To insert a group 1. In the first drop-down list.

you can redefine the existing group. For example. but now prefer to have the information grouped by country. you can modify the group.3. or you could redefine the existing group. you may find it necessary to modify them. Organizing Data on a Report—Learner’s Guide 103 . perhaps you grouped by region and would now like to group by country. Tip: You will find it easier to work with your groups from the Design tab where you can see the group names and boundaries. you created a report that was grouped by region. Modifying groups Once you have created groups on your report. For example. Or perhaps you want to add a second level of grouping to have your records grouped by country then by region. You could delete the region group and add a new group. Changing the definition of a group You may create a group that later you want to remove because of changing circumstances or changing information needs. Click OK. If your needs change. Tip: Hover your cursor over a group in the grey area to display the name of the group. You do not need to remove the existing group and replace it with a new one.

2. Click OK.To change the definition of a group 1. or the Keep Group Together and Repeat Group Header On Each New Page options. You can change the field the group is based on. In the Design window. right-click the gray area of the Group Header or Group Footer and select Change Group from the shortcut menu. The Change Group Options dialog box opens. Make your changes on the Common or Options tabs. 104 Fundamentals of Report Design—Learner’s Guide . the order of the group. Deleting groups You may create a group that later you want to remove because of changing circumstances or changing information needs. 3.

rpt from the previous activity. Instructions 1.To delete a group 1. Organizing Data on a Report—Learner’s Guide 105 . Activity: Creating and modifying groups Objective • Create and modify groups based on specific selection criteria. Modify the existing group to be based on Region not City. Refresh the report to view the results. 5. 2. and then select Delete Group from the shortcut menu. Remove the Region field and column heading from your report and reposition fields if needed. Open the Applying sorting options. 4. The group section is deleted from the report. Right-click in the gray area over the Group Header or Group Footer of the group you want to delete. Remove the selection criteria for records with Order Amount being greater than $1000. Group the records on your report by City and set the group sort order to be ascending in alphabetical order. 3. 6.

7. Note: As you add more groups. they are automatically added to the list in the Sort Fields area of the Record Sort Order Expert. 106 Fundamentals of Report Design—Learner’s Guide . Creating nested and multiple groups You are not limited to one level of grouping within Crystal Reports. 1. you can have a report of all customers. follow the same steps that you did when you created the first group on your report. broken down by country.rpt. Save the report as Creating groups. Select the group you want from the options in the Insert Group dialog box. Add the report into the folder in the Workbench. Your report should look similar to this example. and each country in turn broken down by region. You could even go further and have a third level. To create nested or multiple groups To create nested groups. click Insert ➤ Group. Preview the report to view the results. 9. by city. For example. You can have groups within groups. 2. 8. For each group.

The Group Expert dialog box appears. unlike the sort order of records. To reorder groups using the Group Expert 1. 2. Organizing Data on a Report—Learner’s Guide 107 . Groups can be reordered at any time. Left-click in the gray area to the left of the Design window and hold the mouse button down. your company may have many distributors in many countries. You want to group by country. For example. Then. then within each country. You can create groups in any particular order.Reordering groups You can have very sophisticated reports with groups nested within other groups. Drag the Group Header or Group Footer of the group you want to move and drop it in its new location. you want to group by geographic region like Northwest. To reorder groups 1. and so on. you may need to group within each of those regions by state. Central. Click Group Expert from the Expert Tools toolbar. The cursor changes to a “hand” to indicate you are reordering or moving a group.

Add country as a group in ascending order. Save the report as Creating and reordering multiple groups. Reorder the groups in your report so that the records are grouped by country and then by region. 108 Fundamentals of Report Design—Learner’s Guide . Preview the report to see that the groups have been placed in the correct hierarchical order by country then by region.rpt from the previous activity. 5. Activity: Creating and reordering multiple groups Objective • Create multiple groups and then reorder them in hierarchal order. Open the Creating groups. 2.2. Use the arrows to rearrange the order of the groups.rpt. 3. 3. 6. 4. Click OK. Add the report into the folder in the Workbench. Instructions 1.

Specified order grouping enables you to create both the customized groups that will appear on your report and the records that each group will contain. select the field to which you want to apply the specified order grouping and then select in specified order. or from the best-selling region to the lowest.Your report should look similar to this example. instead of grouping your regions alphabetically. For example. Adding a specified order group You want to group your data in ways that are not reflected by your database fields. To specify the order of the grouping. Organizing Data on a Report—Learner’s Guide 109 . you want to sort them geographically.

The Specified Order tab appears at the top of the Insert Group dialog box. or districts belong to each. You define this criteria in the Define Named Group dialog box. You can reorder these groups by selecting the name and clicking the Up or Down buttons. You could create these two groups by clicking the New button. For example. On this tab. you can create custom group names and specify criteria for each. This dialog box functions exactly like the Select Expert. The order of the group names in this window is the order they are printed on your report. then specify which states. one for the Western Region and one for the Eastern Region. you need to define which records belong to which group. After creating a custom group. you might want to have two groups on your report. 110 Fundamentals of Report Design—Learner’s Guide . provinces.

a third tab appears on the Insert Group dialog box. By default these records are included in a group called Others. • Leave in their own groups This option groups all remaining records based on the group criteria. all records for Texas would be put into a group called "TX. with the name: This option enables you to specify a customized name for the “Others” group. The other options include: • Discard all others This option removes all other records from memory and does not show them on the report. • Put all others together. For example. if TX did not fall into either Western or Eastern. This tab deals with the records that do not fall into any of the custom group categories.Once you have created at least one custom group." Organizing Data on a Report—Learner’s Guide 111 . You specify what to do with all the remaining records that do not meet any of the selection criteria of the custom groups in the Others tab.

3. 2. and British Columbia (BC) to this group. Instructions 1. Activity: Adding a specified order group Objective • Add a specified order group to create customized groups to better reflect the way you want the information on the report to appear. Delete the Region selection criteria. 5. the grand total displays for all records selected by the Select Expert. 8. you will see the new Group Header and Group Footer areas surrounding the Details area. 4. enter the name of the group in the Named Group field. 3.Click the Others tab to specify how you want to organize the data that is not part of the group(s) you defined. 2.rpt from the previous activity. However. Nevada (NV). 112 Fundamentals of Report Design—Learner’s Guide . 9. Click the <New> tab to add more selection criteria to your specified group. Add new selection criteria for Country to include USA and Canada. Click New. In the Define Named Group dialog box.Click OK. Tip: When you add a grand total. On the Specified Order tab. not only for those showing on the report after creating specified groups. If you are in the Design window. Open the Creating and reordering multiple groups. For each group you define. Select the field you want the data grouped by from the top drop-down list. use the drop-down lists to select the data to be part of the group. Click OK. 4. To create groups in specified order 1. if you apply a specified order grouping and choose to discard others. Click New to create more custom groups as necessary. calculating only the fields shown on the report.You can create groups from either the Design or Preview windows. Select in specified order as your sort option from the second drop-down list. 11. 10. 7. Click Insert ➤ Group. if necessary. your grand totals will be correct. Modify the region group to include a “Western Sales Territory” and add California (CA). a new Group Header and Group Footer is created. 6. The Insert Group dialog box appears. Idaho (ID).

a second level of sorting options becomes available. Ohio (OH). When you apply grouping on a Date field. 8.” 7. You can group records by Date fields. you might need a report that shows all the orders placed. Grouping on time-based data Suppose you wanted a report that showed all employees’ names and their birth dates. Organizing Data on a Report—Learner’s Guide 113 . Add the report into the folder in the Workbench. Include a second territory named “Eastern Sales Territory” and add Florida (FL).rpt. Your report should look similar to this example. Save the report as Adding a specified order group. broken down by yearly quarters. You would then have a list of those employees who have their birthdays in each month of the year. and Pennsylvania (PA). 6. Ontario (ON). but you wanted that report grouped by month.5. Include all other regions to “Unassigned Regions. Or.

The first list gives you the option to select on which field you want to base the groupings. you can specify the frequency of the groups. 5. 4.rpt from the previous activity. choose the date interval you want to group by. You can also customize the settings to display a field based on your needs. 2. 3. You can pick the sort order in the second list. To insert a group based on a date field 1. a third option will appear. Instructions 1. Click OK. Select the date field on which you want to base the groups in the first drop-down list. 114 Fundamentals of Report Design—Learner’s Guide . The Insert Group dialog box opens. time. If you choose to base your groups on a date field. In this third list. Click Insert ➤ Group. Activity: Grouping on a date field Objective • Apply a group that is built on time-based criteria. Open the Adding a specified order group. Tip: The options for formatting date. In the third drop-down list. and date/time fields are extensive. Set grouping so the records are grouped by year. Insert a group on order date. 2. Select a sort order. 3.

5. Change this grouping to group the records by month. 6. 9. Remove the thousands separator from the Order ID. Indent the Region and Order Date groups. Organizing Data on a Report—Learner’s Guide 115 . 8. Preview the report to view the results.4. Your report should look similar to this example.rpt.Add the report into the folder in the Workbench. Format the Group Name to display the full month name and year of the group. 7. 10. Save the report as Grouping on a date field.

maximum. if you subtotal the amount ordered by sales representative. In a sales report. Percentage summary fields support the sum. minimum. For example. average. The summary would calculate the size of the average order for each month group. The summary would count the distinct customers in each state group. For example: • Customer list reports determine the number of customers in each state. and then summarizes the values in each group automatically. count. You can show a field as a percentage based on one group that is a fraction of another broader-based group. it sorts the data.Summarizing data One of the primary purposes for breaking data into groups is to run calculations on each group of records instead of all records in the report. The summary would sum or subtotal the order amounts for each sales representative group. and distinct count operations. average. 116 Fundamentals of Report Design—Learner’s Guide . it sorts the data. When the program summarizes data. Count all the values or only those values that are distinct from one another. for example. Calculate up to two kinds of standard deviations and variances. or Nth largest value. from all the records in a group. • Order reports determine the average order placed each month. Or you can show the sales in each city of a country over the total sales of the entire country. you will be able to: • • • • Insert a summary Insert a group and summary at the same time Create a group selection based on summary data Create a grand total Inserting a summary Crystal Reports includes a number of subtotaling or summarizing options. Crystal Reports gathers all the records that belong to the sales representative and totals the amounts ordered from all the records. you can show the percentage of orders in each region of a country as compared to the entire country. then the total value for the broader-based group (denominator). • Sales reports determine the total sales per sales representative. After completing this unit. minimum. you can: • • • • Sum the values in each group. Depending on the data type of the field you plan to summarize. You apply the percentage summary first by specifying the total value for the second-level group (numerator). When the program summarizes data. Determine the maximum. breaks it into meaningful groups. A subtotal is the sum of all values from a single field. and then summarizes the values in each group automatically. breaks it into groups.

The summary field automatically lines up with and attaches to the same guideline as the field it was based on. Organizing Data on a Report—Learner’s Guide 117 .” You can insert summary information in either the Design or Preview tabs. The percentage summary of 41. you see its full name in the Status bar at the bottom of the Design window. a subtotal that sums the sales of a particular region could read “Subtotal of Last Year’s Sales by Region.In this example.16% is shown as well. In this example. For example.906 shows a subtotal of the last year’s sales for BC. Click Insert ➤ Summary. The options available when inserting a summary field vary depending on the type of data you are summarizing. Adding a text object as an explanatory label in front of the summary or subtotal helps to further describe the context of the new summary or subtotal. When you insert a summary in your report. When you select the summary. You can also click the Insert Summary button on the Insert Tools toolbar. the figure $147. Tip: You do not need to select the field you want to summarize (or subtotal) before any of these menu options are made available. To insert a summary 1. the summary is displayed as the summary operation plus what is being summarized. The number five (5) shows a summary or count of how many companies are in the group. “Count of” is the summary operation and the “Customers” field is being summarized. You can also insert a simple text object as a label beside your summary field as an explanation to make it meaningful for the user. You can choose this field in the Insert Summary dialog box.

2. 4. Select a location in which to place the summary from the Summary location list. Select the desired field to summarize from the Choose the field to summarize list. To insert a group and a summary 1. Select a summary operation from the Calculate this summary list. 118 Fundamentals of Report Design—Learner’s Guide . which would give you a subtotaled sales amount for each region. Inserting a group and summary at the same time If there are currently no groups on the report. Click OK when finished. 3. 5. For example. choose the group which will determine the subtotaled amount from the Summary location list. you can group and summarize all in one step. To subtotal.The Insert Summary dialog box opens. you could choose to subtotal by region. Click Insert ➤ Summary. if you select a sales amount.

Choose the field to summarize. 4. The Insert Group dialog box opens. Select a location in which to place the summary from the Summary location list.The Insert Summary dialog box opens. 3. Select the calculation. • You can add your summary to all group levels by clicking the Add to all group levels check box. Organizing Data on a Report—Learner’s Guide 119 . Tip: • You can create a new group for your report by clicking the Insert Group button. 2.

4. Insert a subtotal on Order Amount for each month (Order Date group). 8. The group is created at the same time as the summary. select the group from the first list.5. You can sort on any field that is used on the report or in the database tables selected for that report.rpt. Rearrange the percentage summary to be under the subtotal summary. Open the Grouping on a date field. 5. 2. Insert a count of the Order ID for each month (Order Date group). 120 Fundamentals of Report Design—Learner’s Guide . Click OK to close the Insert Summary dialog box. 3. On the Common tab. Save the report as Inserting summaries. Add the appropriate text objects beside each summary as labels. Preview the report to view the results. 6. Add a percentage summary for each month (Order Date group) for Order Amount based on the entire report. You can group on any field used on the report or in the table(s) selected for that particular report.rpt from the previous activity. Activity: Inserting summaries Objective • Create summaries for the grouped data and label the totals. 7. 6. Instructions 1. Click OK to close the Insert Group dialog box. and then select the sort order. 7.

Creating a group selection based on summary data When you group or summarize data. however. The Select Expert can be used to select groups of records in the same way that you select individual records. Your report should look similar to this example. • You might want to see only the groups with the highest summary values. Add the report into the folder in the Workbench. you base the criteria on group name fields or summary fields.Region} = “CA”). Organizing Data on a Report—Learner’s Guide 121 . or the lowest. There may be times. as you do for record selection. your report will have only the single group of California. if you have a mailing list grouped by region and your record selection formula specifies only California customers ({Customer.9. when you do not want to include all groups: • You might want to see only those groups whose summarized values meet a certain condition. For example. instead of basing the selection criteria on standard fields. When you are setting up group selection criteria. all the groups in the report are included by default.

However. In all other cases. This will calculate the actual summary values available for you to work with. you may want to select only those groups whose Region is Massachusetts: GroupName ({Customer. The Select Expert dialog box appears. there will not be any data saved with the report. Tip: Group selection is not so much selection as it is suppression. you can set up group selection based on either the group name field or the summary field. For example: Sum({Customer. {Customer. All of the groups are still in the report. 3. the Choose Field dialog box appears. When a group name or summary field is selected. In this situation.REGION}) > 10000 The Select Expert can be used to set up record selection and group selection requests. you will need to preview your report first. 2. The group tree and any grand totals are processed prior to group selection. Without the data. you can only set up group selection based on the group name field. you will have to type in the values you want. For this reason. Note: If you click the Select Expert button without first highlighting a summary field in your report. the program knows that you are setting up record selection. the program knows that the selection criteria you set up is intended for group selection. For example.REGION}) = “MA” • If you have summarized your data. the program cannot calculate group values. Note: If you have not already previewed the report or refreshed the data. If you want real values to work with. including those that are excluded by the group selection criteria. Right-click the summary field on which you want to base group selection and choose Select Expert from the shortcut menu. To create a group selection based on summary information 1.LAST YEAR’S SALES}. Use the drop-down list to enter your selection criteria for the indicated field. only the selected groups are showing.• If you have grouped your data but have not summarized it. no values appear when you click the arrow in the right drop-down list. the group tree and grand totals will continue to reflect all groups. 122 Fundamentals of Report Design—Learner’s Guide . To base the group selection on more than one field. click the New tab and choose the next field from the Choose Field dialog box. thus.

rpt. Creating a grand total Once you have produced summary information for each group. Save the report as Grouping on summary data.rpt from the previous activity. 4. Open the Inserting summaries. Known as a grand total. Instructions 1. Activity: Grouping on summary data Objective • Create a group on data that has been summarized. When you are finished. 2. Organizing Data on a Report—Learner’s Guide 123 . you may also want to have a summary for the whole report. Add the report into the folder in the Workbench. Preview the report to view the results. 5. click OK in the Select Expert to return to the report. Your report should look similar to this example.4. 3. Change the report to show only months that had more than 10 orders. this total displays at the end of the report in the Report Footer.

When you select the Grand Total field in the report. 4. The Insert Summary dialog box opens. 3. Click OK when you are finished. The Grand Totals option is placed in the Report Footer. the options available depend on the data type on which you are basing the calculation. Select a summary operation from the Calculate this summary list. The Grand Total field automatically lines up with and attaches to the same guideline as the data field it was based upon. 124 Fundamentals of Report Design—Learner’s Guide . To insert a grand total 1. Click Insert ➤ Summary. 2. Again. you see its full name in the Status bar.Because a grand total serves as a summary for an entire report as opposed to a group. Activity: Inserting a grand total Objective • Add a summary for the entire report called a grand total. Select a location in which to place the summary from the Summary location list. 5. it can perform the same types of calculations that summary fields can. Select the desired field to summarize from the Choose the field to summarize list.

rpt from the previous activity. Open the Grouping on summary data.Instructions 1. 11. 7. Remove the group selection for months that had more than 10 orders. 2. (90 records) 6. 5. (1051 records) 4. Preview the report to view the results. Add another field that shows the total Order Amount for the entire report and delete the decimals. Add text objects beside each summary to describe them. 9. Change the count to a distinct count.Add the report into the folder in the Workbench. Format the labels and the grand total field to stand out on your report. 3. Organizing Data on a Report—Learner’s Guide 125 .rpt. Change the record selection to show all customers in the USA.Save the report as Inserting a grand total. 8. Your report should look similar to this example. 10. Add a field to the report that counts how many customers in total are included in this report.

How would you create groups that are not reflected by the fields in your database? 4. What is the difference between a subtotal and a summary? 126 Fundamentals of Report Design—Learner’s Guide . Can each field in the Sort Fields list be assigned a sort direction in ascending or descending order independently? 2. Why would you want to have the group header repeat on every page? 5.Quiz: Organizing data on a report 1. What is the function of the Group Tree? 3.

Lesson summary After completing this lesson. you are now able to: • Sort records • Group records • Summarize data Organizing Data on a Report—Learner’s Guide 127 .

128 Fundamentals of Report Design—Learner’s Guide .

but be more understandable. After completing this lesson. Many different formatting options exist to make the information in your report not only stand out.Lesson 5 Formatting a Report Lesson introduction Presentation quality reports are easy to create in Crystal Reports. you will be able to: • • • • Add graphical elements Combine text objects with database fields Apply specialized formatting Insert fields with pre-built functions Formatting a Report—Learner’s Guide 129 .

differentiating each separate group. Right-click the line and click Format Line from the shortcut menu. boxes. you will be able to: • • • • Add a line to a report Add a box to a report Add a graphic to a report Add a dynamic image object Adding a line to a report You can add lines to your report to make information stand out from the rest of the report. 130 Fundamentals of Report Design—Learner’s Guide . After completing this unit. it is easier to see in which area you are working. To draw a line 1. Position the pencil to the place where you want to begin drawing the line and drag your mouse to where the line should end. 2. Release the mouse button.Adding graphical elements If you want to make specific data or summaries stand out from the rest of the report or just want to improve the overall appearance. Click the Insert Line button on the Insert Tools toolbar. When working with graphic elements. 3. you can use graphic elements to enhance your report. You can also click Insert ➤ Line. For example. A pencil cursor appears on the screen. and easier to ensure that graphic elements such as lines. a line in the Group Header section will print once for every group. To format a line 1. you may prefer to work in the Design window. and pictures are positioned correctly.

Use the four-way cursor to move your line to a new position. 2. 3. To move a line 1. Click the line to activate the sizing handles that appear on each end of the line. The Format Line dialog box options include line style (solid. Formatting a Report—Learner’s Guide 131 . To resize a line 1. long dash). Tip: To avoid the line being dragged out of position.The Format Editor opens. You can draw only straight horizontal or vertical lines using this feature in Crystal Reports. and color. 2. Click the line to activate the handles on each end. width (thickness). Make changes to the line. Note: You can also use the Format Painter. 2. If you click one of the handles and hold the left mouse button down. displaying the Line tab. Click OK. small dash. select the Lock Position and Size check box. you can resize your line.

and group footer prints once for every group of records. and color. A box spanning the group header. A pencil cursor appears on the screen. width. The Format Editor opens. These shapes are useful if you are creating forms. and boxes with varying degrees of rounded corners. Position the pencil where you want one corner of the box and drag your mouse to the opposite corner of the desired box. Use the tip of the pencil to draw with. You can also assign a fill color and a drop shadow. Release the mouse button. Right-click the box and choose Format Box from the shortcut menu. 2. details area. Click the Insert Box button on the Insert Tools toolbar. The format border options include line style. Make any changes to the box. You can also click Insert ➤ Box. Pay close attention to where you are placing your box. To format a box 1. A box in the Details section prints once for every record.Adding a box to a report You can insert square or rectangular boxes into your report as well as ellipses. 132 Fundamentals of Report Design—Learner’s Guide . To draw a box 1. 3. circles. You can put a box around groups or each individual record in the report. 2.

you might want to put a graphic of your product or the corporate logo at the top of a report. Note: If you have specified rounding for a box. 2. Formatting a Report—Learner’s Guide 133 . Select the Rounding tab to adjust the corners of the box to the curve you want for the edges of the box. when developing your reports. Click and drag one of the center handles to stretch the box either horizontally or vertically. Handles appear around the box. Click OK when you are finished. Use the slider to adjust the curve. you cannot use the Drop Shadow option that is usually available on the Box tab of the Format Editor. 4. 5. or enter a percentage in the Rounding edit box. you will want to include a picture or graphic.3. Move the cursor over the box and use the four-way cursor to move your box to a new position. 3. Click the box. You can also size your box vertically and horizontally at the same time by clicking and dragging one of the four corner handles. Adding a graphic to a report Often. To move and size a box 1. For example.

A picture field object attaches to the cursor. If necessary. Click the Insert Picture button on the Insert Tools toolbar. Place the upper left corner of the graphic on your report where you want that corner to be and click the mouse button to release. 3. Locate the graphic file you want to use on the report and click Open. Right-click the graphic and choose Format Graphic from the shortcut menu. 134 Fundamentals of Report Design—Learner’s Guide . Tip: When placing an object onto your report. You can also click Insert ➤ Picture. 2. To insert a graphic 1. To format a graphic 1. The Open dialog box appears. the height of the section is automatically increased to display the object. ensure the top edge of the object is placed in the section in which you want to insert the object. The area or section in which you are placing the graphic automatically expands to accommodate the graphic.You will find it easier to work in the Design window when placing a picture on a report so you can ensure it appears within the section you want.

You will be able to: • Suppress the printing of the picture and other properties from the Common tab. Adding a dynamic image object Objects can be inserted into Crystal Reports using OLE (Object Linking and Embedding). 2. These objects are often referred to as OLE objects. This new feature supports the common practice of storing images on a web server and storing references to those images in a database. Formatting a Report—Learner’s Guide 135 . which enables you to add objects from other applications and then use those applications from within Crystal Reports to edit the objects if necessary. scale.The Format Editor opens. • Add a border. 3. Make any changes to the box. You can now place pictures and graphics in a report through a link stored in a database. • Crop. and size the picture from the Picture tab. so that it is no longer necessary to store images within the database. change the color of the border or fill. and add a drop shadow from the Border tab. Click OK when you are finished.

You may not notice a change in the static OLE object until you click the Refresh button in Crystal Reports. Close the Repository Explorer. create the path to your static image object. 2. Activity: Adding graphical elements Objective • Add graphical elements to your report to make the information stand out. This object becomes the default object. 5. you do not have the actual objects stored in the database). 3. Instructions 1. 6. click the Picture tab. If Crystal Reports cannot find the dynamic reference to the object. and you know these objects change occasionally. BMP. For this activity. Typically. 136 Fundamentals of Report Design—Learner’s Guide . If you plan to publish reports that contain dynamic image objects to BusinessObjects Enterprise. it is recommended that you use URL links for your OLE objects. Click Refresh to update the reference link to the image object. 4. Click OK to return to your report. Click Save and close to return to the Format Editor.rpt from the previous lesson. JPG. The functionality of these dynamic image objects is created in Crystal Reports through the use of a conditional formatting formula that allows you to link to static OLE objects by reference. Right-click the image that you inserted and choose Format Graphic from the shortcut menu. Open the Inserting a grand total. Ensure you are logged on to the Repository Explorer. you can find the Xtreme company logo in these locations: • In the Images folder in the repository (under the Repository Items folder). and then click the conditional formatting button adjacent to the Graphic Location label. Note: You begin the process of making an image dynamic by inserting the object into your report as usual. Reports that use an absolute or a relative path for a dynamic image object are not supported in a BusinessObjects Enterprise environment for this release. You can also use this option when you have pictures or metafiles stored on a network share. • In the Company Logo folder in the Lesson 5 folder in the course resources. you use this option when you have the path to your pictures or metafiles stored as a string field in a database (that is. Note: This feature is activated when you refresh your report data.A dynamic image object is a picture or metafile (PNG. it uses the default object instead. 2. Locate the Xtreme company logo. TIF) that you access in Crystal Reports by use of a file path or URL. In the Format Editor. WMF. Place the logo onto the report in the Report Header. Dynamic images are saved in the report with saved data. In the Formula Workshop. To add a dynamic image object 1.

Refresh the report and view the results. Place a thick blue line under all of the column headings. 13.Make this image object dynamic by creating a path to the My Pictures folder in My Documents. 12.jpg into the My Pictures folder in My Documents. Create a folder called My Pictures in My Documents. Your report should look similar to this example. 9. if required. Delete the thin blue lines under the column headings. 10. 5. 4. 3. Move the Order Date group name to be more readable.Insert the copyright image into the Page Footer from the My Pictures folder in My Documents. 11. if one doesn't exist.From the Original Copyright folder in the Lesson 5 folder in the course resources. From the Field Explorer insert the Region and Order Date group name into the appropriate Group Footers.Note: This option is available if there is no access to BusinessObjects Enterprise or if no logo is found on BusinessObjects Enterprise. Remember to include quotation marks. 6. copy the copyright. Formatting a Report—Learner’s Guide 137 . 8. Adjust the report title to accommodate the logo. Draw a thick blue box bordering the Order Date group. 7.

Save the report as Adding graphical elements. 17.Add the report into the folder in the Workbench. The copyright image changes dynamically to the new version. 138 Fundamentals of Report Design—Learner’s Guide . Your report should look similar to this example. 15. 16.Refresh the report to view the changed copyright image object.You’ve just been informed by Marketing that the copyright image has been changed.14. Choose to overwrite the existing file when you copy it into the My Pictures folder in My Documents. Locate the new image object in the New Copyright folder in the Lesson 5 folder in the course resources.rpt.

Your report should look similar to this example. open the formula for the graphic location and change the path to reflect what is being used on the local machine. resulting in the copyright not updating in the solution report. Note: The path specified for the dynamic graphic location in the solution report may be different than the one created on the local machine. Formatting a Report—Learner’s Guide 139 . If you want the copyright to update on your local machine.

you might want to create a form letter with the beginning “Dear Mr. Tip: Do not let go of the mouse button until the vertical insertion line is in the position you want the database field to print. select the field you want to add. Carol Smith-Jones To embed a database field into a text object 1. As you approach the text object with the cursor. Crystal Reports trims any excess characters. however. A blinking cursor appears. Elaine Jones Ms.” where “Mr. watch for the vertical insertion line to appear inside the text object. You can also create text objects that contain plain text for use as titles on your report. you need to combine or manipulate data. You can insert a field into a text object by using a menu command. and joins them so they flow: Mr. For example. You have learned how to insert a text object and edit the text within it. Paul Smith Ms. you will be able to: • Embed a database field into a text object • Prevent the truncation of a text object • Format individual elements of a text object Embedding a database field into a text object To print embedded text and field information or to embed multiple fields. or a dialog box. 2. You can also select multiple fields and insert them into the text object simultaneously. Inserting database fields into text objects with Crystal Reports automatically trims any trailing spaces from the beginnings or ends of the data. add labels. Double-click the text object to enter the edit mode. In the Field Explorer. or paragraphs to your report to make them more functional. After completing this unit. Often. If you were to put these three data fields into a text object. you embed the field into a text object. Drag the field into the text object. 140 Fundamentals of Report Design—Learner’s Guide . combine text with different types of fields and format any element of a text object. Smith.” and “Smith” were part of your database. 3.Combining text objects with database fields Data makes up the majority of your report. Many databases add blanks or spaces after the text of their string fields. a button. and you added the salutation.

to allow the text box to expand vertically. to fit all text and data from the embedded fields. You can use the Can Grow option to prevent truncation of text objects. To prevent truncation of text objects 1. it will look like this: Tip: Select the Show Field Names option in FileOptions to read the database field names as you insert them into your text objects.4. Right-click the text object and select Format Text from the shortcut menu. if necessary. The Format Editor opens. that is. If you place the database field correctly. like word wrap in a word processing application. The printed result is what matters. Note: Embedding a text object within another text object is not possible. Move the cursor to place the insertion point where you want it to appear in the text object. Remember to size your text objects with the printed result in mind. Formatting a Report—Learner’s Guide 141 . Do not worry if the full names of the database or special fields are not visible in the Design tab. Preventing truncation of text objects Sometimes it is difficult to predict how long or tall you should make your text objects if the data fields that have been embedded contain varying lengths of data.

for each of the letters in the word “Dear. An element is any single item that is contained in a text object. This text object is made up of eight elements: Four. The word “report” is made up of six elements. Formatting individual elements of text objects You can format the individual elements of a text object independently. since each letter could be selected and formatted individually. you can format them in much the same way you format the text object as a whole. Note: The Can Grow option does not expand horizontally.” one for each of the database fields. 142 Fundamentals of Report Design—Learner’s Guide . Each field that is inserted into a text object is an element. Select the Can Grow check box on the Common tab and enter the maximum number of lines that you want the field to expand.2. Once you select elements. and two for the spaces between the words.

if you selected text to format. Make the changes you require. Double-click the text object to put it into edit mode. Select the element(s) you want to format. For example. Click OK. The ruler line appears. Formatting a Report—Learner’s Guide 143 . Right-click the selected element(s) and select the formatting option from the shortcut menu. Click in the text object to put it into edit mode. Setting tabs in a text object Each text object can have its own tab setting. The appropriate dialog box appears. 5. 2.To format text or fields individually within a text object 1. 3. The broken line frame and ruler bar appear. To set tabs 1. Elements can be a selection of text or a field. the Text Format dialog box opens: 4.

You can add tabs. Click the ruler line where you want to place the tab. set paragraph alignments. and create indentations. To remove a tab 1. Drag it to a new position on the ruler. To move a tab 1. 144 Fundamentals of Report Design—Learner’s Guide .2. Tip: Editing text objects is like using a mini word processor. Drag it off of the ruler line and let go.

and date/time formatting Formatting multiple objects Use the Format Painter to copy formatting properties from one report object to one or more target objects. The Format Painter button displays on the Standard toolbar when you select a source object in your report. currency. This tables lists the source report objects and fields and the applicable targets you can use with the Format Painter.Applying specialized formatting You can customize your report to be presentation quality using several options. • The Format Painter does not copy formatting that is applied through use of the Highlighting Expert. Source object or field Target object or field Report field (not in a cross-tab) Report field in a cross-tab Template field Text object (not in a cross-tab) Text object in a cross-tab Object in an OLAP grid header Report field (not in a cross-tab) Report field in a cross-tab Template field Text object (not in a cross-tab) Text object in a cross-tab Object in an OLAP grid header Formatting a Report—Learner’s Guide 145 . Some things to keep in mind about the Format Painter: • The Format Painter does not copy hyperlink information to a target object or field. After completing this unit. a Date field or a Time field used as your source also affects the date and time properties of a Date and Time field). the reverse is also true (that is. you will be able to: • • • • • Format multiple objects Apply a predefined template Apply text rotation Apply accounting conventions Apply numeric. • The Format Painter does not copy formatting from text/template objects to database fields. • When using a Date and Time field as your source. a target field’s date or time properties are changed. date. If you apply formatting to a target field that is not the same as your source field. only the common properties are applied. time.

OLAP grid. Click the button a second time. Click the target object or field. Applying predefined templates A template is an existing report file whose formatting can be added to a new or existing report. or press Esc. to exit the Format Painter. 2. When you move your mouse over your report. the Template Expert appears. Use this dialog box to select a report style and apply it to your report. Note: • • • • The Format Painter button is not available until you select an object or field. map. Hold the Alt key down if you want to apply formatting to more than one object or field. When you choose the Template Expert command. OLAP grid. You can use the templates found in the Template Expert to give any number of reports a consistent look without having to format each report individually. map. Select a source object or field in your report and click Format Painter.Source object or field Target object or field Line object Box object OLE or BLOB field Subreport Chart. or cross-tab To copy and apply formatting 1. You cannot apply formatting to read-only objects or fields. the cursor changes to a Stop cursor if the object or field cannot be used as a target. or cross-tab Line object Box object OLE or BLOB field Subreport Chart. Use the Template Expert command to apply one of several professionally-designed styles to your report. 146 Fundamentals of Report Design—Learner’s Guide . Tip: You can also select Format Painter from the shortcut menu.

Formatting a Report—Learner’s Guide 147 . The Template Expert appears. Click Report ➤ Template Expert. You can also click the Template Expert button on the Expert Tools toolbar.To apply a predefined template 1.

you can undo the current template or reapply the last template in the Template Expert. Right-click the object and choose the appropriate formatting option from the shortcut menu. Designed primarily to support formatting in foreign languages (for example. use text rotation. you can format string fields.2. To apply text rotation 1. and text objects vertically. sometimes referred to as vertical text. Japanese). memo fields. Choose a template. 148 Fundamentals of Report Design—Learner’s Guide . a type of specialized web browser for Crystal Reports. Click OK. Note: If a template has already been applied. a report with vertical text can also be exported to the web and viewed in a report viewer. Applying text rotation You can export a report with vertical text to various formats. If you want to have the headings print vertically to save space on your report. Note: You can only rotate text in a True Type font or printer font. 3.

and zero value are displayed. You can also reverse the sign when displaying numbers in accounting reports and determine whether overflow field representation is enabled for the selected field(s). displaying the Common tab. 2. Applying accounting conventions To support conventions used in accounting. currency symbol. right to left 3.The Format Editor opens. commonly referred to as field clipping. • 0 degrees: default setting • 90 degrees: direction of text is bottom to top. Select the degree of rotation you want from the Text Rotation list. The text rotation is applied to the object you selected. left to right • 270 degrees: direction of text is top to bottom. Formatting a Report—Learner’s Guide 149 . Click OK. you can control how the negative symbol.

The Format Editor opens. 2. 150 Fundamentals of Report Design—Learner’s Guide . Click the Number tab to make it active. if it is not displayed. displaying the appropriate options for the number or currency field selected. 3. Right-click the currency or number field and click Format Field from the shortcut menu.To apply accounting formatting 1. Click the Customize button.

date. date. and date/time formatting You can fine tune the formatting of number. 6. negatives. Formatting a Report—Learner’s Guide 151 . Number field Use the options on the Number tab of the Format Editor. 7. Applying numeric. currency. Click OK to close the Format Editor. currency. Choose the formatting style you want to apply for decimals. You can also select the Reverse Sign for Display check box to have the signs of numbers (plus or minus) reverse their sign when displaying debit or credit amounts in financial reports. 5. and date/time fields. Select the Use Accounting Format check box. time. separators.The Custom Style dialog box opens. Click OK to apply the formatting and close the Custom Style dialog box. 4. time. and rounding.

You can choose from a list of sample styles. • Customize If you do not choose the system default number format or any of the sample number formats but want to customize one of these styles further. 152 Fundamentals of Report Design—Learner’s Guide . or you can customize the style of the number display: • System Default Whatever you have specified through your machine’s Control Panel is the designated system default. The currency options are listed in the Format Editor. including the system default settings. Currency You change the formatting of a currency field in the same way as you do a number field in the Number tab of the Format Editor. you make alterations to these styles by clicking the Customize button. the options that appear in the Style area of the Number tab change to currency formatting examples. Because you select a currency field. • Sample styles Click one of the sample styles to apply that type of formatting.

Date. • System Default This choice reflects the default format that is set up in your machine’s Control Panel. • Sample styles Choose a style that meets your formatting requirements. Depending on the type of field you have selected to format. time. • Customize You can further customize the way your currency formats display on your report.The options are: • Display currency symbol Select Display currency symbol to have the symbol appear on the report. Formatting a Report—Learner’s Guide 153 . the Date and Time tab of the Format Editor displays the appropriate system default formats and sample styles for that type of field. and date/time fields Use the options in the Date and Time tab of the Format Editor to customize the display of your date and time fields. Set whether the symbol is fixed in one position or whether the symbol “floats” with the currency numbers by clicking the option buttons.

Click Customize. 2. • Sample styles Use the sample style format to customize the formatting of your date. 154 Fundamentals of Report Design—Learner’s Guide . or date/time fields quickly. time.The options are: • System Default The choices System Default Long Format and System Default Short Format are the default formats that have been defined through your machine’s Control Panel. Choose the system default format or one of the sample styles that you think looks closest in format to the one you want to create for either a number or currency field. The Custom Style dialog box opens. To customize a sample style 1. • Customize If you do not choose any of the system default formats or sample formats. you can further customize your formatting through the Custom Style dialog box.

you make the modifications in the Number tab of the Custom Style dialog box. Formatting a Report—Learner’s Guide 155 . you make the modifications in the Currency Symbol tab of the Custom Style dialog box.If the field is a number. If your selection is a currency field.

Caution: The Custom Style item only appears in the list of styles if you have defined and selected it as the style to use for that type of field. a new item called Custom Style appears in the Style area of the Date and Time tab in the Format Editor. The Custom Style dialog box opens. the custom style will be discarded. This action applies to a number.3. date. After you have defined a customized format. or Date and Time tabs of the Custom Style dialog box to further customize the field. or date/time field 1. Make the modifications. time. Click OK. as necessary. To customize a date. Use the appropriate Date. 4. Time. time. currency. or date/time field. Click Customize. Choose a system default format or one of the sample format styles that you think is close to your requirements. If you choose the system default or a sample style after using the custom style. 156 Fundamentals of Report Design—Learner’s Guide . 2. 3.

8. Select the words “Customers & Orders” within the report title text object and change the font color to Maroon and font style to bold. 3. Adjust the grand total value to display correctly. Formatting a Report—Learner’s Guide 157 .rpt you created in the previous activity. 5. Instructions 1.Activity: Applying formatting elements Objective • Apply formatting elements by embedding database fields into text objects. Add the report into the folder in the Workbench. Open the Adding graphical elements. Save the report as Adding formatting elements. 9. Align the subtotal and grand total value to the right in the Order Amount column. 7. and changing the font and color of a text object. Your report should look similar to this example for the report title.rpt. Remember that the Can Grow option doesn’t work horizontally. Insert all of the subtotals and grand total values into their respective text objects. 6. Preview the report to ensure that the subtotals and grand total value appear correctly. preventing the truncation of text. 4. Prevent the truncation of the subtotal and grand total values by selecting the Can Grow option. 2.

158 Fundamentals of Report Design—Learner’s Guide .Your report should look similar to this example for the grand total.

which are fields that contain pre-built functions. making your report more readable. Formatting a Report—Learner’s Guide 159 . After completing this unit. or the format in which you want the report presented. but is useful to the overall presentation quality of the report. Many factors can influence how long it takes to create a report: length of the report. • Data Date: prints the date the data was last refreshed on a report with saved data. You can reduce the amount of time spent formatting reports by using special fields. Some of the more commonly used special fields are: • Current CE User ID: displays the ID number of the current BusinessObjects Enterprise user (if one exists).Inserting fields with pre-built functions Creating reports that are presentation quality can sometimes take a lot of time. volume of data. you will be able to: • Insert special fields • Format special fields • Embed a special field into a text object Inserting special fields Special fields contain information that is not included in the database. • Current CE User Name: displays the name of the current BusinessObjects Enterprise user (if one exists).

put the file name and location into the Title area in the Document Properties dialog box in the File ➤ Summary Info menu. • • • • Page Number: prints the current page number. Modification Time: prints the time the report was last modified.• • • • • • Data Time: prints the time the data was last refreshed on a report with saved data. File Path and Name: prints the directory path of the file. or until it is required for the total page count. Report Comments: prints the contents of the Comments area in the Document Properties in the File ➤ Summary Info menu. place the Report Title special fields in the Report Footer. Print Time: prints the current time as per your computer’s clock. Page N of M: prints the current page number of the total number of pages. • Report Title: prints the contents of the Title area in the Document Properties dialog box in the File ➤ Summary Info menu. Note: Page N of M uses page on demand. meaning that Crystal Reports will not format a page until it is requested by the user. 160 Fundamentals of Report Design—Learner’s Guide . Print Date: prints the current date as per your computer’s clock. File Creation Date: prints the date the file was first created. You can also use the File Path and Name special field to perform the same function. Then. Tip: If you have created and saved a report and then months later could not remember the file name or location. Modification Date: prints the date the report was last modified. • Total Page Count: prints the total number of pages in the report.

The Format Editor opens with the appropriate tab for the data type you are formatting. a box is attached to the cursor. Click the other tabs to make any other changes. Drag the field in the desired location and click to drop it onto the report. Scroll through the list to locate the special field you want to use.To insert a special field 1. 3. Once you select the field. 4. locate and expand the Special Fields list. To format a special field 1. Right-click the special field and choose Format Field from the shortcut menu. 2. 2. From the Field Explorer. Make the desired changes. Formatting special fields The formatting options for each of the special fields varies depending on the data type the special field creates. Click OK. Formatting a Report—Learner’s Guide 161 . 3.

In the Field Explorer. When inserting a special field into a text object. 2. Click the field you want to insert into the text object from the scrolling field list.rpt file you created previously. For example. Instructions 1. 3. To embed a special field into a text object 1. Activity: Adding special fields Objective • Add several special fields to your report to cut down on the time spent formatting individual elements. and then click the Insert button at the top of the dialog box. Note: The separator boxes can accommodate several characters each. Embedding a special field into a text object You can place special fields inside a text object to complete a sentence. Do not forget to add a space in the separator box if that is what you want between the date elements. Add these special fields to your report: • Print date at the top of the report in the Report Header • Page number at the bottom of each page. or when information changes if the report changes. 2. 3. • Bold the Page Number text object. You can also select the field. Once the insertion point is in the desired place. remember to look at the sample at the bottom of the dialog box. To see how your date will print. 162 Fundamentals of Report Design—Learner’s Guide . 4. if you need to know each time the report was modified. you follow the same steps as inserting a database field.Tip: Changing the date order does not change the placement of the options in the Format area. Drag the field from the menu until the cursor shows a vertical insertion point inside your text object at the position you want the field to print. you would insert a special field into a sentence that states when the report was last changed. Open the Adding formatting elements. locate the Special Fields list and expand its contents. Format the special fields: • Format the date to print like March 1999. click the mouse button to release the field into the text object.

9.Add the report into the folder in the Workbench.rpt. Insert the page number special field into the text object. 6. Use the Format Painter to apply the new formatting of the City column heading to all the column headings. Insert the print date special field inside of the text object. 8. Insert a text object that displays Page Number: in the Page Footer. Formatting a Report—Learner’s Guide 163 . 7.4.Check the report for errors using the Dependency Checker. Your report should look similar to this example for the Print date. 5. Insert a text object that says Printed: in front of the print date and bold the Printed: text object. 10. Change the font color of the City column heading to Maroon. 11.Save the report as Adding special fields. 12.

○ A percentage of order amount compared to the grand total. • The report contains USA data only and for the year 2004. and the locator order number (ID). • The body of the report includes the customers’ names.Your report should look similar to this example for the Page number. • The report displays summarized data: ○ The number of orders by date. their location. Instructions 1. the amount of their orders. and a copyright. with the other groups not assigned to any specific groups. Map each item on the report prototype form to the completed report: • The report reflects the purpose of the report. a report title. ○ The number of unique or distinct customers. • The report displays only the Western Sales Territory and Eastern Sales Territory. • The header includes the company logo. ○ A subtotal and a grand total. Debrief: Validating the report design Objective • Ensure that the completed report looks similar to the report prototype. print date with label. the date they placed the order. 164 Fundamentals of Report Design—Learner’s Guide .

• The key information has been highlighted in some manner. Formatting a Report—Learner’s Guide 165 .

To reduce the amount of time spent formatting reports by using fields that contain pre-built functions. make specific data stand out and improve the 4. 3.Quiz: Formatting a report 1. 2. 166 Fundamentals of Report Design—Learner’s Guide . Graphical elements such as overall appearance of the report. 5. The copies formatting properties from one report object to one or more target objects when you first select a source object in a report and then apply that object’s formatting to a target field. The prevents truncation of text objects to allow the text box to expand vertically to fit all text and data from embedded fields. use . The gives any number of reports a consistent look without having to format each report individually.

Lesson summary After completing this lesson. you are now able to: • • • • Add graphical elements Combine text objects with database fields Apply specialized formatting Insert fields with pre-built functions Formatting a Report—Learner’s Guide 167 .

168 Fundamentals of Report Design—Learner’s Guide .

Lesson 6 Applying Section Formatting Lesson introduction Additional formatting options can be applied to entire sections of a report. you will be able to: • Format sections • Create a summary report Applying Section Formatting—Learner’s Guide 169 . After completing this lesson.

You can also right-click on the report and click Section Expert from the shortcut menu. The active options on the Common tab vary. keep together. The three tabs that always appear in the Section Expert are: • Common tab • Paging tab • Color tab A fourth tab. Click Section Expert on the Expert Tools toolbar. Note: The Conditional Formatting button enables you to add a formula that applies a condition to the selected feature. appears when you select the details section and the Format with Multiple Columns option on the Common tab. Only options applicable to the selected section are available. To open the Section Expert 1. After completing this unit.Formatting sections You can create multiple sections within an area on the report. formatting with multiple columns. you will be able to: • Define the Section Expert • Format sections Defining the Section Expert The Section Expert offers flexibility when formatting different sections of a report. depending on which section is selected in the Sections list. the Layout tab. Exploring the Common tab Use the Common tab to set properties such as: visible. 170 Fundamentals of Report Design—Learner’s Guide . The formula is processed when the condition is met in the report data. and so on for a desired section.

Choosing Suppress (No Drill-Down) still hides the section. If a user double-clicks when the magnifying glass appears. You can also make this feature conditional by clicking the formula button then entering a Boolean formula. That way. no matter how many entries are on the invoice. Therefore. • Keep Together This option prevents page breaks from spreading data from a single record over two pages. Only the summary field is duplicated. but the details do not show. for example. Or perhaps you do not want people to inadvertently drill down. but does not allow anyone to see the underlying data. but still allows the user to double-click a summary field to open a new display tab to show the underlying data that constitutes that summary value. • Print at Bottom of Page This option forces whatever is in that section to be printed as low on the page as possible. In a report that generates invoices. all invoices have the total printed in the same place. You may not want to let your viewers drill down on the summary fields to see the information behind them.The options in the Common tab are: • Hide (Drill-Down OK) Hide in the Common tab functions the same way as Hide (Drill-Down OK) on the shortcut menu. It prevents the area/section from printing. all the information for each detail Applying Section Formatting—Learner’s Guide 171 . the program produces a new tab. you would want each invoice to have the total printed at the bottom of the page. if you have multiple lines in the Detail section. This command can be made conditional by clicking the formula button then entering a Boolean formula. • Suppress (No Drill-Down) This option has the same effect as Hide.

This option enables you to create a report that shows the details in columnar format rather than having the details all show one under the other. This space is reserved whether or not the Page Footer sections are conditionally suppressed. the program removes any extra white space at the bottom of a report. This minimizes unnecessary scrolling for reports viewed online. • Clamp Page Footer When this check box is selected. and select the Reserve Minimum Page Footer option on the Expert’s Common tab. This command is often used with sections containing charts. Note: This option appears only when you select Page Footer in the Sections list. An example is address labels. You can. however. Normally. This command can be made conditional by clicking the formula button then entering a Boolean formula. To do so. Crystal Reports will only reserve space on each page for the tallest of your Page Footer sections. • Reserve Minimum Page Footer This option enables you to minimize the space reserved for your Page Footer sections. This option only affects a Page Footer area with multiple sections. When you do this. You might place the company logo in the Page Header and turn on Underlay Following Sections for the Page Header to create a watermark effect. all 172 Fundamentals of Report Design—Learner’s Guide . • Read-only This option makes a section read-only and locks the formatting and position of all the report objects it contains so they can’t be formatted or moved. Note: This option appears only when you have selected Page Footer in the Sections list.line would stay together on one page if you turn the Keep Together option on. This command can be made conditional by clicking the formula button then entering a Boolean formula. By default. first conditionally suppress individual Page Footers as desired. Then select Page Footer in the Sections area of the Section Expert. • Underlay Following Sections Underlay allows any objects that are in the section to flow into the next while allowing objects from the next section to print on top of the first. • Format with Multiple Columns This option is activated only when the Details section is chosen. A typical use is in the creation of a mailing label report where there is no second address line and you do not want a gap to print. This command can be made conditional by clicking the formula button then entering a Boolean formula. thereby maximizing the space available for valuable report information on each page. minimize the space reserved. When you select this option. • Suppress Blank Section This command suppresses or prevents printing of the section if all fields in that section are blank. the space reserved is equivalent to the combined height of all Page Footer sections that are shown or conditionally suppressed. Crystal Reports reserves space at the bottom of each page for your Page Footer sections.

Exploring the Paging tab Use the Paging tab to set properties such as: page breaks. The formatting options that are usually available on the toolbars or shortcut menus are also suppressed for that section. • Once Relative Positions is selected for a section. you should create a new report section. you can no longer drag objects to new positions within that section. To change an object's position. To change an object's position. If you need to preserve relative vertical positioning. you should create a new report section. ○ Relative positioning applies only to objects placed to the right of grid objects (that is. use the Object Size and Position dialog box.other choices in the Section Expert become inactive. • Relative positioning applies only to objects placed to the right of grid objects (that is. ○ Once Relative Positions is selected for a section. page numbers. The options in the Paging tab are: Applying Section Formatting—Learner’s Guide 173 . Note: • Only horizontal locking is possible. use the Object Size and Position dialog box. objects that can grow horizontally). ○ Only horizontal locking is possible. The Conditional Formatting button enables you to add a formula that applies a condition to the selected feature. objects that can grow horizontally). you can no longer drag objects to new positions within that section. and so on for a desired section. orientation. The formula is processed when the condition is met in the report data. If you need to preserve relative vertical positioning. • Relative Positions This option allows you to lock the relative position of a report object next to a grid object within a section.

and so on. When the Visible Records check box is selected. Therefore. page 2. page 2. • Reset Page Number After This option causes the page number to return to one after the section is complete. When you select this option. 174 Fundamentals of Report Design—Learner’s Guide . use the conditions Not OnFirstRecord and Not OnLastRecord with New Page Before or New Page After. The Page Header and Page Footer appear on each page. you see page 1. if one group spans several pages. ○ Use New Page After in the Group footer section to print each group on a separate page. Then. the program inserts a page break after a specific number of records. the program inserts a page break after the section. ○ The Page Header and Page Footer appear on each page. • New Page After When the End of Section check box is selected. Tip: In order to avoid blank pages.• New Page Before New Page Before is an available format property for Group (header and footer) and Details sections. of the group. Normally. you see page 1. ○ Each report record (if using the option with a Details section). The page break thus comes before: ○ The group (if using the option with a Group footer section). this feature is applied to a Group Footer. when Crystal Reports goes to the next group. you can use the New Page Before option to put these values on pages following the value being totaled. If you have a subtotal or summary field in a Group Footer section. and so on. again. the program inserts a page break before it prints the section.

The options in the Color tab are: • Background Color To add a background color to the selected section. section page orientation will not be affected by any further changes to the report page orientation. The default setting will be the same as the report page orientation in the Page Setup dialog box.Note: • This feature applies only to visible records. Exploring the Color tab Use the Color tab to set the background color for the desired section. Note: In order to avoid blank pages. use the conditions Not OnFirstRecord and Not OnLastRecord with New Page Before or New Page After. • This option appears only when you have selected the Details section in the Sections list. select this check box. • Conditional Formula Click this button if you want to set up a conditional formatting formula for the corresponding property. • Orientation Allows you to set page orientation for each section in the report except for the Page Header and Page Footer. Applying Section Formatting—Learner’s Guide 175 . Suppressed records may be contained on a page. then choose a color from the list. Note: Once changed from the default setting. but will not count toward visible records.

The dialog box is divided into four smaller boxes. • Printing direction The Printing direction box enables you to specify the path the program follows when printing the details on a report page. instead of having the data print straight down the page. You can also have your data print across then down the page.Exploring the Layout tab Use the Layout tab to set up your report in a multi-column format. printing one record in each column. Determine the gaps you want to allow. and so on) and enter that value in the Width edit box. font size. That is. Your options are: ○ Across then Down 176 Fundamentals of Report Design—Learner’s Guide . and so on) you want to allow between details. • Gap between details This box enables you to specify the empty area (gap. Enter the horizontal gap in the Horizontal edit box and enter the vertical gap in the Vertical edit box. then a third. you can set up multiple columns and have the data flow from column to column. Determine how wide you want each detail to be (based on number of characters. Determine how high you want each detail to be (based on number of lines in the detail. Horizontal = the gaps between details going across the page. then printing a second record in each column. and so on) and enter that value in the Height edit box. font size. and so on. gutter. Vertical = the gaps between details going down the page. The options in the Layout tab are: • Detail Size This box enables you to specify the dimensions (height and width) of one detail.

Then you can place the invoicing data in Details b and format Details b to print only when there is an outstanding invoice. 2.Prints details across the columns. and Printing Directions specified for the selected section. In the Section Expert. To move sections 1. 2. Click OK. 3. To merge sections 1. The program adds a new section immediately below the selected section. To insert a new section 1. Click the Up arrow or Down arrow. • Format groups with multiple column Select this check box if you want the program to format groups with multiple columns using the Width. you could conditionally format Group Header b to display only the international customers. and so on. when all the columns have a detail. select the section or area you want to insert a section after. You can only move a section up or down within an area. 3. select the section you want to work with. Click OK. Formatting a section When would you use multiple sections in your report? Perhaps you want to display a standard set of details and additional details if there is an outstanding invoice. one in the next. one in the next. Then. 2. Gap between Details. the program moves down the page and prints a second detail in the first column. Or you may have a report grouped by region that includes some international groups. Click the Merge button. You can place the standard data in Details a and leave it at the default to always print. You can create a second Group Header section and use Group Header a to display group values for US customers by conditionally formatting it. and so on. and so on. Applying Section Formatting—Learner’s Guide 177 . In the Section Expert. then in the second. Click Insert. one detail in the first column. In the Section Expert. move the sections so the two sections follow each other in the list. 3. Then. ○ Down then Across Prints details down the first column. then down the second column. Select the top section.

4. 178 Fundamentals of Report Design—Learner’s Guide . Any data in the section below is combined with the section above. 2. To delete a section 1. Click OK. use the Delete section option. Click OK. Tip: When you want to delete a section and its contents. The selected section is deleted. To select a background color 1. 3. The color list is activated. Click the arrow on the color list to display the available colors. In the Section Expert. 2. Click Delete.The program merges the selected section with the section below. When a section contains objects and you want to combine the data with data in another section. select the section you want to delete. Tip: When you want to delete a section and its contents. use the Merge section option. You may need to rearrange the objects in the newly merged section. use the Delete section option. When a section contains objects and you want to combine the data with data in another section. select the Background Color check box on the Color tab. In the Section Expert. you do not lose any data. use the Merge section option.

Sections-1. 4. 7. Activity: Formatting sections Objective • Use the Section Expert to format sections. Format the background color of the Region Group Header and Details section to print with a silver background. Use the starting point report. 5.rpt. Report Footer. Resize the Region Group Header 2 to allow for more space. Applying Section Formatting—Learner’s Guide 179 . Select a color from this list to make the background color of the selected section absolute. Your report should look similar to this example. and Group Footer #2 sections. Format every country to print on a separate page. Add the report into the folder in the Workbench. Save the report as Formatting sections.3. Instructions 1. Suppress the Page Footer. 2. 6. 3.rpt.

For example. 180 Fundamentals of Report Design—Learner’s Guide . perhaps a manager is only interested in summary information such as the total sales for a region. • Suppress (No Drill-Down) You may not want to allow your viewers to drill down on the summary fields to see the information behind them. The same functionality works in summary reports. because they are both based on summary fields. If the user double-clicks when the magnifying glass appears. Only the summary field will be duplicated. you will be able to: • Define a summary report • Create a summary report Defining a summary report The reports that you have created so far are detailed reports that include all lines of detail. The magnifying glass still appears. the system produces a new tab. A summary report is easily created from a detail report. but does not allow anyone to see the underlying data. When you create a summary report. After completing this unit. or to inadvertently drill down. In a summary report. Choosing Suppress (No Drill-Down) still hides the section. Tip: Drill-down capabilities are also available with charts. In order to be able to create a summary report.Creating summary reports A summary report includes only one summary line for each group in the report. you can choose to enable users to drill down on summary information to access the underlying data. as well as a summary field. but the details will not show. From the Section Expert you have the choice to Hide or Suppress a Details section. Creating a summary report The options in the Section Expert that are applicable to creating a summary report are: • Hide (Drill-Down OK) When Hide (Drill-Down OK) is selected. Drill-down is the capability to double-click a summary field and open a new window tab to show the behind-the-scenes data that makes up that summary. you can create different types of reports. Double-click to see the data that makes up that summary. the cursor changes into a magnifying glass whenever you are in a summary report and you move the mouse pointer over a summary field. you need to hide the Details section so you only see the group information. but can be made accessible through drill-down. viewers can access the data underlying the summary information. you must first have at least one group defined on your report. Then. With Hide (Drill-Down OK) enabled. the detail is hidden from the viewer. However.

Delete the Customer Name. Instructions 1. • Hide the Group Header section. 3. depending on the requirements of the report. Both options prevent the Details section from printing when viewing the report. 2. You can close any of these drill-down tabs at any time by viewing that tab. To create a summary report 1. 3. Activity: Creating a summary report Objective • Display only the summary information in a report. • Move the column headings from the Page Header section into the Group Header section. Use Formatting sections. and Phone Page Header column headings. and each one opens its own preview tab.rpt from the previous activity. 2. Select the Details section and check Hide (Drill-Down OK) or Suppress (No Drill-Down) option. Tip: After you hide the Details section to create a summary report. Preview your report. When you double-click with this magnifying glass. Click Section Expert on the Expert Tools toolbar. Resize the Group Header and Footer to allow for more space. and then clicking the close tab button.Viewing the summary report in the Preview window When you view a summary report in the Preview window. Click OK when you are finished to create the summary report. To do so: • Move the Group Name field from the Group Header section into the Group Footer section. Remove the New Page Before or New Page After setting before creating the summary report so you can see multiple groups on each page. the cursor changes to a magnifying glass whenever it moves across a part of the report that represents a summary. You now have only summary information displayed. You can double-click as many summaries as you need. a new report window preview tab opens and the details behind that summary are displayed. you may want to format the report so that the column headings labeling detailed information are displayed in the drill-down tab rather than in the Preview tab. if needed. Applying Section Formatting—Learner’s Guide 181 . 4. Address1. 4.

Preview the report to test that detail information is still available when you drill down.5. Change the format option in the Details section so drill-down is available.rpt. Save the report as Creating a summary report. Preview the report to test the suppression of the detail information. 7.Add the report into the folder in the Workbench. Your report should look similar to this example. 8. 10. 182 Fundamentals of Report Design—Learner’s Guide . 6. 9. Change the format option in the Details section so drill-down is not available.

What is the phone number for the Picadilly Cycle in Greater London? Applying Section Formatting—Learner’s Guide 183 .Quiz: Applying section formatting Exercise one 1. True or False: The New Page Before and the New Page After option is usually used with Group Headers and Group Footers. Who are the customers in the New South Wales region of Australia? 2. What option prevents page breaks from spreading data from a single record over two pages? 3. If you want to lock the formatting and position of all report objects in a section. What is the street address for the Offroad Bike Verlieh in Berlin? 3.rpt. 2. 1. what option do you use in the Section Expert? Exercise two Answer these questions using Creating a summary report.

184 Fundamentals of Report Design—Learner’s Guide .

Lesson 7 Creating Basic Formulas Lesson introduction If you want to display data that is a calculated value. you must create a formula field and place that formula field on your report. After completing this lesson. you will be able to: • • • • • • • Define a formula and its purpose Create formulas Apply Boolean formulas Apply If-Then-Else formulas Apply date calculations Apply numeric calculations Apply string manipulation Creating Basic Formulas—Learner’s Guide 185 .

however. The components of a formula Formulas contain two critical parts: the components and the syntax (or syntax rules).Customer Last Name}. You can think of a formula as a small piece of computer programming code that processes and prints its result on your report. Understanding the formula language helps you develop powerful and flexible formulas. In this case. Typical uses for a formula include: • • • • • Calculating a percentage of a number. you will be able to: • • • • • Describe a formula Describe the components of a formula Explain Crystal syntax Describe Crystal Reports data types Work with formulas in the Field Explorer Formulas A formula is used to manipulate data in your report. You can write formulas that are as simple or complex as you need them to be. 3. Extracting a single character from a string field. You can use any of the components listed in your formula. 2. a formula can perform a calculation or change the field’s formatting. just like a database field. {Customer. your report requires data that is derived by manipulating data in an existing field in the database.1416 "Quantity". Finding the difference between two date fields. Combining a text string with a number or date field. Performing conditional logic. The syntax rules are used to organize the components. you would use a formula to manipulate the data. After completing this unit.Defining a formula and its purpose In many cases. and a formula field to contain the manipulated data. Sometimes.Last Year’s Sales} Fields Numbers Text 1. It will print the result wherever you place the formula field. "your text" 186 Fundamentals of Report Design—Learner’s Guide . ":". The components are the pieces that you combine to create a formula. the data you want to appear on your report already exists in the database. For example. Component Example {Customer.

They can be stored in the BusinessObjects Enterprise Repository and then added to a report. Creating Basic Formulas—Learner’s Guide 187 . the program performs the set of operations built into the function without you having to specify each operation separately. condFld). and count. if met. custom functions can be used in the Formula Expert when creating formulas. {@GrossProfit}. a function is a kind of shorthand that makes it easier and less time consuming for you to create reports. You can use them to build formula setting conditions. The program reads the operators in a formula and performs the actions specified. Once in the report.Component Example + (add). All functions available are listed with their arguments and are arranged by their use. or transform data. condFld. cdStatutoryHolidays Custom functions Custom functions provide a way to share and reuse formula logic. {@QUOTA} Other formulas Tip: When you select a function or operator in the appropriate tree. or when you select a function or operator that is used in the body of your formula. Functions perform calculations such as average. In this way. ToNumber(x) Functions are built-in procedures or subroutines used to evaluate. Average (fld. that. "For" loops Control structures Control structures control the flow of logic in a formula. For example. -x (negate) Operators Operators are special symbols or words that describe an operation or an action to take place between two or more values. ToText(x). cdFirstDayof Month. Functions When you specify a function. / (divide). make calculations on. Sum (fld. you could use group field values to find the percentage of the grand total contributed by each group. sum. "condition") Group field values Group field values summarize a group. "If" and "Select". Operators are used in formulas. you can press F1 to see help specific to that function or operator. trigger specific consequences or repeat a sequence of actions under certain conditions.

Report processing is not slowed down by using Basic syntax. Changing the syntax from Crystal syntax to Basic syntax or going from Basic syntax to Crystal syntax changes the list of functions in the Functions window as well as the list of operators in the Operators window. If you are already familiar with Crystal syntax. and control structures. using Basic syntax formulas does not require distributing any additional files with your reports. Note: For the purposes of this lesson. Almost any formula written with one syntax can be written with the other. On the File menu. From the Formula Editor tab. select the Options command. Basic syntax is modeled on Visual Basic except that it has specific extensions to handle reporting. operators. Some basic rules are: • Enclose text strings in quotation marks. When creating formulas. you have the option of using either Crystal syntax or Basic syntax. If you are familiar with Microsoft Visual Basic or other versions of Basic. To set the default syntax type for your report 1. The Formula Editor checks the syntax and helps identify problems so you can fix them before you add the formula to the report. Note: You cannot use both Crystal syntax and Basic syntax in the same formula. Also. you can use multiple formulas written in either syntax within the same report. the Crystal syntax will be used throughout the examples. However. • Enclose arguments in parentheses (where applicable). then working in the Basic syntax in Crystal Reports may be more comfortable for you. In general. Syntax rules are used to create a correct formula. however. 2.Crystal syntax You write formulas according to a specific set of rules called syntax. 188 Fundamentals of Report Design—Learner’s Guide . use the Formula Language drop-down arrow to select either Crystal Syntax or Basic Syntax from the list. • Referenced formulas are identified with a leading @ sign. Reports using Basic syntax formulas can run on any machine that Crystal Reports runs on. you can continue to use it and benefit from the wide range of functions. the available report fields remain the same since the report fields are available to both syntaxes.

All types of fields. Denotes subscript or arrays. It is common practice to break up long formulas into chunks to make them easier to read and edit. This functionality is useful when you want punctuation. other formulas. or special characters to appear as part of the result. Carriage returns are ignored in the Formula Editor.” Denotes the arguments that follow a function. Single quotation marks (‘ ’) can also be used for this purpose. whereas square brackets after a function indicate a subscript (pulling specific characters from a string). it is important to know the data types of the fields you are working with: • • • • Boolean String Date Time Creating Basic Formulas—Learner’s Guide 189 . text. Can also denote precedence. Many functions require more than one argument separated by a comma within the round brackets. ( ) { } [ ] " " Upper/Lower case Carriage returns Data types When writing formulas in Crystal Reports. Upper or lower case is ignored by the Formula Editor. all lower. Any text between the quotes is printed as it appears between the quotes. You can enter your functions in all caps. Denotes fields.Special characters used in Crystal syntax Character Description // Denotes everything following is a comment and is ignored by the Formula Editor. Denotes literals. and so on are enclosed in French braces. You can have line breaks and blank lines almost anywhere in the formula. You must repeat the // for each line you want to be “commented out. database. forcing parts of your formula between the() to evaluate first. special. or any mix you prefer. Square brackets before a function denote an array.

2. From the View menu. The Field Explorer dialog box appears. Note: A field that is larger than 254 characters will be recognized as a memo field. 3. The Formula Workshop appears. and then click OK. 6. you can: • • • • Create a new formula. You return to the Field Explorer dialog box. Type the name of the formula. 2. Right-click the formula you want to edit and choose Edit. You must always be aware of the field data type since this can affect which functions can be used with the field. Note: The formula name is used as the column heading and is limited to 254 characters. Fix any syntax errors the Formula Checker identifies. Edit an existing formula. Formulas can work with memo fields. To create a new formula 1. To edit an existing formula 1. 4. and they can process strings up to 64K in length. From the View menu. When the formula has the correct syntax. In the Formula Editor area. Working with formulas in the Field Explorer From the Field Explorer dialog box. The Field Explorer dialog box appears. Delete a formula. click Save and Close on the Formula Workshop toolbar. Rename an existing formula. 3. Right-click the Formula Fields tree and select New from the shortcut menu.• DateTime • Number • Currency All fields will be recognized as one of these data types. 5. Click the Check toolbar button to identify any errors in the formula. select Field Explorer. 190 Fundamentals of Report Design—Learner’s Guide . edit the formula. select Field Explorer.

Deleting a formula When a formula is created and added to a report. If you delete this formula. click Field Explorer. The specification is listed in the Field Explorer dialog box. the Report Designer: • Stores the specification for creating the formula. The Field Explorer dialog box appears. the formula specification remains unchanged. In the Field Explorer. You cannot delete the specification without deleting all working copies of the formula. using the name you assigned to it. In the Report Designer.To rename an existing formula 1. Choose View from the main menu and select Field Explorer. right-click the formula you want to delete and choose Delete. The formula has been renamed. In order to completely delete a formula. To delete a formula 1. Creating Basic Formulas—Learner’s Guide 191 . To delete the formula specification 1. A working copy is any occurrence of the formula in the report. Click Yes to delete. • Places a working copy of that formula at the point you specify in the report. right-click the formula field you want to delete and select Delete from the shortcut menu. It is available if you want to enter the formula in the report again. and then press Enter or click off the field. A formula cannot be deleted from this list if it is referenced by another formula on the report. Type the new name for the formula. you must delete the specification and all working copies of the formula. Right-click the formula you want to edit and select Rename from the shortcut menu. Even after the working copies of a formula have been deleted from the report. The Field Explorer dialog box appears. 2. From the View menu. Note: A dialog box appears if this formula is currently in use in a report. you will delete all references of it in reports. 2. 3.

Formula comments are notes included with a formula to explain its design and operation. The workshop consists of a toolbar. when you work with custom functions. after a period of time.Creating formulas Creating basic formulas to include in your report will enhance its usefulness. You see it when you add new formula fields. but they appear in the Formula Workshop. Use the Formula Editor to create and modify the content of formulas. Everything that follows the slashes on the same line is treated as being part of the comment. • Formula Editor The Formula Editor is a component of the Formula Workshop. when you define selection formulas. always include comments in the formula itself. These explanations or descriptions of your formulas will help you or others if. Creating a formula in the Formula Workshop There are many ways to access the Formula Workshop. Comments do not print and they do not affect the formula. a tree that lists the types of formulas you can create or modify. you will be able to: • Define the methods to create formulas • Create a formula using the Formula Workshop • Create a formula using the Formula Editor Formula creation methods You can create a formula using these methods: • Formula Workshop You can create most kinds of formulas in the Formula Workshop. After completing this unit. Use the Formula Expert to create and modify formulas based on custom functions. the formula needs to be modified. Comments begin with two forward slashes (//) and are followed by the text of the comment. and an area for defining the formula itself. You can use comments to explain the purpose of a formula or explain the steps involved in writing it. Note: This course uses Crystal syntax exclusively. • Formula Expert The Formula Expert is a component of the Formula Workshop. Note: Only the Formula Workshop and the Formula Editor will be discussed in this course. 192 Fundamentals of Report Design—Learner’s Guide . Adding comments to a formula When you create a formula. You can create formulas in Crystal Reports using either Crystal syntax or Basic syntax. and so on.

You can open the Formula Workshop by itself before you begin adding specific kinds of formulas.

Workshop Tree
The Workshop Tree contains folders for each type of formula you can create in Crystal Reports. It also contains folders for custom functions and SQL Expressions. If the workshop appears as the result of using a specific command (for example, you’ve selected the Record command on the Selection Formulas submenu), the appropriate folder in the tree is selected, and the appropriate version of the Formula Editor appears. Expand any folder in the tree to see the formulas that already exist. New formulas can be added, and existing formulas can be edited or deleted as needed. Tip: The Workshop Tree can be docked. By default, it appears docked on the left-hand side of the Formula Workshop, but you can manually dock it on the right-hand side. In free-floating mode, the Workshop Tree can be dragged to any location in the workshop.

Formula Workshop buttons
The main toolbar in the Formula Workshop is made up of three smaller toolbars. Each of these toolbars contains a set of buttons that is relevant to specific actions: working with the Formula Workshop as a whole, working with the Workshop Tree, or working with an editor. Individual buttons are available or unavailable based on the task you are undertaking. Each toolbar can be moved and docked as you require. The buttons for the General toolbar of the Formula Workshop perform the following functions:
Save and Close: Closes the Formula Workshop after prompting you to save the changes. If you save changes, your formula is checked for errors. Save: Saves the formula, SQL Expression, or custom function. New: Creates a new formula of the type selected from the list. Also used to create a new custom function or SQL Expression. Hide/Show workshop tree: Shows or hides the Workshop Tree. Toggle properties display: Toggles display between Custom Function Editor and Custom Function Properties dialog box. Custom functions and formulas (where possible) are displayed in the selected mode until the button is clicked again. Use Expert/Editor:

Opens the Formula Expert. Use the Formula Expert to help you create a formula based on a custom function.
Note: This button is not available when creating a custom function.

Help: Opens online Help for the Formula Workshop dialog box.

Creating Basic Formulas—Learner’s Guide

193

The buttons for the Workshop Tree toolbar of the Formula Workshop perform the following functions:
Duplicate: Makes a copy of the formula that you have selected. When the copy is created, you can rename it and edit it. Rename: Lets you rename the selected formula, custom function, or SQL Expression. Delete: Deletes the selected formula, custom function, or SQL Expression. Expand Node: Expands or collapses the selected node in the Workshop Tree. Also works with multiple node selections. Show Formatting Formula Nodes Only: Shows or hides report object nodes in the Formatting Formulas folder if the objects do not have formulas associated with them. Add to Repository: Opens the Add Custom Function to Repository dialog box so you can select a repository to add the custom function to. Add to Report: Adds the selected repository custom function to the report.

The buttons for the Expressions Editor toolbar of the Formula Workshop perform the following functions:
Check: Tests the syntax of the formula or custom function and identifies syntax errors if they are found. Undo: Undoes the last action performed.

Redo: Redoes the last action. Browse Data: When you select a field from the Report Fields window and click the Browse Data button, a dialog box appears with a list of the values for the selected field.

View values for the selected field and select individual values to insert into your formula.
Note: This button is not available for custom functions. Find or Replace: Searches the Formula Editor for a specified word, number, or formula string. Toggle Bookmark: Inserts a bookmark at the beginning of a selected formula line. Click the button again to remove the bookmark. Next Bookmark: Jumps to the next bookmark.

194

Fundamentals of Report Design—Learner’s Guide

Previous Bookmark: Jumps to the previous bookmark.

Clear All Bookmarks: Deletes all bookmarks in the current formula. Sort trees: Arranges all Report Fields, Functions, and Operators trees in alphabetical order. Field tree:

Hides or views the Report Fields tree.
Note: This button is not available for custom functions.

Function tree: Hides or views the Functions tree.

Operator tree: Hides or views the Operators tree.

Find results: Hides or views the result set of a global formula search. Syntax: Allows you to select Crystal syntax or Basic syntax as your formula syntax. Allows you to select Exceptions For Nulls or Default Values For Nulls as a method for dealing with null values in your data. Comment/Uncomment: Comments out the highlighted selection of a formula. Commented lines are not evaluated as part of the formula.

When writing formulas, remember these considerations: • The online Help file contains explanations and examples of all functions within Crystal Reports. This file can be accessed from the menu as well as the Help icon on the toolbar in the Formula Editor. Within the online Help, you can select the Index tab and enter the name of a function. The program returns an explanation of the function you entered. • If you need the search and replace functionality within the Formula Editor, you can click the Find or Replace icon on the toolbar in the Formula Editor. Select the Edit Text search option to access the search and replace functionality. • You can create new formulas quickly within the Formula Workshop by clicking the New button on the Formula Workshop toolbar. • You can switch between formulas by navigating through the Workshop Tree on the left-hand side of the Formula Workshop. • You can change the default syntax type for Crystal Reports formulas when you select the formula language syntax from the list in the Reporting tab of the Options dialog box under the File menu. This setting is a global option; however, you can still change the formula syntax for your formulas on an individual basis in the Formula Workshop.

Creating Basic Formulas—Learner’s Guide

195

To access the Formula Workshop
1. On the Report menu, click Formula Workshop. Alternately, you can click the Formula Workshop button on the Expert Tools toolbar. The Formula Workshop appears.

2. Click the drop-down arrow on the New button and select the type of formula you want to create. The appropriate editor or dialog box appears.

Creating a formula in the Formula Editor
The Formula Editor is a component of the Formula Workshop. Using the Formula Editor, you combine fields, operators, and functions together to create a working formula. The Formula Editor enables you to type the components of the formula directly. Select the various functions, operators, group field values, and other formulas from the available lists. By double-clicking the item, Crystal Reports inserts it into the formula for you. In the Formula Editor, you can customize your settings with dockable and resizable frame windows, bookmarks, drag and drop, and search and replace. The Formula Editor has four main windows:
Window Description of contents

Report Fields

Report fields contain all database fields accessible for your report. They also contain any formulas or groups already created for the report. Functions are prebuilt procedures that return values. They perform calculations such as average, sum, count, sin, trim, and uppercase. Custom functions are also listed in this window. Operators are the "action verbs" you use in formulas. They describe an operation or an action to take place between two or more values. Examples: add, subtract, less than, and greater than.

Functions

Operators

196

Fundamentals of Report Design—Learner’s Guide

Window

Description of contents

Formula text window

Area where you create a formula.

Note: Use File ➤ Options ➤ Formula Editor tab to set the default text font and font size.

To create a formula using the Formula Editor
1. In the Formula Workshop, click New ➤ Formula. 2. In the Formula Name dialog box, enter the name you want to identify the formula, and then click OK. The Formula Editor appears inside the Formula Workshop. 3. Enter the formula by typing in the components or selecting them from the component trees. Tip: • Ctrl + Space brings up a list of available functions. If you have already started typing, it brings up a list of keywords that are possible matches for what you have already typed. • A list of available fields automatically appears when you enter an open brace bracket. Ctrl + Space brings up the list again if you previously pressed Esc to clear it. 4. Click Check to identify any errors in the formula. 5. Fix any syntax errors the Formula Checker identifies. 6. When the formula has the correct syntax, click Save and Close on the Formula Workshop toolbar. 7. In the Field Explorer, select (single-click) the formula, click Insert to Report, and then position the cursor where you want the formula to appear on your report. 8. Click once to set the field in the desired position on the report. A formula that is placed on a report is indicated by @ (for example, @ProcessTime) on the Design tab. Note: You can also use drag-and-drop to add a formula to your report.

Creating Basic Formulas—Learner’s Guide

197

Applying Boolean formulas
Boolean formulas incorporate the operators and, or, and not and are used when you want to signal a condition of true or false. After completing this unit, you will be able to: • Describe a Boolean formula • Create a Boolean formula

Boolean formulas
A Boolean formula always returns a value of True or False. The result of a Boolean formula can be displayed as: • • • • • True or False T or F Yes or No Y or N 1 or 0

You can change how a Boolean value displays in your report by right-clicking the value and selecting the Format option. You then have the option to display it as 1 or 0, Y or N, Yes or No, True or False, or T or F. You can use Booleans to check for conditions within a field. For example, to determine whether an order amount matches a certain condition, you would write a formula like this:
{Orders.Order Amount} > 5000

Creating a Boolean formula
Boolean operators are used to create conditions that require a logical relationship between two or more values. Conditions that use Boolean operators are called Boolean expressions. • A and B means that both A and B must be true for the condition to be satisfied (to return a True value). • A or B means that either A or B (or both) must be true for the condition to be satisfied (to return a True value). Several useful examples of Boolean operators are: • And • Or • Not
And

The And operator joins the value of x and y. The And operator takes two expressions that evaluate to a Boolean. The expression evaluates True only if both x and y are true. All other combinations result in a value of False.

198

Fundamentals of Report Design—Learner’s Guide

D = 2. C = 3. where A=10. where A = 10. where A = 7. B=6. Returns True. Returns False.D > E) and (E / D <= B) Or The Or operator takes two expressions that evaluate to a Boolean. B = 5. the operator returns True. If either expression evaluates True.Value of x Value of y x and y True True False False Some examples include: Code True False True False True False False False Description A > B and B > C Returns True. (A>B) and (A * C . the operator returns False Value of x Value of y x and y True True False False True False True False True True True False Creating Basic Formulas—Learner’s Guide 199 . and C=7 (only one of the two conditions are true). B = 6. E = 10 (all three of the conditions are true). If both expressions evaluate False. and C = 3 (both conditions are true).

Some examples include:
Code A > B or B > C Description

True, where A = 10, B = 6, and C = 3 (both conditions true). True, where A=10, B=6, and C=7 (either one of the two conditions true). False, where A=5, B=6, and C=7 (neither of the two conditions true).

A > B or B > C

A > B or B > C

(A > B) or (A * C - D > E) or (E / D<= B)

True, where A = 5, B = 5, C = 3, D = 2, E = 12 [at least one of the three conditions is true. In this case only (A * C - D > E) is true].

Not

The Not operator reverses the True or False value of x.
Value of x Not x

True False • Not (Not(False)) = False • Not (Not(True)) = True Some examples include:
Code Description

False True

not (A > B and B > C)

If A=5, B = 4, C = 3, the expression (A>B and B>C) is True. Both conditions tied together by the Boolean operator And are True; thus, the entire statement has a value of True. The Not operator changes the value of the expression to False. If A=3, B = 4, C = 3, the expression (A>B and B>C) is False. One of the two conditions tied together by the Boolean operator And is False; thus, the entire statement has a value of False. The Not operator changes the value of the expression to True.

not (A > B and B > C)

200

Fundamentals of Report Design—Learner’s Guide

Activity: Applying a Boolean formula
Objective
• Create a Boolean formula.

Instructions
1. Open Basic Formulas-1.rpt as the starting point report for this activity. 2. If you want to see the entire report in a horizontal view, click File ➤ Page Setup, and then select Landscape. 3. Add a Boolean formula named Check for USA, that evaluates the data in the Country field and determines if it is equal to USA. 4. Preview the report. 5. Either True or False should be displayed in the Check for USA field. 6. Format the Check for USA formula to display Yes or No rather than True or False. 7. Use the Format Painter to format the column heading to be vertical text, that is, rotate the text. 8. Save the report as Applying a Boolean formula.rpt. 9. Add the report into the folder in the Workbench. Your report should look similar to this example.

Creating Basic Formulas—Learner’s Guide

201

Applying If-Then-Else formulas
The If-Then-Else type formula is a conditional formula. That is, if a condition is met, then a certain action will be taken. If the condition is not met, then some different action takes place. After completing this unit, you will be able to: • Describe an If-Then-Else formula • Create an If-Then-Else formula

If-Then-Else

formulas

If-Then-Else formulas can check for as many conditions as required in order for you to achieve

the results you need.
If-Then-Else formulas have three parts:

• If sets the condition or test. • Then sets the action to be taken if the condition is met, that is, if the test returns a true value. • Else is optional. It sets the action to be taken if the condition is not met, that is, if the test returns a false value.

Creating an If-Then-Else formula
Suppose you want to display a rating beside each customer’s order figures in an orders report depending on the level achieved: high orders or low orders. You can accomplish a task such as this by using an If-Then-Else formula.
If {Orders.Orders Amount}>40000 Then "high orders" Else "low orders"

Tip: The data type must be the same for the Then and Else parts of the formula (text, numeric, date). For example, if the Then part of the formula prints a text string, the Else part of the formula must also print a text string.

Activity: Applying an If-Then-Else formula
Objective
• Create an If-Then-Else formula.

Instructions
1. Use the Applying a Boolean formula.rpt. 2. Add the formula, Domestic or International, which displays “Domestic” beside Country equal to USA and “International” beside all others. 3. Format the column heading to be vertical text, that is, rotate the text.

202

Fundamentals of Report Design—Learner’s Guide

4. Save the report as Applying an If-Then-Else formula.rpt. 5. Add the report into the folder in the Workbench. Your report should look similar to this example.

Creating Basic Formulas—Learner’s Guide

203

Applying date calculations
A database field can contain a date value, which is recognized as date only, time only, or date-time. After completing this unit, you will be able to: • Describe a date calculation • Create a date calculation

Date calculation
Date functions allow you to convert numbers to dates, which you then can format to display as appropriate, and to convert dates to numbers.

Creating a date calculation
Examples of calculations using date or date/time fields are: • Current date function • Addition and subtraction • Year, month, and day functions

Current date function
To have today’s date appear on a report, use the current date function. For example, to display today’s date in your report, you would write this formula:
CurrentDate

Addition and subtraction
You can add days to date fields by adding a number. For example, if you know an order should be shipped five days after the order was placed, you would find the expected ship date with this formula:
{Orders.Order Date} + 5

If the Orders.Order Date was January 10, then this formula would return January 15. You can also subtract days from date fields by subtracting a number. For example, if you want to find the number of days it took to ship an order, if the order date was five days prior to the ship date, you would use the formula:
{Orders.Order Date} - 5

If the Orders.Order Date was January 10, then this formula would return January 5. The most useful application of these concepts is finding the difference in days between two date fields. For example, if you want to find the number of days it took to ship an order, you would use this formula:
{Orders.Ship Date} - {Orders.Order Date}

204

Fundamentals of Report Design—Learner’s Guide

If the Orders.Ship Date was January 20 and the Orders.Order Date was January 10, then this formula would return 10 days.

Year, month, and day functions
At times, you may need to extract the year, month, or day portions from a date field. To accomplish this task, you would use the Year ( ), Month ( ), or Day ( ) function. For example, if you were looking for monthly trends in your ordering cycle, you could use the Month ( ) function to extract the month portion of your order date fields using this formula:
Month ({Orders.Order Date})

If the Orders.Order Date was January 10, then this formula would return 1.00. Tip: Commas and decimal places are the default display for numbers in Crystal Reports.

Activity: Applying date calculations
Objective
• Create date calculation formulas.

Instructions
1. Use the Applying an If-Then-Else formula.rpt. 2. Add a formula named Order Process Time that displays the number of days to process each order from the time it was ordered to the time it was shipped. 3. Format the Order Process Time to display with no decimal places. 4. Add the formula, Month Ordered, which displays the month in the form of a number 1 to 12. This formula is useful if you want to establish trends of the busiest order months over several years. 5. Format Month Ordered to display with no decimal places. 6. Add the formula, Days Since Shipped, which displays the number of days between the ship date and today. The values returned by this formula will change due to the current date on the actual computer being used. 7. Format Days Since Shipped to display with no decimal places. 8. Remove the Country group. 9. Save the report as Applying date calculations.rpt. 10.Add the report into the folder in the Workbench.

Creating Basic Formulas—Learner’s Guide

205

Your report should look similar to this example.

206

Fundamentals of Report Design—Learner’s Guide

Applying numeric calculations
Some fields contain numeric data that can be used in calculations. After completing this unit, you will be able to: • Describe a numeric calculation • Create a numeric calculation

Numeric calculations
Formulas using numeric fields perform mathematical computations on your data.

Creating a numeric calculation
Numeric calculations can include: • • • • Arithmetic Sum Count Distinct count

Arithmetic
Some arithmetic operators available for use in a formula are: • • • • addition (+) subtraction (-) multiplication (*) division (/)

For example, you can use the multiplication symbol to find the sales tax charged on a particular order. If you wanted a sales tax amount of 7% on order amount field, the formula would look like this:
{Orders.Order Amount} * .07 Sum(number, field)

Summary fields are normally created using the Insert Summary dialog box. They then appear in the Available Fields tree, and can be used in a formula by double-clicking there. However, they do not need to be created in this way. You can create a summary field exclusively for use by your formula by appropriately filling in the arguments to one of the functions in the Summary functions section. However, any groups in the report that the summary field refers to must already exist in the report. For example, two variations of the Sum functions are: • Sum ({Orders.Order Amount}) Returns a total of all order amounts for the entire report. • Sum ({Orders.Order Amount}, {Customer.Region})

Creating Basic Formulas—Learner’s Guide

207

Returns a total of the order amounts for each region. Tip: A number of options exist for summarizing your data. Sum( ), Count ( ), and Average ( ) are the most common. Refer to Summary Functions in the online Help for more information.
Count

This function enables you to count the values that appear in your report (for a specified field). Some examples include these scenarios: • If a sales report includes all orders made and the amount of each order, you can compute the total number of orders that appear on the report (a grand total count). • If you break orders into groups (for example, orders grouped by the region that they come from), you can compute the number of orders per group (in this example, per region). • If you break orders into date or Boolean groups (for example, orders grouped by the month in which they were placed), you can compute the number of orders per group based on a particular change in the date or Boolean field (in this case, per month).
DistinctCount

This function enables you to get a distinct count of the values that appear in your report. A distinct count means that duplicate records are not used in the calculation. Some examples include: • If a sales report includes all orders made by customers, you can compute the total count of distinct customers in the report (as grand total distinct count), excluding any duplicate records. If a customer made more than one order, the duplicate occurrences of that customer are ignored. • If you break orders into groups (for example, orders grouped by the region that they come from), you can compute the count of distinct customers per group (in this case, per region). Any customers that made more than one order and appear more than once in a group are only counted once. • If you break orders into date or Boolean groups (for example, orders grouped by the month in which they were placed), you can compute count of distinct customers in each group based on a particular change in the date or Boolean fields (in this case, the count of customers that placed orders each month). If a customer placed more than one order within the month, duplicate instances of that customer are ignored.

Activity: Applying numeric calculations
Objective
• Create numeric calculation formulas.

Instructions
1. Use the Applying date calculations.rpt. 2. Group on the Customer Name, that is, {Customer.Customer Name}.

208

Fundamentals of Report Design—Learner’s Guide

3. Align the bottoms of the column names in the Page Header and then remove the customer name field from the Details section. 4. Add the formula, Order Plus Tax, which calculates the Order Amount plus a tax of 7% for each Order. 5. Add the formula, GT Order Amount, which calculates the grand total Order Amount for all Orders. 6. Add the formula, GT Order Amount Plus Tax, which calculates the grand total Order Amount for all Orders including tax for all Orders. 7. Add the formula, ST Order Amount, which calculates the subtotal Order Amount for each Customer. 8. Add the formula, ST Order Amount Plus Tax, which calculates the subtotal Order Amount including tax for each Customer. 9. Create labels for the subtotals and grand totals and format the labels to stand out on the report. 10.Format all formulas to display with a dollar sign. 11.Save the report as Applying numeric calculations.rpt. 12.Add the report into the folder in the Workbench. Your report should look similar to this example.

Creating Basic Formulas—Learner’s Guide

209

you want to embed the information from several string fields together as one field. By using formulas to manipulate the data contained in string fields you can get exactly what you need from your database.Contact First Name} [1] Returns "A". In the first example. For example. formatting and moving this single field around the report is easy. string fields cannot be added or subtracted from each other like numeric fields can. or you may want to extract several characters from a string field. For example. you can extract characters from the string field using the subscript function. When extracting several characters from a string field. where the Contact First Name is Anne-Marie.Applying string manipulation String fields contain straight text. you would create the formula: • {Customer. when creating a report. you may want to use only a first initial of a contact name instead of the entire name. Creating string manipulation formulas String manipulation formulas include: • • • • • • Subscript Concatenation Uppercase and Lowercase Left Mid Right Subscript When you want to use only a certain part of a string field. where the Contact First Name is Anne-Marie. After completing this unit. a customer’s first and last name fields can be combined to be one complete name field. numbers. In this way. characters.Contact First Name} [1 to 4] Returns "Anne". 210 Fundamentals of Report Design—Learner’s Guide . or punctuation. you will be able to: • Describe a string manipulation formula • Create a string manipulation formula String manipulation Often. you would create the formula: • {Customer.

The second argument is the character position where the part to be taken begins. if you want to add descriptive text to your data field. If the third argument is not specified.Phone}. 3) This formula would retrieve the first three numbers from the phone number. 2) This formula returns a two-character substring from the inside of the string starting with the third character position. you may need to extract the middle two characters of a field as an identifier for customers. start) or Mid (str. you Creating Basic Formulas—Learner’s Guide 211 . which is typically the area code.Customer Name}) This example would return EDWARD SMITH. everything from the start position to the end of the string is extracted. Right (str. start.CustomerName}. length) The Mid function returns a specified number of characters from a string. length) The Right function extracts the given number of text characters from the right side of the specified string. For instance. For example. For example. Use this function to obtain just the right part of the string. to convert all customer names to uppercase. For example. the identifier is “le”. you would write the formula: "This product was shipped on" & {Orders. where the customer name is Edward Smith. You would write the formula: Left ({Customer. Mid (str. Left (str. The optional third argument is the length of the string you want to be taken out. Mid({Customer. you use the Uppercase ( ) or Lowercase ( ) functions. For example. 3. you could use the Left function to obtain just the area code from the values in a field containing phone numbers.Ship Date} Uppercase(string) and Lowercase(string) When you want to convert all letters in a string field to a specific case. you would use one of the these concatenation symbols: • & Enables you to join fields of different data types. • + Enables you to join string fields. you would write the formula: Uppercase ({Customer. length) The Left function consists of a text string (str) and length (length) and obtains a certain number of characters from the left end of a text string.Concatenation When you want to join two or more components together to form a singular continuous string. Use this function when you need to extract a set of characters from somewhere in the middle of a text string. In the case of Alley Cat Bikes.

then replace with the @DisplaySubtotal. Add the formula. 212 Fundamentals of Report Design—Learner’s Guide . if necessary. Insert a group on the formula. Rearrange the groups. 3. Right({table. 7.may need to obtain the last four digits of social security numbers stored in a field as an employee identifier.SSNUM}. Activity: Applying string manipulation formulas Objective • Create string manipulation formulas. 5.Add the report into the folder in the Workbench. 4) This formula returns the last four digits of the social security number as a string.rpt. 11. 10.CustomerName} & " is " & {@ST Order Amount} & ". Format the letter in a different color so it stands out. Create a formula named DisplaySubtotal to display the following sentence: "The subtotal for " & {Customer. Use the Applying numeric calculations. Remove the Subtotal text object and @STOrderAmount.rpt. 9. 4. 1st Customer Letter.Save the report as Applying string manipulation. Replace the Group #2 Name field with a formula that displays the Customer Name in uppercase. 2. Make sure the formula word wraps. Instructions 1." 8. which extracts the first letter from the customer name field. all groups of customers are grouped together beginning with “A”. and so on. 6. This way.

Creating Basic Formulas—Learner’s Guide 213 .Your report should look similar to this example.

CustomerName}) Sum({@Order Plus Tax}. {Customer.Country}="USA" if {Customer.CustomerName}) {Customer.CustomerName}) "The subtotal for " & {Customer.Order Amount} * 1.Ship Date} ." 214 Fundamentals of Report Design—Learner’s Guide .Order Date}) currentdate .Order Amount}) Sum({@Order Plus Tax}) Sum({Orders.07 Sum({Orders.{Orders. {Customer.Ship Date} {Orders.CustomerName} & " is "& {@ST Order Amount} & ".Order Amount}.{Orders. Name Check for USA Domestic or International Order Process Time Month Ordered Days Since Shipped Order Plus Tax GT Order Amount GT Order Amount Plus Tax ST Order Amount ST Order Amount Plus Tax 1st Customer Letter Uppercase Customer Name Display Subtotal Syntax {Customer.Debrief: Creating basic formulas Review the formulas created in this lesson.Order Date} month({Orders.CustomerName} [1] UpperCase ({Customer.Country}="USA" then "Domestic" else "International" {Order.

which is applied only under certain conditions. After completing this lesson.Lesson 8 Applying Conditional Reporting Lesson introduction You can easily apply absolute or conditional formatting. you will be able to: • Determine trends in data • Format data conditionally Applying Conditional Reporting—Learner’s Guide 215 .

and Date and Time fields). highlight your key customers by printing the {Customer. and the Item editor. The Item editor includes a Sample view to illustrate the formatting specifications applied.000. Currency. After completing this unit.Last Year’s Sales} field with a red background whenever the sales value exceeds $50. Boolean. the Item list section. you format the selected field either by specifying a condition based on that field’s value. without writing a formula. When used for conditional formatting. you will be able to: • Use the Highlighting Expert Using the Highlighting Expert The Highlighting Expert enables you to apply conditional formatting to all types of report fields (Number. The Highlighting Expert is most commonly used to highlight field values that are in some way distinguished from other values in the report. then apply these formatting specifications. String.Shipped} value is False. Time. Highlight all field types used in the report. For this purpose. you can quickly establish trends in the data by using the Highlighting Expert. 216 Fundamentals of Report Design—Learner’s Guide . font color. the Highlighting Expert is quicker and easier to use than the Formula Workshop. Format font style. With the expert. for example. and border style. or by specifying a condition based on the value of a different report field. Date. which enables you to set the formula. the dialog box is divided into two sections. which displays the formula. Conditionally formatting fields using the Highlighting Expert When you need to conditionally format report fields. Think of the Highlighting Expert as an advanced formula editor that runs the following equation: If condition is True.Product Name} field whenever the {Orders. background color. Alternatively. You might.Determining trends in data When you want to highlight certain information in a report in order to perform an analysis of the data. to draw attention to outstanding orders. Format a field based on its own values or the values of another field. the Highlighting Expert allows you to: • • • • Modify several attributes at once. you might bold the {Product. Tip: You can undo highlighting with the Undo button on the Standard toolbar to cancel the formatting.

You can create formulas with this dialog box. You can also start the expert by clicking the Highlighting button on the Expert Tools toolbar. For example. those fields should have red backgrounds. suppose that you highlight the Unit Price field on the report. In other words. This is useful when you have two or more formulas that could offer conflicting results in some situations. on this same report. the expert is set to format the field that is currently selected on the report. in fact. you create another highlighting formula that shows a red background when a unit price is greater than $200. Setting highlighting priorities The Priority buttons in the Item list area of the Highlighting Expert allow you to set priorities for your formulas. Then. To use the Highlighting Expert 1. Right-click the field you want to format and select Highlighting Expert from the shortcut menu. Applying Conditional Reporting—Learner’s Guide 217 . you could have Unit Price fields with yellow backgrounds when. You assign to this field a highlighting formula that shows a yellow background when a unit price is greater than $100. When opened. a unit price of $300 could receive either a red or a yellow background. Each formula appears in the Item list. Considering that 100 is a subset of 200. depending on which formula has been assigned priority. or by clicking Highlighting Expert on the Format menu. Tip: The changes in the formatting are seen in the Preview window only. You can use the Remove and Remove All buttons to delete formulas as well as use the Priority arrow buttons to specify the order of priority for each formula.

In the Highlighting Expert. Note: If the field selected in the Value of list is not numeric. select the desired field from the list. Note: You can use the expert’s Remove button to delete highlighting formulas from the list. click the Value of list drop-down arrow and select the field that you want to base your condition on. 6. The Value of list displays only those fields that you have added to the report. In the Item editor area. Background. click New to create a new conditional formula with default settings. and Border lists. specify the formatting changes that you want to apply to the selected field when your condition is met. This comparative statement works as the operator in the conditional formula created by the expert. this field need not be the field that is being formatted. the text box turns into a list of available values. select it from the list of available fields. Complete the condition by entering the desired value in the box. To base your condition on a different report field. 7. is less than. and so on). Font color. Repeat steps 3 and 4 if you want to apply multiple highlighting conditions to the selected field.2. 3. Select a comparison from the second list (is equal to. In the Font style. The field chosen here is the field upon which your condition is based. from which you must select one. 218 Fundamentals of Report Design—Learner’s Guide . 4. 5. To create a condition based on the values of the field that is being formatted.

Add purple highlighting for the order amount that is greater than or equal to $10. 4.rpt.00 or less and blue if it is greater than or equal to $5. Use the Conditional Reporting-1. 5.00. Note: A formula has priority over another formula when it is higher in the Items list area. 3. Use the Priority arrows to specify the order in which you want Crystal Reports to apply your conditions. 2. Move to the second page to view the results for all three colors. Applying Conditional Reporting—Learner’s Guide 219 . Instructions 1. 9. you won't see all three colors until you change the priority of the highlighting.00. Add the report into the folder in the Workbench. Note: There should be three colors when done.000. Activity: Using the Highlighting Expert Objective • Use the Highlighting Expert to determine trends in data.rpt starting point report. however.8. Click OK to return to your report.000. Add highlighting that displays the order amount in red if the order amount is $100. Save the report as Using the Highlighting Expert.

220 Fundamentals of Report Design—Learner’s Guide .Your report should look similar to this example.

that property or attribute can be conditionally formatted. After completing this unit. but you go a step further and set conditions that determine whether or not the formatting will be applied. conditional formatting can be used to display negative amounts in red or to suppress a field only in a certain situation. For conditional formatting you follow the same general procedure. For example. Conditional formatting takes precedence over fixed settings. Applying Conditional Reporting—Learner’s Guide 221 . You can apply formatting based on a condition any time the conditional button appears beside an option. If you then conditionally change the color of the sales field to red if negative and black in all other cases. For example. you will be able to: • • • • Describe conditional formatting Apply on or off properties Apply attribute properties Apply conditional formatting functions Conditional formatting Absolute formatting is formatting that applies under any condition and is used when you want the same result in all situations. The Drop Shadow property for a Border is an example of an on or off property. With absolute formatting. When the check box is turned on. Whenever the result of the formula is no. the program applies the attribute when the condition is met and does not apply the attribute when the condition is not met. You select the field and apply the formatting. the attribute is set to off. How you conditionally format an attribute differs between on or off properties and attribute properties. the property is never applied.Formatting data conditionally Conditional formatting is formatting that applies only under certain conditions that you set. Tip: Each time you see the formula button next to a property or attribute. the property is always applied. Therefore. When you conditionally apply an on or off property. When you need to format objects only in certain cases or apply the formatting differently for different situations. A conditional property tests to see which of two or more conditions was met and applies the formatting appropriate to the condition. When the check box is turned off. you must create a Boolean formula that returns yes for every value to which you want to apply the attribute. you may have applied absolute formatting to the font color of the sales field to appear in blue. to set an on or off property. you use conditional formatting. Applying on or off properties An on or off property uses a check box. The sales field will appear in red or black in the Preview window only. You specify those conditions using simple formulas. this change overrides the original setting. you follow a “select then apply” procedure.

On the shortcut menu. The program tests to see whether the value is under quota or not. Click the appropriate tab. 7. then it applies the red attribute. and DashedLine. 222 Fundamentals of Report Design—Learner’s Guide . if it is not. Crystal Reports loads a selection of attributes into the Functions list in the Formula Workshop. then it applies the black attribute. Click Save and Close. values that don’t meet the If condition may not retain their original format. The ability to conditionally format fields and objects gives you more control over the presentation of your data in the report. SingleLine. 6. if you are setting horizontal alignment conditionally. The condition button changes color from blue to maroon. otherwise. LeftAligned. 3.To apply on or off properties 1. Use an If-Then-Else formula for this kind of conditional formatting. 5. 4. right-click the field you want to format. To retain the original format of values that don’t meet your If condition. indicating a condition has been set. For example. use the DefaultAttribute function. Applying attribute properties A conditional attribute property tests to see which of two or more conditions is met. In the report. The program tests each record to see which of two or more conditions was met and applies the formatting appropriate to the condition. The Format Editor dialog box opens. All attribute property options are listed within the Format Formula Editor for your use. Click the conditional formatting button beside the option you want to change. Click OK. If you are setting borders conditionally. the Functions list contains attributes such as DefaultHorAligned. the Functions list contains attributes such as NoLine. and Justified. The program then applies the formatting appropriate to the condition. When conditional attribute properties are set up. Note: Always include the Else keyword in conditional formulas. If it is under quota. click Format Field. Double-click any of these attributes to add them to a formula. 2. assume that you want values under quota printed in red and all other values printed in black. For example. Type a formula as the condition.

The field can be any type (string.Applying conditional formatting functions Conditional formatting functions are found at the top of the Functions tree in the Formula Workshop whenever appropriate. a string type. You can create more complex conditional formatting formulas in the Formula Workshop using these built-in procedures or subroutines.Region}) then Red Else DefaultAttribute 3. For example. then CurrentFieldValue is a date type. • DefaultAttribute This function is available when entering formatting formulas including section formatting formulas. and if Suppress is checked. If you create a formatting formula for a Boolean attribute such as Suppress. then the DefaultAttribute is false. text object formatting formulas. Click OK to return to the report. and so on). if formatting a string field. The value returned by DefaultAttribute depends on the value selected for the attribute being formatted. Applying Conditional Reporting—Learner’s Guide 223 .Last Year’s Sales} < Average({Customer. then CurrentFieldValue is a string type. and the font color combination box is set to blue. if you create a formatting formula for the font color. and so on). If Suppress is not checked. you could change the font color to red if the value is less than the average for the group: if {Customer. and so on. then DefaultAttribute is blue. Boolean. For example. CurrentFieldValue returns the current value of the field about to be printed and is especially useful when conditionally formatting cross-tabs. To apply an attribute property 1. {Customer. and so on). Click the appropriate tab and add a formula by clicking the conditional formatting button next to the option you want to change. 2. Two useful examples of conditional formatting functions are: • CurrentFieldValue This function is available only when entering field formatting formulas. In the report. the formula if CurrentFieldValue = 0 then Red can be used to format the font color in a cross-tab. if formatting a date field. This function depends on context (that is. Note: You can also use summary values as conditions.Last Year’s Sales}. This function depends on context (that is. Activity: Formatting data conditionally Objective • Apply conditional formatting to a report. it may be a Boolean type. For example. number. then the DefaultAttribute is true. right-click the field to format and select Format Field from the shortcut menu. date.

Your report should look similar to this example.rpt. 224 Fundamentals of Report Design—Learner’s Guide .Instructions 1. 6. 2. Save the report as Formatting data conditionally. 5. 3. Add the report into the folder in the Workbench.rpt. Use conditional formatting (not the Highlighting Expert) to add formatting that displays the customer name with a red background and white lettering if the order amounts are $100. 4.00 or less.00. Use conditional formatting (not the Highlighting Expert) to add formatting that displays the customer name with a drop shadow if the order amounts are greater than $5000. Suppress the duplicated customer names. Use the previous activity report called Using the Highlighting Expert.

Quiz: Applying conditional reporting 1. When you need to format objects only in certain cases or apply formatting differently for different situations. you use . 2. What type of formula do you need to create when you apply an attribute property? 4. What type of formula do you need to create when you set an on or off property? 3. When would you use a conditional formatting function? Applying Conditional Reporting—Learner’s Guide 225 .

you are now able to: • Determine trends in data • Format data conditionally 226 Fundamentals of Report Design—Learner’s Guide .Lesson summary After completing this lesson.

Lesson 9 Representing Data Visually Lesson introduction You can include sophisticated. colorful charts in your reports. you will be able to: • Create a chart Representing Data Visually—Learner’s Guide 227 . making them more comprehensible. These charts can enhance the information in your reports. After completing this lesson.

Not all chart styles work with all data. and so on. resized. Each chart becomes an object on your report. colorful charts in your reports. formula. and therefore can be moved. a report that shows the total sales for each state would make a good pie chart but a meaningless stacked bar chart. the chart displays group-specific data. Where you place your chart determines what data is displayed and where it is printed. be aware that some options are not for use with some types of chart. as well as customize the options and formatting for the chart. After completing this unit. For example. The tabs in the Chart Expert are: 228 Fundamentals of Report Design—Learner’s Guide . If you place it in a Group Header or Group Footer section. You can use charts any time to improve the usefulness of a report. but not work in a single pie chart. apply conditional color highlighting. On the other hand. and Running Total fields Cross-Tab summaries OLAP data You will typically chart on summary and subtotal information at the group level. the chart includes data for the entire report. For example. select the data on which the chart is based. if you place a chart in the Report Header section.Creating a chart Many people find it easier to understand information if it is presented graphically. if you had a report that showed inventory levels of certain items for each quarter of the year. that information would make an excellent stacked bar chart. As you work through each tab. You can chart on: • • • • Summary and subtotal fields Details. Inserting a chart using the Chart Expert The Chart Expert dialog box allows you to choose the type of chart to display. you will be able to: • • • • • Choose a chart location and type Create a chart using the Chart Expert Chart on summary data Chart on details or formula information Customize a chart Choosing a chart location and type Crystal Reports enables you to include sophisticated. Using the Chart Expert The Chart Expert is a tabbed dialog box. since only one series of data exists.

Exploring the Type tab The first tab in the Chart Expert offers different predefined chart styles to choose from. Representing Data Visually—Learner’s Guide 229 . Click OK after you have finished customizing the chart.• • • • • • Type Data Axes Options Color Highlight Text To insert a chart using the Chart Expert 1. Click once to insert the chart. 2. 3. An insertion frame appears. To select a particular style. On the Insert menu. Position the top-left corner of the frame in the target location for the new chart. click Chart. double-click the icon for the desired report. the Chart Expert opens automatically or you may need to right-click the chart once it is placed and select the Chart Expert from the shortcut menu. Another way to do this is to click the Insert Chart button on the Insert Tools toolbar. Depending on where you place the chart. You can customize the chart according to your needs.

A stacked bar chart also displays data as a series of vertical bars and is best suited for representing three series of data with each series displayed as a different color stacked in a single bar. you charted sales by region on a particular report. • Doughnut A doughnut chart is similar to a pie chart. and can only be used with one group of data. • Pie A pie chart displays data as a pie. Other chart types include: • Line A line chart displays data as a series of points connected by a line and is best suited for showing data for a large number of groups. If. • Area An area chart displays data as areas filled with color or patterns and is best suited for showing data for a limited number of groups. for example. displaying data as sections of a circle or doughnut.The most common chart types are: • Bar A side-by-side bar chart displays a series of vertical bars and is best suited for showing data for several years over a period of time. you would see the total number of sales (the figure) in the center of the doughnut and the regions as colored sections 230 Fundamentals of Report Design—Learner’s Guide . split and filled with color or patterns.

For example. lined up side by side in a three-dimensional plane. the stock chart is useful for monitoring financial or sales activities. you have the option to choose multiple doughnut charts for multiple groups of data. months. Representing Data Visually—Learner’s Guide 231 . how specific group data relates to the whole of the group data. Viewing all of this data on an XY scatter chart would enable you to speculate why certain products were selling better than others or why certain regions were purchasing more than others. from the center of the radar to the perimeter. and years. at the perimeter of the radar. A bubble chart is effective with the number of products sold in a certain region. including sales. • XY Scatter An XY scatter chart is a collective of plotted points that represent specific data in a pool of information. the difference in sales between countries is visually dynamic when presented in this chart. countries. for example. • Stock A stock chart presents high and low values for data. or area chart that uses a numeric field or a date/time field as its “On change of” field (instead of a string field). • 3D Surface A 3D surface chart presents a topographic view of multiple sets of data. such as customers or countries. In this way. at a glance. If. the percentage of sales for the entire inventory). Numeric axis charts provide a way of scaling your X-axis values. you need a chart to show the number of sales by customer by country in a visually dynamic and relational format. increasing in value. • Numeric Axis A numeric axis chart is a bar. The 3D riser chart shows the extremes in your report data. you would have a collective of plotted points that represents the pool of customer information. products. As with the pie chart.of the doughnut. thus creating a true numeric X-axis or a true date/time X-axis. • Gauge A gauge chart presents values graphically as points on a gauge. line. • 3D Riser A 3D riser chart displays data in a series of three-dimensional objects. if you input customer information. Gauge charts. The XY scatter chart enables you to consider a larger scope of data for the purpose of determining trends. • Bubble A bubble chart displays data as a series of bubbles. With this ability. like pie charts. are typically used for one group of data (for example. the greater number of products sold in that region. the larger the bubble. where the size of the bubble is proportional to the amount of data. • Radar A radar chart positions group data. you would use a 3D surface chart. The radar chart then places numeric values. For example. you can determine.

while the vertical axis shows a series of tasks or events. • Histogram A histogram chart shows the frequency of occurrence of data elements in a data set. The same report showing the same regions over several years would make a good multiple pie chart. A summary report showing the total sales for each region would make a good pie chart. for example. 232 Fundamentals of Report Design—Learner’s Guide . the amount of potential revenue shown for each stage. Tip: Not all data ranges work with all chart styles. you select the chart layout type you want to use. This type of chart can also be useful in identifying potential problem areas in an organization’s sales processes. The X axis is divided into intervals that denote ranges of data values. Each histogram bar shows the number of data elements whose value falls into that interval. Exploring the Data tab In the Data tab.• Gantt A Gantt chart is a horizontal bar chart often used to provide a graphical illustration of a schedule. Horizontal bars on the chart represent event sequences and time spans for each item on the vertical axis. A funnel chart is similar to a stacked bar in that it represents 100% of the summary values for the groups included in the chart. • Funnel Funnel charts are often used to represent stages in a sales process. The horizontal axis shows a time span.

as well as by Top N or Sort totals. The Advanced chart layout supports one or two condition fields. you can select running totals fields to display them in the chart. you will learn how to create an advanced chart and a group chart. if you want to chart on all records so that the grand totals display. If you have running totals in your report. ○ Values can be plotted for each record. you can create a 2D or 3D chart. Representing Data Visually—Learner’s Guide 233 . • Group With this option. the appropriate choices are presented within the Data tab. ○ Values can be plotted as a grand total for all records. • OLAP On-Line Analytical Processing (OLAP) is a business intelligence tool with the ability to perform “slice and dice” operations for multi-dimensional viewing and manipulation of data.The charting layout types are: • Advanced Use the Advanced layout when you have multiple chart values or when you do not have any group or summary fields in the report. ○ Charts can be based on formula and Running Total fields. then select For all records from the drop-down list on the right side of the dialog box and specify a chart placement of Once per report. Note: You cannot drill down on an advanced chart because the chart is already displaying all the data for that field. Note: In this training guide. A Cross-Tab chart uses the fields in the cross-tab for its condition and summary fields. you can create charts based on any group summary or subtotal values. • Cross-Tab The Cross-Tab option is available when a report contains a cross-tab object and enables you to present the data in the cross-tab graphically. or specified order. You also select the placement and data in the Data tab. with these condition fields. Note: In order to create a chart using the Group layout. Use the OLAP layout to chart on an OLAP grid. Exploring the Axes tab In the Axes tab. Other specific functions with the Advanced layout include: ○ Values can be grouped in ascending. descending. you must have at least one group and at least one summary field in the report. Also. you can specify properties that control the occurrence and frequency of data that divides axes on your chart. Once you have selected your chart type.

customize settings. the data axis may not start at zero. you can choose to display the data in percentages or in amounts. If you do include a legend in a pie or doughnut chart. However. If you turn the Auto scale check box on. depending on the data.By default. data points. the data axis is not scaled automatically and always starts at zero. you can set the color of the chart. Exploring the Options tab On the Options tab. the data axis scales automatically. 234 Fundamentals of Report Design—Learner’s Guide . and choose whether or not to include a legend.

Note: If your chart type is line.Exploring the Color Highlight tab The Color Highlight tab lets you conditionally apply color based on chart value fields. the chart must have data markers before you can see conditional formatting. Representing Data Visually—Learner’s Guide 235 . The tab is divided into two areas: The Item list area displays the formula conditions and the Item editor area is where you create the formula conditions. An area chart must have two On change of values for conditional formatting to appear. You apply a color to the selected item by specifying a condition.

a pie chart would not have a group title or data title as available text options. For example. even though some charts may not use them.Exploring the Text tab The Text tab lets you specify different titles to be placed on your report explaining the various components. This tab always presents all options. 236 Fundamentals of Report Design—Learner’s Guide .

1997 Sales: 3410088. The Chart Expert appears. click Chart. A chart built on summary data offers the benefit of drill-down capability. Representing Data Visually—Learner’s Guide 237 . you can return at any time by right-clicking the chart in your report and selecting Chart Expert from the shortcut menu.If you accidentally exit the Chart Expert. Therefore. On the Insert menu. Charting on summary data Charting summary and subtotal information (Group layout) is the most common type of chart. The chart you see in the Design window is a placeholder that prints the actual chart information when you switch to the Preview window.” No matter what type of chart you choose. To create a summary chart 1. You can always return to the Chart Expert to redesign your chart. the ability to access multiple summaries with the double-click of a mouse button. a tooltip with detailed information appears. For example. Before you can create a chart. a chart that shows sales for different countries would read “USA: Sum of Customer. the chart in the Design window will probably be different from what you were expecting based on your data.85. If you place the cursor over the chart while in the Preview tab. you must have at least one group and one summary or subtotal in your report. the basic steps to produce a chart are the same.

such as the scaling of the axes. click Group. When you double-click with this magnifying glass. Click the Text tab. the legend. the cursor changes to a magnifying glass. 3. An insertion frame appears. click the group field you want to base your chart on. Depending on where you place the chart. When viewing a chart in the Preview window. For example. 9. double-clicking a pie slice opens a drill-down tab showing the individual entries that make up that subtotal. then. in the On change of list. in the Chart type list. you can drill down into the data to see the underlying information that constitutes those totals. depending on your selection in Step 6. Position the top-left corner of the frame in the target location for the new chart. if it is not already selected. In the Data area. Your chart is placed in the Header or Footer section of the report. it may cover a portion of the report. Move and resize the chart so that it fits properly within the report. 10. click the summary field you want to display on your chart. a new Preview tab opens up and the details behind that summary are displayed. Accept the default title information or add new titles to your chart. on a report showing total sales for each region with a pie chart based on those subtotals. If the Axes and Options tabs appear. 8. 5. For each level of grouping and summarizing that make up the chart. the Chart Expert opens automatically or you may need to right-click the chart once it is placed and select the Chart Expert from the shortcut menu. in the Show list. 238 Fundamentals of Report Design—Learner’s Guide . Click once to insert the chart.Tip: Another way to do this is to click the Insert Chart button on the Insert Tools toolbar. 6. You may have to refresh your report to preview the finished chart. you can drill down on individual groups through the chart legend. Click the Data tab. In the Layout area. 4. Drilling down on a chart Drill-down is a process where the details behind summary information can be revealed by clicking the summary information contained in a report. If a chart consists of one or more group fields and you have included a legend. 2. and the data points. On the Type tab. A chart that is based upon summary fields is a candidate for drill-down. Double-click the cursor on the markers and text in the legend to view the details about that section of the chart. select a chart type and then click the chart subtype that best illustrates your data. When your chart is inserted. you can customize some of the chart’s properties. 7.Click OK.

and Order Amount into the Details section. Move the cursor over the body of the chart until the magnifying glass appears. When you are positioned over the summary information on which you want to drill-down. Drill down to view the 2004 information. Insert a group based on the order date and set the group options to be displayed by year. Give your chart a title of “Order Amounts Per Year. 10. closing the Preview tab closes all drill-down tabs. Create a new report from the Customer and Orders table. you will be prompted to save those changes.rpt. 4. To drill down on chart information 1.” 7. Representing Data Visually—Learner’s Guide 239 . However. A new drill-down tab is created for the information you clicked. 3. double-click with the magnifying glass. scroll your report so you can see your chart. Create a bar chart in the report header using the group layout to compare order amount per year. 2.You can double-click as many summaries as you want as each one opens its own drill-down tab. Instructions 1. 8. 2. 9. If you made any changes since the last save and you close the report. 6. Insert a summary on the order amount per the order date group. Activity: Charting on summary data Objective • Create a chart that is based on summarized data. You should get a magnifying glass over each piece of a pie chart. Tip: Closing the drill-down tabs does not close the report. 5. Place the Customer Name.Add the report into the folder in the Workbench. Order ID. Your report should look similar to this example. Preview your report. In the Preview window. 3. Note: You cannot drill down on an advanced chart because the chart is already displaying all the data for that field. Save the report as Charting on summary data.

or plotting one point for all records. You also have the option of plotting a point for each record. click Chart. Charts are often based on a summary field in your report in which the values plotted in the chart depend on the values in the summary field. However. you can also create a chart that does not have a summary field to chart on. it is plotted at the point representing the corresponding value. it is plotted at the point representing the corresponding value.Charting on details or formula information The Advanced layout enables you to create a chart based on specific values (details or formula data). For example. • Value The value is used to indicate what is plotted as the points on your chart. a chart showing last year’s sales for your customers uses the Customer Name field as the condition. these types of charts use values that appear in the Details section of your report. 240 Fundamentals of Report Design—Learner’s Guide . To create a details or formula chart. Each time a point is plotted. the customer name changes). Instead. On the Insert menu. Each time the condition changes (that is. a point is plotted. you need to specify: • Condition The condition is used to indicate when to plot the point. Each time a point is plotted. To chart on details information 1.

Single arrows move only the selected field. Select Vertical or Horizontal depending on the Axes that most clearly illustrates your data. The arrow buttons on the Chart Expert dialog box allow you to move fields from one list to the other. 4. 6. Position the top-left corner of the frame in the target location for the new chart. 3. select a chart type. Click the Data tab. then add up to two database fields in the box underneath the list. Click once to insert the chart and open the Chart Expert dialog box. Select the chart subtype that best illustrates your data. 7. In the Data area. You can select On change of from the list. in the Choose your chart type list. click Advanced.Tip: Another way to do this is to click the Insert Chart button on the Insert Tools toolbar. 5. In the Layout area. select Use depth effect. Add the database fields you want to use as values to the Show value(s) list. if the Chart Expert doesn’t automatically open. if it is not already selected. An Insertion frame appears. Representing Data Visually—Learner’s Guide 241 . 9. specify the database fields you want to use as conditions. 2. On the Type tab. Note: If you want to make any chart 3D. 8. double arrows move all fields at the same time.

rpt. Open the Charting-1.rpt starting point report.If you do not want Crystal Reports to automatically summarize the chart values for a formula field. 11. 242 Fundamentals of Report Design—Learner’s Guide .If the Axes and Options tabs appear. Ensure that the legend displays the percentage of the last year's sales. Add the report into the folder in the Workbench. Save the report as Charting on detail information. it may cover a portion of the report.Click the Text tab. Change the placement of the legend to the left of the chart. the legend. Place the chart in the Report Header. and the data points. 13. You may have to refresh your report to preview the finished chart. Instructions 1. Activity: Charting on detail information Objective • Create a chart that is based on details data by using the Chart Expert. 8. 4.10. 3. 12. 7. 2. Create a pie chart with 3D visual effects using the Advanced Layout showing the customers their last year’s sales. you can customize some of the chart’s properties. Note: When your chart is inserted. 5.Click OK. 14. Preview the report. select the Don’t summarize check box. Your chart is placed in the location of the insertion frame. 6. Move and resize the chart so that it fits properly within the report.Accept the default title information or add new titles to your chart. Your report should look similar to this example. Resize the chart to expand to the entire Report Header section. such as the scaling of the axes.

rotation. Representing Data Visually—Learner’s Guide 243 . After right clicking a pie chart and selecting Chart Options. For example. you can: • Edit a chart using the Chart option menu items • Use the zooming features with bar and line charts • Auto-arrange a chart in the report Editing charts in the Chart Options dialog box The Chart Options dialog box contains many advanced formatting options. Each tab in the Chart Options dialog box varies according to the type of chart selected. depth. right-click any chart and select Chart Options. On every tab. Crystal Reports provides many options for working with your existing charts. the graphic on the left side of the dialog box gives an approximation of how your edits will affect the chart. change fonts. and direction of the boxes. To open the Chart Options dialog box. or even change the type of chart. or a legend. gap width. the Appearance tab allows you to change the tilt. When you customize a chart. when you open the Chart Options dialog box for a bar chart. headings. you may want to add a new title. the Appearance tab allows you to change the overlap.Customizing a chart Once you have created a chart. depth. and explode distance for the pie chart.

2. the appearance tab offers different data elements. In the Chart Options dialog box. Click OK. Right-click the chart and select Chart Options from the shortcut menu. For example. change the style of line in a line chart. you vary the data elements that affect the appearance of the chart. Exploring the Titles tab In the Titles tab. you can add. remove. Exploring the Appearance tab In the Appearance tab. Depending on the chart type. or modify the title of your chart. 244 Fundamentals of Report Design—Learner’s Guide . you can change the degree of tilt of a pie chart. make the desired changes. 3. or change the gaps between the bars in a bar chart.To edit a chart by using Chart Options 1.

For some chart types. you can conceal or reveal values.Here you can add or edit the chart’s title. subtitle. labels. You can also specify the location and format of the values and labels you’ve chosen to display. Representing Data Visually—Learner’s Guide 245 . leader lines. and footnote. Exploring the Data Labels tab On this tab. the Titles tab also allows you to add and edit the group and data titles. and the name the data fields used to build the pie name.

you can conceal or reveal the legend. and specify color mode by group or series for the legend. Exploring the Gridlines tab On this tab. you can conceal or reveal the gridlines. You can also modify the layout. This tab may not be available for all chart types. 246 Fundamentals of Report Design—Learner’s Guide .Exploring the Legends tab On this tab. style.

On the shortcut menu. 2. Representing Data Visually—Learner’s Guide 247 . On the Preview tab. you must save the data with the report. You can also toggle between time. 3. Repeat the previous step to zoom in further. 4. with each time being referred to as instance specific. To zoom in and out on a bar or line chart 1. Exploring the Axes tab On this tab. right-click the bar or line chart to bring up the shortcut menu. If you decide to save the instance of the chart that has been zoomed in or out. Using the zooming features with bar and line charts On the Preview tab. You have the ability to zoom in and out on these chart types at any time.You can modify the gridlines for Group and Data axes. Drag the Zoom In cursor around a section of the chart to enclose it within the tracking rectangle. This tab may not be available for all chart types. you can find commands for zooming bar charts and line charts within your report. ordinal. and numeric scales. The chart zooms in to the section you selected. click Zoom In. you can conceal or reveal the axis labels.

Tip: Use the Explode feature. 7. use the Pan option on the shortcut menu. right-click the chart to bring up the shortcut menu. 5. Auto-arranging a chart If you move or resize chart objects on the Preview tab. Instructions 1. 248 Fundamentals of Report Design—Learner’s Guide .Note: To see adjacent areas on a zoomed-in chart view (neighboring bars in a bar chart. 7. The chart zooms out one level of magnification. Pull the Pan cursor to the left or right to move in that direction. Display the values as a percentage outside of the slices. Show the last year sales values around the pie chart. 5. Expand the pie depth to 75. Crystal Reports resets the chart to its original size and position. right-click the chart to bring up the shortcut menu. Add the report into the folder in the Workbench. On the shortcut menu. 6. Activity: Customizing a chart Objective • Modify an existing chart in a report by using the Chart Options dialog box. 6.rpt. Make the pie slices appear to have separated from each other by 20%. 8.rpt from the previous activity. To auto-arrange a chart 1. Remove the border from the legend. Open the Charting on detail information. On the Preview tab. Click the chart again to zoom out further. 4. click Auto-Arrange Chart. On the shortcut menu. for example). Save the report as Customizing a chart. 2. and then click the chart. 2. select the auto-arrange chart feature to reset the chart. click Zoom Out. To zoom out on a chart. 3.

Your report should look similar to this example. Representing Data Visually—Learner’s Guide 249 .

What functionality would you use when you have multiple chart values or when you do not have any group or summary fields in the report? 2. data labels. What functionality would you use when you want to set the appearance. or legend of the chart? 3. What functionality would you use when you need to see the details behind summary information in a bar chart? 5.Quiz: Representing data visually 1. What functionality would you use when you want to create a chart based on detail information? 250 Fundamentals of Report Design—Learner’s Guide . titles. What functionality would you use when you want to set conditional color formatting? 4.

Lesson summary After completing this lesson. you are now able to: • Create a chart Representing Data Visually—Learner’s Guide 251 .

252 Fundamentals of Report Design—Learner’s Guide .

You can also save the report to BusinessObjects Enterprise. you will be able to: • Export a report • Save a report to BusinessObjects Enterprise Distributing a Report—Learner’s Guide 253 . you may need to share it with other people. the web-based report management system from Business Objects.Lesson 10 Distributing a Report Lesson introduction Now that you have a finished report. One of the most common forms of distributing a report is by exporting it to a different format other than a Crystal Reports file. After completing this lesson.

0 Microsoft Excel (97–2003) Microsoft Excel (97–2003) Data-only Microsoft Word (97–2003) Microsoft Word (97–2003) .Editable ODBC PDF Record style .Columns with spaces Record style . you will be able to: • • • • Define exporting Define exporting formats Define exporting destinations Export a report Exporting reports Crystal Reports lets you insert objects anywhere on the report page. The exporting process requires you to specify a format and a destination.Exporting a report Finished reports can be exported to a number of popular spreadsheet and word processor formats. MS Excel. For example. and HTML. After completing this unit. as well as to HTML. However. The format determines the file type.2 HTML 4. objects that you placed between lines are moved to the closest line in the output. and common data interchange formats. it is recommended that you use guidelines when designing your reports. you may want to use the report data to project trends in a spreadsheet package or to enhance the presentation of data in a desktop publishing package. This makes the distribution of information easier. Exporting formats Crystal Reports provides you with many different export format types: • • • • • • • • • • • • • • • • Crystal Reports (RPT) HTML 3.Columns without spaces Rich Text Format (RTF) Separated Values (CSV) Tab-separated text (TTX) Text XML 254 Fundamentals of Report Design—Learner’s Guide . To alleviate the formatting problems this behavior could cause. ODBC. and the destination determines where the file is located. when you export to formats such as MS Word.

and saved if you have made changes. 2. Distributing a Report—Learner’s Guide 255 . Enter any additional information that you are prompted for. You can export to XML and then use an industry-specific transform to present the data in an industry-specific format. Exporting destinations The destination determines the export location of your report. With your report open. Click OK. Select a destination type from the Destination drop-down list. you would use the JRDC transform if you worked in the justice/law enforcement area. Crystal Reports enables you to choose one of six destinations. These format types are determined by the DLL files on your local machine. Select a format type from the Format drop-down list. For example. Note: The XML exporting functionality supports the use of transforms. 4. The Export dialog box opens. However. When you export a report to a file format other than Crystal Reports format (RPT). the program attempts to preserve as much formatting as the export format allows.In addition to the standard export format types installed on your machine you may find additional export format types are available to you. 3. select the Export button from the Standard toolbar. They include: • • • • • • Application Disk file Exchange folder Lotus Domino Lotus Domino Mail MAPI (Microsoft Mail) To export a report 1. you may lose some or all of the formatting that appears in your report. 5.

This format can also export certain kinds of summaries in Crystal Reports as Excel functions. The emphasis of these formats is layout representation and formatting. in some formats—such as Microsoft Excel . Microsoft Excel . you will be prompted to enter the destination names. If a report object covers more than one cell. background color. Exporting a report to application formats The export formats supported by Crystal Reports can be broadly categorized in two groups: Page-based formats and record-based formats. Some of the record-based formats are only data-exchange formats.) 256 Fundamentals of Report Design—Learner’s Guide . text color. Almost all of the formatting is retained in this export format. Depending on the format you choose. The summaries that are supported are SUM. if you have text objects in your report that are placed before the left edge of the printable area. Therefore. Microsoft Excel has a limit of 256 columns in a worksheet. This export format retains most of the formatting. This format is intended for use in applications such as fill-out forms where the space for entering text is reserved as empty text objects. be placed outside the left edge of the page. Formatting refers to attributes such as font style. as the name suggests. Exporting a report to Microsoft Excel Microsoft Excel format is a page-based format. Page-based formats tend to produce a more exact output. The exported file contains text and drawing objects to represent report objects. This format converts your report contents into Excel cells on a page-by-page basis. However.Data only—you will notice that some formatting is exported. subject. if you selected mail as the destination.Data only. Even so. COUNT. however. this format does export most of the formatting. (This is most noticeable in reports with wide pages. text alignment. Layout refers to object position. exact format that produces an RTF (Rich Text Format) file. AVERAGE. in general. object size. too. Contents from multiple pages are exported to the same Excel worksheet. but it does not export line and box objects from your report. and so on. is a record-based format that concentrates on data. If a worksheet becomes full and there is more data to export. Exporting a report to Microsoft Word Microsoft Word (RTF) is a page-based. Microsoft Excel . the export program creates multiple worksheets to accommodate the data. therefore. Text objects cannot.Data only format does not merge cells—each object is added to only one cell. preserve these properties as closely as possible. Unlike Microsoft Excel format. but page-based formats. it may not be possible for the program to preserve all layout and formatting perfectly. and the relationship between these attributes and other objects. Individual objects are placed in text frames. any report object (or part of it) that is added to cells beyond 256 columns is not exported. they will be pushed right. and message. With record-based formats.For example. the export program merges cells to represent a report object. the emphasis is on data rather than the layout and formatting. MIN and MAX.

Saving an export option You can save an export option for a report that will be exported to various formats. this format does not use text frames. Unlike Microsoft Word (RTF) format. and so on may not be retained. but attributes such as background color. This option may not correspond to the page breaks created by Microsoft Word. fill pattern. All images in your report are inlined with the textual content and. To save report export options 1. 2. The Set Default Export Options dialog box appears.The Microsoft Word . The Microsoft Word . This format does not export line and box objects from your report. These export options are then saved in the report and used as the default export options when viewing or scheduling a report in BusinessObjects Enterprise. Select the export format. Distributing a Report—Learner’s Guide 257 . This format converts all of the report object contents to text lines. but not all of the layout and formatting are preserved in the output.Editable (RTF) format is different from Microsoft Word (RTF) format. Text formatting is retained. the images automatically shift to accommodate text when the document is edited in Microsoft Word. the option is used mainly to separate your report-page contents.Editable (RTF) format has an option to insert page breaks at the end of each report page. Click File ➤ Export ➤ Report Export Options. it is a page-based format. therefore.

Export the report to Microsoft Excel (97-2003) with certain criteria: • Make sure there are page breaks for each page. 2. 258 Fundamentals of Report Design—Learner’s Guide . • Make sure that each page header is displayed on each page.xls.xls to view it. 4. Activity: Exporting a report to Microsoft Excel Objective • Export a report to Excel and Excel (Data Only) to compare the differences between the two exporting destinations.rpt starting point report. Save the output as Exporting to Excel. Open Exporting a Report-1. • Convert the order date to be displayed as a string. Instructions 1. Open Exporting to Excel. 3.3. Click OK.

rpt to Microsoft Excel (97-2003) Data-only.xls and view the results. Export Exporting a Report-1. Ensure that the Xtreme logo is also exported. 6. 5.Your report in Excel should look similar to this example. Distributing a Report—Learner’s Guide 259 . Save the output as Exporting to Excel Data only.

Bold the report title to make it stand out. 7. Fix the formatting in the report: • Expand the columns so all the numbers are visible. • Add another row and copy the report title into it. 260 Fundamentals of Report Design—Learner’s Guide .Your report in Microsoft Excel (97-2003) Data-only should look similar to this example when you first view it in the application. • Expand the row with the Xtreme logo to make it visible.

3. Activity: Exporting a report to Microsoft Word Objective • Export a report to RTF and Microsoft Word (97-2003) . View the RTF document.Editable to compare the differences between the two exporting formats. 2. Export the report to RTF and save the output as Exporting to RTF. Distributing a Report—Learner’s Guide 261 . Open the Exporting a Report-1. Compare the differences between the two export formats: • The Microsoft Excel (Data only) version needed post-processing work in order to make it readable. Instructions 1.rpt starting point report.Your report in Microsoft Excel (97-2003) Data-only should now look like this example. 8.

Open the Exporting a Report-1. Export the report to Microsoft Word . Save the output and view the Microsoft Word document.Editable.Editable and save it as Exporting to Word .rpt starting point report. 5. Insert page breaks after each report page.Your exported report should look similar to this example. 7. 4. 6. 262 Fundamentals of Report Design—Learner’s Guide .

the report title in the Editable version is not. • The RTF version is larger in size (approximately 1.Your exported report should look similar to this example. 8. Compare the differences between the two export formats: • The report title in the RTF version is in a text box. Distributing a Report—Learner’s Guide 263 .62 MB). the Editable version is smaller at 278 KB.

To update the format of an older report. display summarized information. In this way. • Reports become more useful. In other words. because only the information requested by users is returned from the database server. After completing this unit. thereby creating a reporting solution specific to his or her particular decision-making problem. • When users need real-time reporting of live data over the web. and especially when designing reports for the web. so each user can navigate the report quickly and then drill down to access additional data. because each user customizes the report’s contents. web traffic and response times are minimized. because only the data requested by the user is transferred from the database server. use the Save As command (instead of Save) and enter a new name for the newer version report. open it in Crystal Reports and select Save from the File menu. user-oriented reports respond quickly and communicate efficiently with the database server. These are only a few of the benefits of designing user-driven reports: • Report users gain interactive control over the type and quantity of information they view over the web. 264 Fundamentals of Report Design—Learner’s Guide . Some of the methods you can use to design optimized reports for viewing in BusinessObjects Enterprise are: • Using faster report formats • Choosing between live and saved data • Designing summary reports Using faster report formats The quickest way to improve the performance of reports created in older versions of Crystal Reports is to save them in the latest Crystal Reports format. The older version of the report will be replaced with the newer version report. It is recommended that you update your older reports to take advantage of these enhancements. you will be able to: • Define viewing requirements in BusinessObjects Enterprise • Save a report to BusinessObjects Enterprise • View a report in BusinessObjects Enterprise Viewing requirements in BusinessObjects Enterprise When designing your reports. you should allow report users to drive the data they see.Saving to BusinessObjects Enterprise You can use design options and considerations that will help improve the performance of your reports. • Data transfer and network traffic decrease. Note: If for some reason you need to keep a report in its original file format.

Distributing a Report—Learner’s Guide 265 . first make sure the Save Data with Report option is selected on the File menu and then save your report. Consequently. Live data Live reporting gives users real-time access to live data. you can refresh reports with saved data on an as-needed basis. then live reporting is the way to give them the information they need. the choice to use live or saved data is one of the most important decisions you’ll make. For instance. so you can see your report while the rest of the data is being processed. Saved data Reports with saved data are useful for dealing with data that isn’t continually updated. you should first consider whether or not you want all of your users accessing the database server on a continual basis. reports with saved data not only minimize data transfer over the network. Sales representatives then always have access to current sales data. Whichever choice you make. Change your database logon. you may prefer to use reports with saved data. Use live data to keep users up-to-date on constantly changing data. For example. so they can access information that’s accurate to the second. Drill down in a report where Perform Grouping On Server is selected. so they automatically refresh from the database on a predetermined basis. or once a week. Change the report’s parameters. but they aren’t hitting the database every time they open a report. they don’t access the database server directly. If the data isn’t rapidly or constantly changing. Crystal Reports supports live reporting. Add a new field that doesn’t exist in the saved data. However. Saved data is discarded and refreshed when you perform any of these tasks in a report: • • • • • Select the Refresh command. and the Details section is suppressed. Alternatively. if your sales database is only updated once a day. then you can run the report on a similar schedule and save it with data. then all those requests to the database do little more than increase network traffic and consume server resources. Crystal Reports displays the first page as quickly as possible. You can schedule these reports within BusinessObjects Enterprise. if the managers of a large distribution center need to keep track of inventory shipped on a continual basis. instead. In such cases. • Change the order of groups (only for reports in the Report Application Server). When users navigate through reports with saved data. • Verify the database—if the database structure has changed drastically. but also lighten the database server’s workload.Choosing between live and saved data When reporting over the web. straight from the database server. and drill down for details on columns or charts. they access the saved data. To save a report with data. • Change the linking parameter on a subreport (the subreport is refreshed).

When you choose the Enterprise option in the Open dialog box. When you publish a report to BusinessObjects Enterprise. or it lets you save a new report to an Enterprise folder. by hiding a summary report’s Details section. or corporate portal. you avoid overwhelming users with data they may not immediately need. or even tens of thousands of pages. users navigate with the Group tree first. is the same as publishing the report to BusinessObjects Enterprise. the front-end interface to BusinessObjects Enterprise.0/3. click Save As. You can save Crystal reports to BusinessObjects Enterprise folders. which. you can deliver it to end users via any web application—intranet. by drilling down on the report. which might consist of hundreds. Crystal Reports facilitates the publication of reports through the Enterprise option found in the Open and Save As dialog boxes. in essence. When the Details section is hidden. Once you’ve grouped and summarized your report data. Note: The Enterprise button is not visible if Crystal Reports doesn’t detect BusinessObjects Enterprise on your machine. to locate the desired data. To save a report to an Enterprise folder 1. or use it to save a new report to an Enterprise folder. You can also view the report in BusinessObjects Enterprise InfoView. you first need to group the data and insert the summary fields you want to include in your report. On the File menu. This is especially important to improving navigation of long summary reports. Internet. Use the Save As dialog box to save a modified report back to its original location. 266 Fundamentals of Report Design—Learner’s Guide . Saving a report to an Enterprise folder is the same as publishing the report to BusinessObjects Enterprise. The same option in the Save As dialog box lets you save a modified report back to its original location. click Enterprise. you can select any published report to make changes to it. Then. A summary report can include as much data as any other report.1 server environment. 2. extranet.Designing summary reports Designing and distributing summary reports is a relatively easy way to ensure that users quickly find the data they need over the web. users can request specific data. which is returned quickly without unnecessary records. In the Save As dialog box. To facilitate navigation in this way. hide the Details section (and any other large report sections) so that users can easily navigate to the data that’s important to them. However. thousands. Note: This functionality is available only with a BusinessObjects Enterprise XI 3. Saving a report to BusinessObjects Enterprise Another way to distribute your reports is through BusinessObjects Enterprise.

Enter a file name for your report. Distributing a Report—Learner’s Guide 267 . and NT Authentication requires special setup. 6. select a folder to save your report in. Windows NT authentication requires a user name and password that is recognized by Windows NT. 3. Windows AD authentication requires a user name and password that is recognized by Windows AD. In the System field. AD. LDAP. 5. 7. Tip: You can also log onto a Central Management Server (CMS) from the File menu before you open a report. if required. the Log On to BusinessObjects Enterprise dialog box appears. 9. Enterprise authentication requires a user name and password that is recognized by Crystal Enterprise. Enter your user name and password. LDAP authentication requires a user name and password that is recognized by an LDAP directory server. Select Enable repository refresh if you want your report’s repository objects to be updated when the report is opened again in Crystal Reports or scheduled in BusinessObjects Enterprise. Click the Authentication list to select the appropriate authentication type. You can also create a new folder in which to save your report. 4. Click Save to publish your report to BusinessObjects Enterprise. When the Enterprise folders appear. Note: Enterprise authentication is the default method. enter or select the name of the BusinessObjects Enterprise system that you want to connect to. 8.If you have not already logged onto BusinessObjects Enterprise.

3. use the batch options on the folder’s shortcut menu: ○ First Batch displays the first 100 objects in the selected folder. 268 Fundamentals of Report Design—Learner’s Guide . You can then use the Find dialog box to enter the report’s name or a part of its name. 6. Double-click the report link to open and view the report. On the File menu. 6. The Logon page appears. Click Log On. • Select the Update Repository Objects option to ensure that the report’s repository objects are updated when the report is opened in the future. ○ Previous Batch displays the previous 100 objects in the selected folder. Click the Authentication list to select the appropriate authentication type. ○ Last Batch displays the last 100 objects in the selected folder. The Enterprise folders appear and you can select a report to open in Crystal Reports. To view a report in BusinessObjects Enterprise 1. ○ Next Batch displays the next 100 objects in the selected folder. Locate the report in the folder in the list. Double-click the report you want to view and then click Open. 5. or Windows NT Authentication. Click OK. highlight a folder and select Find from its shortcut menu. 4. 5. 2. In the Existing User area of the Logon page. 3. In the System field. Windows AD. enter or select the name of the BusinessObjects Enterprise system that you want to connect to.To view a report in an Enterprise folder 1. 7. LDAP. In the Open dialog box. Launch BusinessObjects Enterprise InfoView. The home page reappears and you are logged on with your own account. Enter your user name and password. click Open. • To limit the risk of expanding a folder than contains many hundreds of reports. Note: • To find a specific report. type your user name and password. Click the Authentication list to select Enterprise. click Enterprise. 4. 2.

Activity: Saving a report to BusinessObjects Enterprise Objective • Save a report to a folder in BusinessObjects Enterprise and then view the report in BusinessObjects Enterprise InfoView. 7. Modify the summary info section of the report to include the author name. Save the report as Distributing a Report. 2. 6. Distributing a Report—Learner’s Guide 269 . 8. View the report in BusinessObjects Enterprise. 4. Save the report with data so you can view it in BusinessObjects Enterprise.rpt starting point report. Open the Distributing a Report-1. Save the report to your Favorites folder in BusinessObjects Enterprise by using the Enterprise folder option in the Save dialog box. 3. 5. Open BusinessObjects InfoView. Log on to BusinessObjects Enterprise. Instructions 1.rpt. Locate the report you saved.

what are some of the methods used to optimize reports? 4. 2. What does it mean if the Enterprise button is not visible in Crystal Reports? 5. When designing reports that will be viewed in BusinessObjects Enterprise. The exporting process requires you to specify and . What option would you use to ensure that the report’s repository objects are updated when the report is opened in the future? 270 Fundamentals of Report Design—Learner’s Guide .Quiz: Distributing a report 1. What are the two methods to access and view a report in BusinessObjects Enterprise? 3.

Lesson summary After completing this lesson. you are now able to: • Export a report • Save a report to BusinessObjects Enterprise Distributing a Report—Learner’s Guide 271 .

272 Fundamentals of Report Design—Learner’s Guide .

Answer Key—Learner’s Guide 273 .Answer Key This section contains the answers to the reviews and/or activities for the applicable lessons.

274 Fundamentals of Report Design—Learner’s Guide .

you will produce clearer and more readable reports. ○ If someone leaves the team for any reason and you need to take over the project. Answer Key—Learner’s Guide 275 . and so on). ○ If a group is working on a project.Debrief: Planning a report Page 8 1. ○ The prototype can flag any problems that may occur (technical. then the group’s work can be documented and they can see a “snapshot” of the report if it’s been documented. client misunderstandings. then you’ll have a record/document of where the other report designer left off. ○ It’s a best practice to document processes. data access. ○ The prototype can constitute a “sign off” point in the report creation process. Why is it important to plan a report before creating it? Answer: ○ By taking a systems-oriented approach to reporting. especially if working with a client (even if that client is internal to the organization).

all objects partially surrounded by the marquee are selected. the program retrieves new data and displays this new data on the report.Quiz: Creating a report Page 67 1. Instead of a field frame representing many field values. you can create projects (folders) that contain one or more reports. a single-field frame represents all those values. 4. What is the Workbench? Answer: The Workbench is a folder structure that can represent the type of projects you work on. however. sizing handles appear on the frame and the frame changes color. 5. 3. When you release the mouse. and lists of values. In the Preview tab. 276 Fundamentals of Report Design—Learner’s Guide . When you refresh the report. In the Workbench. 2. bitmaps. custom functions. What is the difference between using the Design tab and Preview tab? Answer: When you place a field in the Design tab. the program uses the data that is saved in a cache file with the report on the client machine. ○ Click in the section. When you highlight the field. ○ You can also use the cursor to click and hold to draw an imaginary box around the objects you want selected. What is the difference between using Print Preview and Refresh? Answer: When you preview the report. the values themselves appear. How do you select multiple report objects? Answer: ○ Crtl-click each object in succession. you are working with the actual data. commands (queries). and then click Select All Section Objects. What objects can be stored in the repository? Answer: The repository stores text objects.

Answer Key—Learner’s Guide 277 . What tool is used for filtering or selecting records in Crystal Reports? Answer: The Select Expert 2. ○ F5 on the keyboard. Why would you want to ensure your record selection is case insensitive? Answer: You will want to ensure that your record selection statement is case insensitive if you are not confident that data entry was consistent. 5. When would you use a time-based record selection? Answer: You would use a time-based record selection when you wanted to determine specific results in a given time period. what option would you use? Answer: You would use the Refresh option because the program will run the report again and retrieve fresh data if you add to the record selection criteria to include more records than were needed when you first ran the report. When you want to see new data from the database after modifying the record selection. what are the three methods you can use? Answer: You can use: ○ The Refresh button on the Standard toolbar. When you want to refresh the data on your report. 3. 4.Quiz: Selecting records Page 91 1. ○ The Refresh Report Data command from the Report menu.

3. with the ability to expand the group to see further levels of grouping. What is the function of the Group Tree? Answer: The Group Tree functions like a directory tree with a heading for each group in your report.Quiz: Organizing data on a report Page 126 1. 278 Fundamentals of Report Design—Learner’s Guide . it sorts the data. Why would you want to have the group header repeat on every page? Answer: ○ Makes the report more readable and usable. and then summarizes the values in each group automatically. Can each field in the Sort Fields list be assigned a sort direction in ascending or descending order independently? Answer: Yes 2. ○ Helps to navigate the report. 4. which enables you to create both the customized groups that will appear on the report and the records that each group will contain. When the program summarizes data. How would you create groups that are not reflected by the fields in your database? Answer: You would create a specified order group. What is the difference between a subtotal and a summary? Answer: A subtotal is a summary that totals or sums numeric values in a group. 5. Using the Group Tree aids in navigating through the report. breaks it into meaningful groups.

Quiz: Formatting a report Page 166 1. Answer Key—Learner’s Guide 279 . To reduce the amount of time spent formatting reports by using fields that contain pre-built functions. The Format Painter copies formatting properties from one report object to one or more target objects when you first select a source object in a report and then apply that object’s formatting to a target field. Graphical elements such as lines. The Can Grow option prevents truncation of text objects to allow the text box to expand vertically to fit all text and data from embedded fields. and pictures make specific data stand out and improve the overall appearance of the report. The Template Expert gives any number of reports a consistent look without having to format each report individually. 2. 5. 4. 3. use Special Fields. boxes.

If you want to lock the formatting and position of all report objects in a section. what option do you use in the Section Expert? Answer: Read-only Exercise two 1. What option prevents page breaks from spreading data from a single record over two pages? Answer: Keep Together 3. True or False: The New Page Before and the New Page After option is usually used with Group Headers and Group Footers.Quiz: Applying section formatting Page 183 Exercise one 1. What is the phone number for the Picadilly Cycle in Greater London? Answer: 44-171-531-0221 280 Fundamentals of Report Design—Learner’s Guide . What is the street address for the Offroad Bike Verlieh in Berlin? Answer: Koningswinterer Strasse 800 3. Answer: True 2. Who are the customers in the New South Wales region of Australia? Answer: Canberra Bikes and Down Under Bikes 2.

2. Answer Key—Learner’s Guide 281 . When would you use a conditional formatting function? Answer: You would use a conditional formatting function (found at the top of the Functions tree in the Formula Workshop) whenever you needed to create more complex conditional formatting than is available in the Highlighting Expert. When you need to format objects only in certain cases or apply formatting differently for different situations. What type of formula do you need to create when you apply an attribute property? Answer: If-Then-Else 4.Quiz: Applying conditional reporting Page 225 1. What type of formula do you need to create when you set an on or off property? Answer: Boolean 3. you use conditional formatting.

titles. 2.Quiz: Representing data visually Page 250 1. or legend of the chart? Answer: You would use the Chart Options dialog box when you want to set the appearance. 4. What functionality would you use when you want to create a chart based on detail information? Answer: You would use a condition (when to plot the point) and a value (what is plotted as a point) when you want to create a chart based on detail information. 3. titles. What functionality would you use when you want to set conditional color formatting? Answer: You would use the Color Highlight tab of the Chart Expert when you want to set conditional color formatting. What functionality would you use when you want to set the appearance. What functionality would you use when you have multiple chart values or when you do not have any group or summary fields in the report? Answer: You would use the Advanced chart layout when you have multiple chart values or when you do not have any group or summary fields in the report. 282 Fundamentals of Report Design—Learner’s Guide . data labels. data labels. 5. or legend of the chart. What functionality would you use when you need to see the details behind summary information in a bar chart? Answer: You would use drill-down when you need to see the details behind summary information in a bar chart.

When designing reports that will be viewed in BusinessObjects Enterprise. What option would you use to ensure that the report’s repository objects are updated when the report is opened in the future? Answer: Select the Update Repository Objects option to ensure that the report’s repository objects are updated when the report is opened in the future. what are some of the methods used to optimize reports? Answer: ○ Using faster report formats ○ Choosing between live and saved data ○ Designing summary reports 4. Answer Key—Learner’s Guide 283 . 5.Quiz: Distributing a report Page 270 1. What are the two methods to access and view a report in BusinessObjects Enterprise? Answer: ○ Enterprise Folders ○ InfoView 3. What does it mean if the Enterprise button is not visible in Crystal Reports? Answer: The Enterprise button is not visible if Crystal Reports doesn’t detect BusinessObjects Enterprise on your machine. The exporting process requires you to specify format and destination. 2.

284 Fundamentals of Report Design—Learner’s Guide .

Sign up to vote on this title
UsefulNot useful