TEAMFLY Team-Fly ® Crystal Reports ® 9: The Complete Reference About the Author After more than 10 years as an internal consultant and trainer in a large corporation, George founded his own consulting and training firm, The Ablaze Group, in 1994 (www.AblazeGroup.com). He has trained, consulted, and developed custom software for large and small clients throughout the United States, Canada, the United Kingdom, and Puerto Rico. George is certified by Crystal Decisions as both a trainer and consultant for Crystal Reports 9, Crystal Enterprise, and Seagate Info. He is a past recipient of the Crystal Decisions Training Partner of the Year award. Prior to his computer career, George was a broadcaster. His voice may still be heard in various national radio and TV commercial and promotional campaigns. Crystal Reports ® 9: The Complete Reference George Peck McGraw-Hill/Osborne New York Chicago San Francisco Lisbon London Madrid Mexico City Milan New Delhi San Juan Seoul Singapore Sydney Toronto Copyright © 2003 by The McGraw-Hill Companies, Inc. All rights reserved. Manufactured in the United States of America. Except as permitted under the United States Copyright Act of 1976, no part of this publication may be reproduced or distributed in any form or by any means, or stored in a data- base or retrieval system, without the prior written permission of the publisher. 0-07-222900-4 The material in this eBook also appears in the print version of this title: 0-07-222519-X. All trademarks are trademarks of their respective owners. Rather than put a trademark symbol after every occurrence of a trademarked name, we use names in an editorial fashion only, and to the benefit of the trademark owner, with no intention of infringement of the trademark. Where such designations appear in this book, they have been printed with initial caps. McGraw-Hill eBooks are available at special quantity discounts to use as premiums and sales pro- motions, or for use in corporate training programs. For more information, please contact George Hoare, Special Sales, at george_hoare@mcgraw-hill.com or (212) 904-4069. TERMS OF USE This is a copyrighted work and The McGraw-Hill Companies, Inc. (“McGraw-Hill”) and its licensors reserve all rights in and to the work. Use of this work is subject to these terms. Except as permitted under the Copyright Act of 1976 and the right to store and retrieve one copy of the work, you may not decompile, disassemble, reverse engineer, reproduce, modify, create derivative works based upon, transmit, distribute, disseminate, sell, publish or sublicense the work or any part of it without McGraw-Hill’s prior consent. You may use the work for your own noncommercial and personal use; any other use of the work is strictly prohibited. Your right to use the work may be terminated if you fail to comply with these terms. THE WORK IS PROVIDED “AS IS”. McGRAW-HILL AND ITS LICENSORS MAKE NO GUAR- ANTEES OR WARRANTIES AS TO THE ACCURACY, ADEQUACY OR COMPLETENESS OF OR RESULTS TO BE OBTAINED FROM USING THE WORK, INCLUDING ANY INFORMA- TION THAT CAN BE ACCESSED THROUGH THE WORK VIA HYPERLINK OR OTHERWISE, AND EXPRESSLY DISCLAIM ANY WARRANTY, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO IMPLIED WARRANTIES OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE. McGraw-Hill and its licensors do not warrant or guarantee that the func- tions contained in the work will meet your requirements or that its operation will be uninterrupted or error free. Neither McGraw-Hill nor its licensors shall be liable to you or anyone else for any inac- curacy, error or omission, regardless of cause, in the work or for any damages resulting therefrom. McGraw-Hill has no responsibility for the content of any information accessed through the work. Under no circumstances shall McGraw-Hill and/or its licensors be liable for any indirect, incidental, special, punitive, consequential or similar damages that result from the use of or inability to use the work, even if any of them has been advised of the possibility of such damages. This limitation of lia- bility shall apply to any claim or cause whatsoever whether such claim or cause arises in contract, tort or otherwise. DOI: 10.1036/0072229004 Want to learn more? We hope you enjoy this McGraw-Hill eBook! If you d like more information about this book, its author, or related books and websites, please click her e. , For Denise Four and counting. And, you’ve stayed by my side—loyal to the end— for every one of them. I Love You. This page intentionally left blank. Contents at a Glance Part I Crystal Reports 9 Introduced 1 Getting the Feel of Crystal Reports 9 . . . . . . . . . . . . . . . . 3 2 Enhancing Appearance with Text Objects . . . . . . . . . . . 33 3 Sorting and Grouping . . . . . . . . . . . . . . . . . . . . . . . . . . . . 43 4 Creating Geographic Maps . . . . . . . . . . . . . . . . . . . . . . . . 79 5 Using Formulas . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 97 6 Creating Custom Functions . . . . . . . . . . . . . . . . . . . . . . . 175 7 The Repository . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 191 8 Analyzing with Advanced Selection Criteria . . . . . . . . 209 9 Making Your Reports Visually Appealing . . . . . . . . . . . . 225 10 Using Sections and Areas . . . . . . . . . . . . . . . . . . . . . . . . . 257 11 Analyzing with Cross-Tabs . . . . . . . . . . . . . . . . . . . . . . . . 289 12 Creating Charts . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 321 13 Using Subreports . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 359 14 Viewer Interaction with Parameter Fields . . . . . . . . . . . 385 vii For more information about this title, click here. Copyright 2003 by The McGraw-Hill Companies, Inc. Click Here for Terms of Use. 15 Exporting Reports . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 419 16 Reporting from SQL Databases . . . . . . . . . . . . . . . . . . . . 435 17 Accommodating Database Changes and Field Mapping . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 489 18 Reporting from OLAP Cubes . . . . . . . . . . . . . . . . . . . . . . 501 19 Reporting from Proprietary Data Types . . . . . . . . . . . . . 527 Part II Crystal Reports 9 on the Web 20 Crystal Reports Web Alternatives . . . . . . . . . . . . . . . . . . 553 21 Crystal Reports and Microsoft Active Server Pages . . . . . 575 22 Introduction to Crystal Enterprise . . . . . . . . . . . . . . . . . . 613 23 Using the Crystal Launchpad and ePortfolio . . . . . . . . . 635 24 Customizing Crystal Enterprise ePortfolio . . . . . . . . . . 693 Part III Developing Custom Window Applications 25 Integrating Crystal Reports 9 with Visual Basic . . . . . . 717 26 Crystal Reports with Visual Studio .NET . . . . . . . . . . . . 799 A Installing and Configuring Crystal Reports Components . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 821 Index . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 829 viii Crystal Reports 9: The Complete Reference [...]... Function Libraries Running Total Fields 6 10 5 11 4 11 5 1 19 12 0 12 1 12 4 12 8 13 0 13 2 13 2 13 4 13 5 13 5 13 6 13 8 14 0 14 3 14 5 14 6 14 7 14 8 15 0 15 3 15 4 15 5 15 6 15 8 1 59 16 5 16 7 16 8 Creating Custom Functions 17 5 Custom Functions Defined Creating Your Own Custom Functions ... 728 728 730 7 31 735 7 39 7 39 7 41 742 745 748 748 750 7 51 753 754 756 7 59 762 764 765 767 770 774 775 775 776 777 780 7 81 786 788 792 793 795 797 797 Contents 800 800 8 01 805 805 806 AM FL Y 799 806 8 09 810 814 814 817 818 8 19 Installing and Configuring Crystal Reports Components 8 21 Installing the Crystal Reports Designer Installing the Report Designer... Modifying Existing Custom Functions Sharing Custom Functions with Other Users Using Custom Functions in Your Formulas 17 6 17 7 17 8 18 3 18 7 1 89 19 0 xi xii Crystal Reports 9: The Complete Reference The Repository 19 1 The Repository Defined Creating a Shared Repository ... for Reports Viewing and Running Instances and Reports Guest Versus User Account Publishing Crystal Reports to Crystal Enterprise Publishing with Crystal Reports 8.5 The Crystal Publishing Wizard Publishing with the Crystal Management Console 23 694 695 696 697 697 698 699 ... Partial Text Matches Using a Parameter Field to Change Sorting or Grouping Using a Parameter Field to Control Top N Reporting 14 387 392 394 396 402 403 403 404 405 408 411 411 413 413 414 415 417 16 Exporting Reports 4 19 Exporting Reports to Office Applications Exporting to Different File Formats Exporting and Launching an... VS.NET Crystal Reports in Visual Studio NET is covered in Chapter 26 AM FL Y Part I TE Crystal Reports 9 Introduced Copyright 2003 by The McGraw-Hill Companies, Inc Click Here for Terms of Use This page intentionally left blank Chapter 1 Getting the Feel of Crystal Reports 9 3 Copyright 2003 by The McGraw-Hill Companies, Inc Click Here for Terms of Use 4 Crystal Reports 9: The Complete Reference. .. and the Welcome dialog box Insert Tools toolbar Expert Tools toolbar Standard toolbar Choose new report option Open report from File Open dialog box Figure 1- 1 Open recently used report Crystal Reports opening screen Formatting toolbar CRYSTAL REPORTS 9 INTRODUCED Crystal Reports is aimed at three general types of users: 5 6 Crystal Reports 9: The Complete Reference When you first start the program, the. .. New Version 9 Conditional Formatting Customizing Charts with Chart Options 322 322 324 325 326 327 3 39 342 342 344 346 346 348 348 3 49 350 306 307 3 09 310 314 315 xiii xiv Crystal Reports 9: The Complete Reference Using Subreports 3 59 Unlinked Subreports Drilling Down on Subreports ... Updating Repository Versions of Objects 7 19 2 19 3 19 6 19 7 19 7 19 8 203 203 203 204 205 207 9 Analyzing with Advanced Selection Criteria 2 09 The Select Expert Refreshing the Report Versus Using Saved Data Record Selection with Date Fields Manipulating the Record Selection Formula Directly Limiting... xxiii Part I 1 TE Crystal Reports 9 Introduced Getting the Feel of Crystal Reports 9 3 Introducing Crystal Reports 9 Crystal Reports Screen Elements Starting Out: Opening or Creating a Report Using the Report Wizards Using the Blank Report Option The Database . . . . . . . . . . xxiii Part I Crystal Reports 9 Introduced 1 Getting the Feel of Crystal Reports 9 . . . . . . . . . . . . . . . . 3 Introducing Crystal Reports 9 . . . . . . . . . . . . . 4 89 18 Reporting from OLAP Cubes . . . . . . . . . . . . . . . . . . . . . . 5 01 19 Reporting from Proprietary Data Types . . . . . . . . . . . . . 527 Part II Crystal Reports 9 on the Web 20 Crystal. Applications 25 Integrating Crystal Reports 9 with Visual Basic . . . . . . 717 26 Crystal Reports with Visual Studio .NET . . . . . . . . . . . . 799 A Installing and Configuring Crystal Reports Components