2. Building Cross-Tabs in Your Reports Create a Cross-Tab Create a Specified Group Order Filter Cross-Tab by Group Keep Groups Together



Similar documents
Parameter Fields and Prompts. chapter

Ohio University Computer Services Center August, 2002 Crystal Reports Introduction Quick Reference Guide

Crystal Reports Designer Version 10

Custom Reporting System User Guide

Computer Training Centre University College Cork. Excel 2013 Pivot Tables

Microsoft Access 2010 handout

Excel 2003 Tutorial I

Crystal Reports. Overview. Contents. Columnar Drill-Down Report

Seagate Crystal Reports Designer

Crystal Reports Designer

Excel Project Creating a Stock Portfolio Simulation

How To Create A Powerpoint Intelligence Report In A Pivot Table In A Powerpoints.Com

MICROSOFT ACCESS 2007 BOOK 2

Microsoft Excel Basics

Basic Excel Handbook

Handout: Word 2010 Tips and Shortcuts

How to make a line graph using Excel 2007

Excel Unit 4. Data files needed to complete these exercises will be found on the S: drive>410>student>computer Technology>Excel>Unit 4

Basic Pivot Tables. To begin your pivot table, choose Data, Pivot Table and Pivot Chart Report. 1 of 18

Getting Started with Excel Table of Contents

Decision Support AITS University Administration. Web Intelligence Rich Client 4.1 User Guide

Basic Microsoft Excel 2007

Microsoft Excel 2010 Tutorial

BID2WIN Workshop. Advanced Report Writing

Microsoft Excel 2007 Consolidate Data & Analyze with Pivot Table Windows XP

Excel 2007 Basic knowledge

Sample- for evaluation purposes only. Advanced Crystal Reports. TeachUcomp, Inc.

Introduction to Microsoft Access 2013

Business Objects 4.1 Quick User Guide

Analyzing Excel Data Using Pivot Tables

Microsoft Office Excel 2007 Key Features. Office of Enterprise Development and Support Applications Support Group

Excel. Microsoft Office s spreadsheet application can be used to track. and analyze numerical data for display on screen or in printed

Migrating to Excel 2010 from Excel Excel - Microsoft Office 1 of 1

Crystal Reports Payroll Exercise

HRS 750: UDW+ Ad Hoc Reports Training 2015 Version 1.1

REUTERS/TIM WIMBORNE SCHOLARONE MANUSCRIPTS COGNOS REPORTS

6. If you want to enter specific formats, click the Format Tab to auto format the information that is entered into the field.

Crystal Reports Secrets. 20 Secret Shortcuts and Workarounds for Crystal Reports Designers and Developers

History Explorer. View and Export Logged Print Job Information WHITE PAPER

Introduction to Microsoft Access 2010

Produced by Flinders University Centre for Educational ICT. PivotTables Excel 2010

Intro to Excel spreadsheets

Monthly Payroll to Finance Reconciliation Report: Access and Instructions

Excel Using Pivot Tables

Maximizing the Use of Slide Masters to Make Global Changes in PowerPoint

EXCEL PIVOT TABLE David Geffen School of Medicine, UCLA Dean s Office Oct 2002

CREATING EXCEL PIVOT TABLES AND PIVOT CHARTS FOR LIBRARY QUESTIONNAIRE RESULTS

Personal Portfolios on Blackboard

Introduction to Microsoft Excel 2007/2010

Microsoft Excel Understanding the Basics

MicroStrategy Desktop

DataPA OpenAnalytics End User Training

BRIO QUERY FUNCTIONALITY IN COMPARISION TO CRYSTAL REPORTS

Web Intelligence User Guide

Business Objects Version 5 : Introduction

Excel Using Pivot Tables

Creating Custom Crystal Reports Tutorial

Creating Interactive PDF Forms

Excel 2007: Basics Learning Guide

Access II 2007 Workshop

Microsoft Word 2010 Prepared by Computing Services at the Eastman School of Music July 2010

TheFinancialEdge. Crystal Reports Tutorial

Excel 2010: Create your first spreadsheet

Developing Own Crystal Reports

Microsoft Excel 2010 Part 3: Advanced Excel

ORACLE BUSINESS INTELLIGENCE WORKSHOP

Sample Table. Columns. Column 1 Column 2 Column 3 Row 1 Cell 1 Cell 2 Cell 3 Row 2 Cell 4 Cell 5 Cell 6 Row 3 Cell 7 Cell 8 Cell 9.

for Sage 100 ERP Business Insights Overview Document

Advanced Presentation Features and Animation

Advanced Excel 10/20/2011 1

Advanced Microsoft Excel 2010

Microsoft PowerPoint 2008

COGNOS 8 Business Intelligence

MS Word 2007 practical notes

Producing Listings and Reports Using SAS and Crystal Reports Krishna (Balakrishna) Dandamudi, PharmaNet - SPS, Kennett Square, PA

FastTrack Schedule 10. Tutorials Manual. Copyright 2010, AEC Software, Inc. All rights reserved.

Plotting: Customizing the Graph

Microsoft Excel 2010 Pivot Tables

Using and creating Crosstabs in Crystal Reports Juri Urbainczyk

Microsoft Access Introduction

Introduction to Microsoft Excel 2010

Making Visio Diagrams Come Alive with Data

Sample- for evaluation purposes only! Advanced Crystal Reports. TeachUcomp, Inc.

Excel 2003 A Beginners Guide

Sophos Reporting Interface Creating Reports using Crystal Reports 2008

Scientific Graphing in Excel 2010

Excel 2007 A Beginners Guide

Microsoft Access 2010 Part 1: Introduction to Access

Create Charts in Excel

3 What s New in Excel 2007

COGNOS Query Studio Ad Hoc Reporting

TheEducationEdge. Export Guide

Microsoft Migrating to Word 2010 from Word 2003

Microsoft Access 2010 Overview of Basics

How to Create Your Own Crystal Report

Create Analysis, Interactive Reports, and Dashboards

Access 2007 Creating Forms Table of Contents

Search help. More on Office.com: images templates. Here are some basic tasks that you can do in Microsoft Excel 2010.

Transcription:

Crystal Reports Level 2 Computer Training Solutions

Course Outline 1. Creating Running Totals Create a Running Total Field Modify a Running Total Field Create a Manual Running Total on Either Detail Data or Summary Data 2. Building Cross-Tabs in Your Reports Create a Cross-Tab Create a Specified Group Order Filter Cross-Tab by Group Keep Groups Together 3. Adding Subreports Insert a Subreport Link a Subreport to Data in a Primary Report Edit a Subreport Share Formulas Between Main Reports and Subreports Create an On-demand Subreport 4. Charting Data Create and Modify a Chart Create a Top N Chart Format a Chart 5. Reporting on Excel Data Create a Report Modify a Report Update the Report Computer Training Solutions 1 of 12

EZ Start Card The Design Tab When working with Crystal Reports, you will probably use the Design Tab more than any other part of the program. The Design Tab is the place you do most of the initial work when creating a report. It designates and labels the various sections of the report. You can do the initial formatting, place objects in the sections where you want them to appear, specify sorting, grouping, and totaling needs, and so forth. Commonly Used Icons Experts Toolbar Opens the Database Expert. Select a data source and tables on the Data tab. Click the Links tab to define links between tables. Opens the Group Expert. Use the expert to create, modify, and delete groups. Sets record sort order Activates the Select Expert for you to set record/group selection criteria. Activates the Section Expert for you to format any section of the report. Activates the Formula Workshop Insert Toolbar Design Tab Areas When you first begin creating a report, Crystal Reports automatically creates five areas in the Design tab. Inserts a text object. Inserts a group. Report Header Page Header Details This section is generally used for the report title and other information you want to appear at the beginning of the report. It can also be used for charts and crosstabs that include data for the entire report. This section is generally used for information that you want to appear at the top of each page. This can include such things as chapter names, the name of the document, and other similar information. This section can also be used to display field titles above the fields on a report. This section is used for the body of the report, and is printed once per record. The bulk of the report data generally appears in this section. Inserts a summary. Inserts a CrossTab Inserts a Sub Report Inserts a line Report Footer Page 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. This section usually contains the page number and any other information you want to appear on the bottom of each page. If a group, summary, or subtotal is added to the report, the program creates two additional sections: When a group, summary, or subtotal is added, the Group Header area appears directly above the Details area and the Group Footer area appears directly below the Details area. If you set up additional groups, the program creates new group areas between the Details area and the existing Group Header and Group Footer area(s). Like the original areas, each of these newly added areas can contain one or more sections. Inserts a box Inserts a picture. Inserts a chart Standard Toolbar Exports the report in one of several popular formats. Refreshes report data. Group Header Group Footer This section typically holds the group name field, and can be used to display charts or cross-tabs that include data specific to the group. It is printed once at the beginning of a group. This section generally holds the summary value, if any, and can be used to display charts or cross-tabs. It is printed once at the end of a group. Toggles the Group Tree on and off on the Preview Tab Opens the Field Explorer for you to insert database fields. Opens the Report Explorer for you to see the contents of your report in tree view. Computer Training Solutions 2 of 12

Course Reference Card Running Total A running total is a total that is displayed on a record-by-record basis that totals all records in the report or group, up to and including the current record. How to Create a Running Total Field 1. In the Field Explorer, select Running Total Fields, and click the New icon to display the Create Running Total Field dialog box. 2. Type a name for the running total field. You can use the default name given by Crystal or create your own name. Names can contain mixed case characters and spaces Crystal assigns a pound sign (#) to running total field names. 3. From the Available Tables and Field column, select the field to summarize. 4. Select the type of summary. 5. Select an evaluation option (if necessary). 6. Click OK. 7. Insert the field into the report. How to Modify a Running Total Field There are three common modifications made to running total fields: 1. Changing the Summary operation: On the Design tab, select the running total that you want to edit. Right-click to display the shortcut menu and choose Edit Running Total. In the summer section, use the drop-down arrow to change the type of summary. Click OK. 2. Changing the Evaluation Criteria based on a Formula: On the Design tab, select the running total that you want to edit. Right-click to display the shortcut menu and choose Edit Running Total. In the evaluation section, select Use A Formula Click the Conditional Formula button next to Use A Formula and enter the evaluation formula in the Running Total Condition Formula window. Save and close the formula window. 3. To Set the Reset Option to Change on Group: On the Design tab, select the running total that you want to edit. Right-click to display the shortcut menu and choose Edit Running Total. In the Reset section, click On Change Of Group. Use the drop-down arrow to the right of the On Change Of Group to select the group where the counter should be set back to zero. Click OK. available (if data has been suppressed or if data is based on a WhilePrinting Records evaluation time criteria). In this instance you will have to build manual running totals by: 1. In the Field Explorer, select Formula Fields. 2. Click the New button, type a name for the running total field and click Use Editor. 3. Type (or select) WhilePrintingRecords as the first line for the formula. Evaluation formulas must always be the first line in a formula because they determine when the formula will be processed. 4. Type ; and press Enter to move to a new line. 5. Declare the variable and variable type (such as NumberVar RunTotal). 6. Complete the formula to set the running total field calculations. Eg: RunTotal:=RunTotal + {table.field name} 7. Check the formula for errors. 8. Click OK. Drag the formula into the Details section. Evaluation Time Functions Time Function BeforeReadingRecords WhileReadingRecords WhilePrintingRecords Evaluate After(x) Cross-Tab Reports Sample Use This function could be used to capture the system time on start of a report. This function also ensures that it doesn t get calculated after the records have been retrieved. This is often used as a troubleshooting tool to determine when records are evaluated. The formula checker will return an error if an expression or other part of your formula needs to be evaluated later. Use this function when creating manual running total or variable formulas. When you have two formulas that will be printed in the same evaluation time but need control over which one gets calculated first because the results of the first formula are needed for the second formula. A Cross-Tab report is presented in a column and row format that summarized and presents data making it easy to identify trends and compare data. Rows in a cross-tab run horizontally. Columns in a cross-tab run vertically. - Row headings - Column headings - Data to be summarized To Create a Manual Running Total There might be times when you need to create your own running total because Crystal s is either not Computer Training Solutions 3 of 12

Course Reference Card To Create a Cross-Tab Report: 1. Choose the Insert Cross-Tab icon. How to Filter a Cross-Tab by Group 1. Determine which group you want to view the cross-tab data in. 2. Select the field you want to group by and the group options and click OK. 3. Drag the cross-tab from the report header into the desired group header or footer. How to Keep Groups Together 1. On the Design tab, right-click the group section to display the shortcut menu. 2. Choose Change Group to display the Change Group Options dialog box. 2. In the Available Fields list box, select a field for the column and click the arrow next to the Columns box. 3. In the Available Fields list box, select a field for the row and click the arrow next to the Rows box. 4. In the Available Fields list box, select the field to be summarized and click the arrow next to the Summarized Fields box. Note: The default summary is Sum. 5. Click OK to close the Cross-Tab Expert dialog box and create the cross-tab. To Create a Specified Group Order in a Cross-Tab When you create a Cross-Tab, groups default to an alphabetical/numerical sort order. There will be times when you need to override this type of sort to present data in a specific order. To create a Specified Group Order: 1. In the Cross-Tab Expert dialog box, select the row or column field by which your cross-tab will be grouped. 2. Select Group Options to display the Cross-Tab Group Options dialog box. 3. Select in specified order as your sort option to display the Cross-Tab Group Options dialog box. 4. Enter a name for the group and click New. 5. Select a comparison operator and then enter the product names in the group. 3. On the Options tab, check the Keep Group Together check box. 4. Click OK. Changing Cross-Tab Formatting 1. Select the Cross-Tab that you want to edit. 2. Right-click the Cross-Tab in the upper-left corner, and choose Cross-Tab Expert. 3. Make changes to the Cross-Tab object in the dialog box using the Style or Customize tab. 4. Click OK to close the Cross-Tab Expert dialog box. DefaultAttribute DefaultAttribute is a constant used by Crystal to define a type of formatting, whether it is for color, border styles, font types, or any other type of formatting. Using the DefaultAttribute constant in a formula causes the format selection chosen by the user to appear whenever the conditional condition is not met. Eg: If CurrentFieldValue >= 35 then crred else DefaultAttribute Note: Fields used for Cross-Tab rows and column headings cannot be used directly in a formula. The user must first assign an alias name to the row or column heading. This is set in the Cross-Tab Expert dialog box on the Custom Style tab. 6. Click OK to close the Define Named Group dialog box. 7. Click OK to close the Cross-Tab Group Options dialog box. 8. Click OK to close the Cross-Tab Expert dialog box. Computer Training Solutions 4 of 12

Course Reference Card Special Cross-Tab Functions The following table identifies the functions you can use to apply conditional formatting on fields in a Cross-Tab: Function Name CurrentFieldValue CurrentFieldValue IfGridRowColumnValue Insert a Subreport 1. Click on the Insert Subreport icon from the Insert toolbar. 2. Select Choose a Subreport and browse to locate the name of the report you wish to insert and click on Open. 3. Click OK to display an object frame and the mouse pointer. 4. Place the mouse pointer in the section where you want the Subreport to appear and Click Once on the mouse. To Edit a Subreport When Would You Use It To conditionally format a Cross-Tab summary field based on the numerical value of the summary field. To conditionally format a Cross-Tab row or column heading based on the value of the row or column heading. To conditionally format a Cross-Tab summary field based on the value of the row or column heading. 1. In Design View, right-click the Subreport and choose Edit Subreport to display the Design tab of the Subreport. 2. Make any necessary changes to the Subreport Sharing Formulas Between Main and Subreports To enable data to pass back and forth between Main Reports and Subreports, or even Subreport to Subreport, Crystal Reports provides the Shared variable. To share formulas between Main and Subreports, simply add the word shared before the variable declaration portion of the formula. eg: shared numbervar MyCount Important Note About Sharing Formulas: If the formulas are position in the Group Header, the totals would refer to the previous group in the report. Positioning within the report becomes critical when working with shared variables. Creating an On-demand Subreport 1. Click on Insert Subreport to display the Insert Subreport dialog box. 2. Select Choose A Report or Create A Report. 3. Check the On-demand Subreport checkbox to activate the command. 4. Click the Conditional Formula button to add a caption to the Subreport object. 5. Type the text that you want as a caption. Be sure to place quote around the text string. 6. If applicable, check the formulas created in steps 4 and 5, then click the Save and Close button to return to the Format Editor dialog box. 7. Click OK to close the Insert Subreport dialog box. Create a Bar Chart 1. Click on Insert Chart icon to display the Chart Expert dialog box. 2. On the Type tab, select Bar on the type of chart. 3. On the Data tab, select the placement of the chart and how often the chart will appear on the report. 4. On the Options tab, select the type of labels that will appear (data points), the legend placement, and the bar size. 5. On the Text tab, select and enter the titles, footnotes, and axis titles for the chart. 6. Click OK to close the Chart Expert dialog box. Modifying a Chart 1. Right-click on the chart and choose Chart Expert to display the Chart Expert dialog box. 1. On the Type tab, you can change the type of chart. 2. On the Data tab, you can change the placement of the chart and how often the chart will appear on the report. 3. On the Options tab, you can change the type of labels that will appear (data points), the legend placement and the bar size. 4. On the Text tab, you can select and enter the titles, footnotes, and axis titles for the chart. 2. Click OK to close the Chart Expert dialog box. Creating a Top N Chart 1. Right-click on the chart and choose Chart Expert. 2. On the Data tab, select the field you want and click the TopN button to display the Group Sort Expert dialog box. 3. In the For This Group list box, select TopN. 4. Select the summary field that the chart will be based on. 5. Enter the number that you want to represent as N (where N is the number of values). 6. Click OK to return to the Chart Expert. 7. Click OK to close the Chart Expert and create the TopN chart. Computer Training Solutions 5 of 12

Course Reference Card Formatting a Chart 1. Right-click on the chart and choose Chart Options to display the shortcut menu. 2. Choose the applicable format option. 3. Click OK to close the dialog box and apply the changes to the chart. Chart Formatting Options Choose This Option Template General Titles Grid Set Up Excel As A Data Source To Do This Apply or customize a template Change the General, Layout, Data Labels, Numbers, Look or Display Status options Change the Title, Subtitle, Footnote, Group Title, or Data Axis Title Display the Numeric Axis Grids & Scales dialog box to change the Data Axis and Group Axis options Before using Excel as a data source, the data must be entered properly in the spreadsheet. Some simple basic layout guidelines are: The data list should be one continuous range of data. There should be no blank rows or columns in the middle of the data list. Ensure that there is at least one blank row and one blank row separating the data list from any other data (such as titles) on the spreadsheet. There should be no blank line separating the title/header row from the data list. Ensure that there are no merged cells or subtotals within the data list. Updating a Crystal Report Created with Excel Data 1. Start Excel and open the spreadsheet. 2. Make changes to the data in the spreadsheet (as necessary). Add rows or columns of new data Modify/Replace existing data Delete rows or columns of data 3. Save the spreadsheet and Exit Excel. 4. In Crystal, open the report and choose ReportRefresh Report Data (or press F5) and click OK to refresh the report. What is a Parameter Field? A Parameter Field is a field that prompts the user of a report to enter information or pick choices from a drop-down list. Based on the choices made by the user, the contents of the report change based on how the user answers the prompts. Creating a Parameter Field Use the following steps to create a parameter that enables the user to specify a list of customers for a specific country. This procedure is made up of two sets of steps. The first is creating the parameter, and the second is using the Select Expert to incorporate the parameter. Creating a Parameter Field 1. Check to make sure your report is open in the Design tab. 2. Click the Field Explorer icon. 3. Select Parameter Fields and click New. 4. Enter a name for the parameter in the Name field (up to 255 alphanumeric characters). 5. Enter the desired prompting text in the Prompting text field (up to 255 alphanumeric characters). 6. Select the appropriate Value type from the list. Create a Report Based on Excel Data 1. In Excel, click the Crystal Report 9 Wizard icon. 2. Select the range of data including headings. 3. Click the Create Crystal Report button to open the Wizard. 4. Add the fields to the Fields To Display list box. 5. Add the fields you want to total in the Summarized Fields list. 6. Set the selection criteria. 7. Select a style and enter a title and location for your report. 8. Click Finish to preview the report. Note: If the Crystal Report 9 Wizard icon is not visible in Excel do the following: 1. Click on ToolsAdd-Ins. 2. Click on the Browse button. 3. Browse to: C:\Program Files\Crystal Decisions\Report Designer Component 4. Double-click on crexcel9 icon. 5. From the Ad-Ins dialog box, click on OK. Note: When creating a parameter whose Value type is either Date or DateTime, you can change the date format to suit your needs. 7. Click Set default values. 8. Check to make sure the Browse table is set to Customer. 9. From the Browse field drop-down list, select Country. 10. Click >> to move all of the countries to the Default Values area. 11. Click OK. Computer Training Solutions 6 of 12

Course Reference Card 12. Click OK. 13. Drag and drop the Country parameter into your report. Note: If you don't want to see the parameter field you dropped in your report, place it in a section you can suppress, such as a report header or footer. To Incorporate the Parameter into the Selection 1. Click on the Select Expert icon. 2. Select Country from the Customer table, then click OK. 3. Choose is equal to from the drop-down list. 4. Choose the parameter from the adjacent drop-down list. 5. Click OK. 6. Click the Preview tab. 7. Select the country to base the report on. 8. Click OK. 9. Click Refresh Data. Refreshing Report Data When you refresh data from the Preview tab, the Refresh Report Data dialog box appears. Creating a Parameter With Multiple Values 1. On the View menu, click Field Explorer. 2. Select Parameter Fields and click New. 3. Enter a Name and Prompting text. 4. Select a Value type. 5. Select the Allow multiple values check box to enable more than one value to be entered into the parameter. Both discrete and range type values are allowed individually or in combination. 6. Click Set default values to determine the type of entries that are allowed to be entered. 7. From the Browse table drop-down list, select the table for the default values. 8. From the Browse field drop-down list, select the field for the default values. 9. Select the values listed, or create you own, and move them to the Default Values area using the arrow buttons. 10. Adjust the display, order, and length limit as required. 11. Click OK. Incorporating a Parameter into a Formula 1. On the View menu, click Field Explorer. 2. Select Parameter Fields and click New. 3. Create a parameter field and save it. 4. Select Formula Fields and click New. 5. Enter the name of the formula, then click Use Editor. 6. Create a formula using the parameter field as you would any constant value. For example, rather than creating a formula that hard-codes the country name: {customer.country} = "USA" Use a parameter field instead of "USA". {customer.country} = {?Country} Select the "Use current parameter values" option to use the current parameter value. Select the "Prompt for new parameter values" option to enter a new parameter value. When you select this option and click OK, the Enter Parameter Values dialog box appears. Creating a Report Title Using Parameter Fields 1. Click Field Explorer icon. 2. Select Parameter Fields and click New. 3. In the Create Parameter Field dialog box, type a name for the parameter field in the Name field. 4. Type in any prompting text you wish in the Prompting text field. 5. Select String from the Value type drop-down list. 6. Click Set default values. 7. To specify a default title, type the desired text into the Select or enter value to add field and click > to add the title to the Default Values area. 8. Click OK. 9. Click OK. 10. Place the parameter field in the Page Header section of the report to have the title appear on every page, or in the Report Header section if you want the title to appear on only the first page of the report. To do this double-click the database field, press =, then doubleclick the parameter. Tip: Identify parameter fields easily by looking for (?). 7. Click Close on the Formula Workshop. 8. Drag and drop the formula into the report. 9. Click Refresh to generate the report. Applying Conditional Formatting Using Parameter Fields Parameter fields can be used to create conditional formatting formulas. You can customize these formulas whenever you refresh the report data. A conditional formatting formula could be used for color-flagging data that meets certain conditions. For example: Sales representatives who sell more than 10% over quota. Customers who have not ordered in the last quarter. Inventory items that have not had any movement in the last month. If the conditions under which you flag these items never change, you do not need to use parameter fields. You can just use formulas (for text flags) or conditional formatting (for border flags). However, to Computer Training Solutions 7 of 12

Course Reference Card change the conditions from report to report, you need to use parameter fields in formulas and conditional formatting formulas. To Apply Conditional Formatting Using Parameter Fields 1. Create the parameter field of the data type you need for the formula. 2. Create the formula and use the parameter field in place of the fixed value you would normally use. For example, to be prompted for all the customers whose last year's sales were over a certain value, and to print their names in red, select the Last Year's Sales field and click Format from the Expert Tools toolbar. This formula prompts for a value for the parameter field {?SortField}. If you enter "C", the formula will sort by the City field. If you enter "R" it will sort by the Region field. If you enter anything else, or do not enter anything at all, the formula will sort by the Country field. 7. Place the formula in the Report Header section of the report and select Suppress (No Drill-Down) in the Section Expert so that it does not print. 8. Click Sort Records icon. 9. Choose your formula and click Add. 10. Click OK. 3. Click the Conditional Formula button next to the Color property on the Font tab, and format the field using a conditional formatting formula like this: If {customer.last YEAR'S SALES} > {?SalesTarget} Then crred else crblack Now, when you refresh the data, the program will prompt you for the value that triggers the color flag (known as the threshold value). It then runs the report and flags all the customers that had sales last year above the threshold figure. You can change the figure each time you run the report and the program will flag a different set of Customer Names. Defining Sort Order using Parameter Fields To set the sort order using parameter fields, you need to first create a formula that includes a parameter field and then sort based on that formula. For example, assume that you have a customer list report based on the Customer table. For each customer, you show the Customer Name, City, Region, Country, and Phone Number. You want to be able to sort the report by Country, by Region, or by City, depending on your needs at the time. 1. Create a parameter field and call it SortField. 2. In the Prompting text edit box, enter a prompt similar to this: Type R to sort by Region or C to sort by City; otherwise, data will be sorted by Country. 3. Select String from the Value type drop-down list. 4. You may want to limit the number of characters the user can type to one. To do this, click Set default values. 5. Select the Length limit check box and type the numeral 1 into the Min Length and Max Length text boxes and click OK. Now the parameter field will only accept single-character values. The field will accept "C" as a value, but not "City." 6. Create a formula similar to this and call it Sort: If {?SortField} = "C" Then {customer.city} Else If {?SortField} = "R" Then {customer.region} Else {customer.country} Computer Training Solutions 8 of 12

Course Reference Card Pre-pass #1 Before Reading Records Flat Formulas Using Database Records Pass #1 While Reading Recurring Formulas Record Selection Formulas Sorting, Grouping & Totaling Cross-tab Generation Saved Records Using Saved Records Pre-Pass 2 While Reading Top N Group Sorting Hierarchical Grouping Pre-Pass #2 While Printing Records Group Selection Formulas Running Totals Print-time Formulas Charts and Maps Subreports Page Orientation Pass #3 Total Page Count Computer Training Solutions Crystal s Multi-Pass Reporting Computer Training Solutions 9 of 12

Exercises Exercise 1 Creating Running Totals 1. Using ShippingInfo.rpt, create a running total called UPS that summarizes the Ship Via field using the evaluation formula {Orders.Ship Via}= UPS. You will need to select Ship Via as the field to summarize using the Count function, and evaluate using the formula {Orders.Ship Via}= UPS. 2. Create a running total called FedEx to create a running total for all FedEx shipments. 3. Add the FedEx and Ups running total fields to the report, under their respective headings. (Note: Page Header labels have already been placed in the report for the running totals. Remove the extra field labels as needed.) 4. Preview the report and fill in the blanks below: As of May 1, there were orders shipped via UPS and orders shipped via Federal Express. 5. Save th file as My Shipping Info and close it. Exercise 2 Building Cross Tabs in Your Report 1. Createa new blank report using the Orders table from the xtreme.mdb file. 2. Create a cross-tab and insert a row heading on the Ship Date field, grouped by year. 3. Insert a column heading using the Ship Via field. 4. Change the grouping options for the Ship Via field to In Specified Order, presenting FedEx and UPS first, then all thers in their own groups. 5. Insert a summary field counting the Order ID s. 6. Place the cross-tab in the report header. 7. Customize the row headings so that a four-digit year appears. 8. Suppress the row grand totals. 9. Format your cross-tab as desired. 10. Save your report as My Crosstab Complete and close it. Exercise 3 Adding Subreports 1. Using Orders.rpt, insert the Credits.rpt file as a subreport, linked by Customer ID. 2. Modify the Credit.rpt subreport by doing the following: Delete Report Header B Delete the grop name field Move the remaining fields to the left margin (credit total and detail amount). 3. Preview the Orders.rpt report. Notice the borders around the subreport s information and the spacing problems. 4. Remove the border around the subreport using formating options. Exercise 4 Creating Multiple Data Series Charts 1. In Chart Practice Start.rpt. Insert a new report header section to place your chart. 2. Clinck the Insert Chart button 3. Select a vertical bar chart. Computer Training Solutions 10 of 12

Exercises 4. On the Advanced Data tab, move the Order Date and the Customer Name field to the On Change Of section. Be sure the Order Date field appears above the Customer Name field so that the first graphing sort will be done by date. 5. Highlight the Order Date field and confirm the Order settings by clicking the Order button. Confirm that the order date is grouped by year. 6. Move the Order Amount field to the Shows Value(s) section. 7. On the Options tab, in the Data Points section, select Show Value and change the format to 1K. 8. On the Text tab, change the title to First Quarter Sales. 9. Change the data title to Total Sales. 10. Remove the group title text. 11. Preview your chart. 12. Right-click in the chart and select Chart Options General. Using the Data Labels tab, position the labels outside the marker. 13. On the Look tab, change the legend box stype to a reverse beveled frame. 14. Using the General tab, change the riser shapes to beveled boxes. 15. Remove gridlines. 16. Save the report as My Chart Practice. 17. Close the report. Exercise 5 Reporting on Excel Data 1. Open Sales.xls in Excel and activate the Crystal Report 9 Wizard. 2. Set the report area to be A1 through F31 using the Expand The Selected Range Automatically option. 3. Create the Crystal report, using all fields, grouped by customer name. 4. Advanced throught the wizard, not selecting any other options in the tabs presented until you read the Add Style To The Report page. Name your report Customer Book Sales. Select the Executive, Leading Break style. 5. Finish the Expert, preview the report, and then open it in Crystal. 6. Your Customer Book Sales Practice.rpt file will now be open in Crystal. Remove the field, the line, and the vertical guide indicator from the Group Footer #1 section. (Tip: Vertical guidelines prohibit you from resizing a section. Removing the guide indicator will allow us to make the FG1 smaller after you have created the total.) 7. Right-click the Total field and insert a summary on Group 1. 8. Move the summary field to the Group header to the 3-inch margin position. 9. Suppress the Details section, allowing drill down. 10. Preview your report and close it. Computer Training Solutions 11 of 12

Time Permitting Only Crystal Reports Level 2 Exercises Exercise 6 Parameter Reports 1. Open Practice Customer Credit.rpt and save it as My Practice Customer Credit.rpt. 2. Create a formula field names Contact Name that concatenates the Customer.Contact First name, Customer.Contact Last Name, and Customer.Phone fields. There should be a space between each field. 3. Place the Contact name field in the Group Footer to the right of the Sum Of Credit.Amount field and re-size it. 4. Edit the Contact name field so that it includes a comma after Customer.Contact Last Name. 5. Create a parameter field using the following information The field should be named Authorization and prompt the user to select a credit authorization number. The Browse Table should be set to Credit The Browse Field should be Credit Authorization Number. The default list should include all values. Re-size and place the parameter formula t approxmately 6 mark in the Page Header section. 2. Apply bold formatting to the parameter formula field. 3. Create a selection formula where Credit.Credit Authorization Number equals the Authorization parameter formula. 4. Preview the report using a credit authorization number of your choice. Save the report and close it. Computer Training Solutions 12 of 12