He has trained, consulted, and developed custom software for large and small organizations throughout the United States, Canada, the United Kingdom, and Puerto Rico.George works as both
Trang 2The Complete Reference
Trang 4The Complete Reference
Trang 5The material in this eBook also appears in the print version of this title: 0-07-159098-6.
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 promotions, 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 GUARANTEES OR WARRANTIES AS TO THE ACCURACY, ADEQUACY OR COMPLETENESS OF OR RESULTS TO BE OBTAINED FROM USING THE WORK, INCLUDING ANY INFORMATION 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 war- rant or guarantee that the functions 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 inaccuracy, 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 liability shall apply to any claim or cause whatsoever whether such claim or cause arises
in contract, tort or otherwise
DOI: 10.1036/0071590986
Trang 6We 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 here.
Want to learn more?
Trang 7years He 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 organizations throughout the United States, Canada, the United Kingdom, and Puerto Rico.
George works as both a trainer and consultant exclusively with Crystal Reports and the BusinessObjects Enterprise family This is his
seventh title in the Crystal Reports: The Complete Reference series,
best-sellers published by McGraw-Hill/Osborne He is also the author of
Crystal Reports Professional Results, also published by McGraw-Hill/
Osborne
In addition to his software career, George is a broadcaster and voice actor His voice may be heard on national radio, TV, and web
commercials, promotions, and documentaries
About the Technical Editor
Ian Treleaven is a software engineer working on the Crystal Reports product development team He has helped create Crystal Reports features as a Senior Developer, Development Lead, and most recently as
a Program Manager Prior to working on Crystal Reports at Seagate Software/Crystal Decisions/Business Objects/SAP, Ian worked for a number of years in the industry at various companies including
Microsoft and IBM
Copyright © 2008 by The McGraw-Hill Companies Click here for terms of use
Trang 11Part I Designing Reports
1 Getting a Feel for Crystal Reports 2008 3
2 Sorting and Grouping 37
3 Analyzing with Advanced Selection Criteria 71
4 Using Formulas 85
5 Creating Custom Functions 155
6 Making Your Reports Visually Appealing 171
7 Using Sections and Areas 215
8 Analyzing with Cross Tabs 245
9 Creating Charts 291
10 Creating Geographic Maps 325
11 Integration with Crystal Xcelsius and Flash 341
12 Using Subreports 359
13 Interactive Reporting with Parameter Fields 379
14 Exporting Reports to Different Formats 419
15 Reporting from SQL Databases 437
16 Reporting from Proprietary Data Types 491
17 Reporting from OLAP Cubes 519
18 Accommodating Database Changes and Field Mapping 543
19 Creating Crystal Reports Applications with Visual Studio NET 565
Part II Crystal Reports Enterprise Reporting 20 Crystal Reports Web Alternatives 607
21 Using InfoView 637
22 Administering Enterprise Reporting Sytems 697
Appendix Formula Language Reference 787
Index 941
ix
Trang 13Acknowledgments xxxiii
Introduction xxxv
Part I Designing Reports 1 Getting a Feel for Crystal Reports 2008 3
Introducing Crystal Reports 2008 3
Crystal Reports Screen Elements 4
Starting Out: Opening or Creating a Report 8
Using the Report Wizards 9
Using the Blank Report Option 13
The Database Expert 13
The Design Tab and Field Explorer 15
Report Sections 17
Previewing the Report 18
Moving and Sizing Objects 19
Formatting Objects 21
Customizing Crystal Reports Behavior 23
The Report Explorer 28
The Workbench 29
Creating Projects and Adding Existing Reports 30
Adding Report Packages 31
The Dependency Checker 32
Checking Dependencies in the Current Report 32
Checking Dependencies for Workbench Projects 34
2 Sorting and Grouping 37
Sorting Your Report 37
New Interactive Sorting 38
Grouping Records 40
Manipulating Existing Groups 45
The Group Expert 46
Adding Summaries 46
xi
Trang 14Multiple Groups 52
Specifi ed Order Grouping 54
Drilling Down on Data 56
Grouping on Date Fields 59
Customizing Group Name Fields 60
Grouping on Formula Fields 61
Top N Reporting 62
Hierarchical Groups 66
3 Analyzing with Advanced Selection Criteria 71
Three Different Ways to Select Data 71
The Select Expert 73
Refreshing the Report Versus Using Saved Data 78
Selection with Date Fields 79
Manipulating the Selection Formula Directly 81
Performance Considerations with Record Selection 83
4 Using Formulas 85
The Formula Workshop 85
The Formula Expert 89
The Formula Editor 91
Data Types 101
Creating a New Formula 103
Editing, Renaming, or Deleting an Existing Formula 107
Copying Formulas 108
Number Formulas 109
Order of Precedence 111
String Formulas 112
The ToText Function 116
Picking Apart Strings 118
Date/Time Formulas 120
Number of Days Between Dates 120
Number of Hours and Minutes Between Times 121
Month, Day, Year, Hour, Minute, and Seconds Functions 122
DateValue Function 122
If-Then-Else Formulas 123
Data Types in If-Then-Else Formulas 124
Multiple Actions with One If-Then-Else Statement 126
Helpful Built-in Functions for If-Then-Else Formulas 129
Other Crystal Reports Logic Constructs 130
Select Case Statement 130
Trang 15For Loop 131
While Do Loop 133
Boolean Formulas 134
Variables in Formulas and Evaluation Times 136
Declaring a Variable 136
Variable Scope 138
Assigning a Value to a Variable 138
Displaying a Variable’s Contents 140
Evaluation Times and Report Passes 141
When Not to Use Variables 146
User Function Libraries 148
Running Total Fields 149
5 Creating Custom Functions 155
Custom Functions Defi ned 155
Creating Your Own Custom Functions 157
Extracting Custom Functions from Existing Formulas 157
Creating Custom Functions from Scratch 162
Modifying Existing Custom Functions 166
Sharing Custom Functions with Other Users 168
Using Custom Functions in Your Formulas 168
6 Making Your Reports Visually Appealing 171
Setting Page Size, Orientation, and Margins 171
General Formatting 174
The Formatting Toolbar 174
The Format Editor 174
The Highlighting Expert 177
Conditional Formatting Formulas 179
Absolute Versus Conditional Formatting 179
Creative Use of the Suppress Property 183
Special Fonts, Graphics, Line Drawing, and Barcodes 184
Using Special Fonts 184
Using Bitmap Graphics 186
Line and Box Drawing 190
Printing Barcodes 190
Text and Paragraph Formatting 192
Format Editor Paragraph Formatting Tab 193
The Format Painter 195
Report Alerts 196
Trang 16Basing Report Formulas or Conditional Formatting on Report
Alerts 200
Crystal Reports Templates 200
The Template Expert 202
Creating Your Own Templates 203
Adding Custom Text 206
The Field Heading Text Object 207
Combining Database Fields 208
Combining Special Fields 210
Formatting Individual Parts of Text Objects 212
Importing Text from a File 213
7 Using Sections and Areas 215
Formatting Sections with the Section Expert 215
The Section Expert 217
Creating Summary and Drill-Down Reports 227
Drill-Down Reports 229
Multiple-Column Reports for Labels and Listings 233
Using Multiple Sections 235
Conditionally Suppressing Sections 239
Printing a Bonus Message for Certain Records 239
Printing a Different Page Header on Page 2 and Later 239
Printing Odd and Even Page Headers or Footers 240
Underlaying Sections 241
8 Analyzing with Cross-Tabs 245
Creating a Cross-Tab Object 245
Editing an Existing Cross-Tab 250
Creative Use of Grouping and Formulas 252
Multiple Rows, Columns, and Summarized Fields 255
Reordering Fields in the Rows, Columns, or Summarized Field Boxes 259
New Derived Rows, Columns, and Cells 259
Creating Calculated Members 260
Using Embedded Summaries 274
Customizing Cross-Tab Appearance 277
The Style Tab 279
The Customize Style Tab 280
Labels or Legends with Cross-Tabs 284
Conditionally Formatting Cross-Tabs 285
Cross-Tab Virtual Page Formatting Options 288
Trang 179 Creating Charts 291
Types and Layouts of Charts 291
Chart Type 292
Chart Layout 293
Creating Charts 294
The Type Tab 295
The Data Tab 295
The Axes Tab 306
The Options Tab 308
The Color Highlight Tab 310
The Text Tab 310
Placing and Sizing Charts 311
Modifying Existing Charts 314
Zooming In and Out on Charts 315
Drilling Down on Charts 315
Finer Points of Chart Formatting 316
Customizing Charts with Chart Options 316
10 Creating Geographic Maps 325
Different Map Types 325
Adding a Map 327
The Data Tab 327
The Type Tab 333
The Text Tab 333
Drilling Down on Maps 333
Changing the Map View 334
The Map Navigator 334
Resolving Data Mismatches 335
Map Layers 337
11 Integration with Crystal Xcelsius and Flash 341
Adding a Flash SWF File to a Report 341
Flash Formatting Options 342
Integrating Crystal Reports 2008 with Xcelsius 344
Using Flash Variables with Crystal Xcelsius 4.5 344
Integration with Xcelsius 2008 351
12 Using Subreports 359
Unlinked Subreports 360
Drilling Down on Subreports 364
Trang 18Linked Subreports 366
Linking Based on Formula Fields 369
Linking to Existing Parameter Fields in Subreports 370
Subreport Formatting with the Format Editor 371
On-Demand Versus In-Place Subreports 372
Passing Data Between Main Reports and Subreports 374
Handling Empty Subreports 376
Performance Considerations 378
13 Interactive Reporting with Parameter Fields 379
Creating a Parameter Field 380
Responding to Parameter Field Prompts 382
Data Type Considerations 383
Using Parameter Fields in Record, Group, or Saved Data Selection 385
The New Parameter Panel 389
Displaying Parameter Field Values on the Report 391
Creating Pick Lists 392
Static Pick Lists 393
Dynamic and Cascading Pick Lists 395
Special Parameter Field Features 402
Optional Parameter Fields 402
Multiple Values 404
Range Values 405
Controlling Parameter Field Data Entry 409
Conditional Formatting with Parameter Fields 411
Highlighting Data Based on Parameter Fields 411
Conditional Suppression Based on Parameter Fields 412
Using Parameter Fields with Formulas 413
Using a Parameter Field for Partial Text Matches 413
Using a Parameter Field to Change Sorting or Grouping 415
Using a Parameter Field to Control Top N Reporting 416
14 Exporting Reports to Different Formats 419
Exporting Reports to Offi ce Applications 420
Exporting to Different File Formats 420
Exporting and Launching an Application 428
Exporting to an ODBC Data Source 428
Sending Reports via E-Mail and Messaging Systems 428
New Crystal Reports 2008 XML Exporting 430
Initial Export via Crystal Reports XML Schema 431
Using an XSLT Transform 433
Trang 1915 Reporting from SQL Databases 437
Logging On to SQL Databases 438
Direct Database Drivers 438
ODBC 439
OLE DB 439
Choosing the Database 440
Changing SQL Options 445
Changing to a Different Database 447
Adding Additional Tables to the Report 448
Removing Unused Tables from the Report 449
Linking Tables 449
Database Expert Links Tab 451
Using Multiple Database Types in the Same Report 454
Join Types, Link Types, and Join Enforcement 456
Viewing the SQL Query 462
Crystal Reports SQL Commands 464
Creating the SQL Command 464
Using a SQL Command in a Report 467
Using SQL Stored Procedures 468
Choosing Stored Procedures 468
Working with Stored Procedure Parameters 469
Using SQL Expression Fields 471
Creating SQL Expressions 471
Grouping on the Database Server 475
Enabling Server-Based Grouping 477
What’s Required to Use Server-Based Grouping 478
Effects of Drill-Down 478
Accommodating Database Changes and Field Mapping 480
Recognizing Database Changes 481
Mapping Old Fields to New Names 487
Performance Considerations 489
Let the Server Do the Work 489
Use Indexed Fields 490
16 Reporting from Proprietary Data Types 491
Reporting from Microsoft Outlook 494
Reporting from the File System Data 495
Reporting from the Windows Event Log 498
Reporting from Web Server Logs 500
Trang 20Crystal Reporting with XML Data Sources 503
Using Local XML Data Sources 503
Using Web-Based XML Data Sources 507
BusinessObjects Enterprise Universes 512
Reporting with Salesforce.com Web Data 515
17 Reporting from OLAP Cubes 519
What Is OLAP? 519
Crystal Reports OLAP Capabilities 521
Supported OLAP Systems 521
OLAP Report Creation Methods 522
Using the OLAP Report Creation Wizard 522
Adding an OLAP Grid to an Existing Report 531
Adding an OLAP Grid Object 531
Changing the OLAP Database Location 534
Controlling OLAP Grid Appearance 534
Virtual Page Formatting Options 535
Interacting with the OLAP Grid 536
The OLAP Worksheet 540
18 Sharing Report Items with the Repository 543
The Repository Defi ned 543
The Repository Explorer Enterprise Items Folder 545
The Repository Explorer Categories Folders 545
The Repository Explorer Repository Items Folder 546
Adding To/Updating the Repository 548
Creating Folders and Categories 548
Adding and Deleting Repository Item Objects 550
Adding Repository Items to Reports 554
Text Objects or Bitmap Graphics 554
Custom Functions 555
SQL Commands and Business Views 556
Changing Repository Items on Your Report 557
Updating Repository Versions of Objects 558
Controlling Repository Rights 559
Controlling Rights at the Central Management Server Level 561
Controlling Rights at the Folder and Object Level 563
19 Creating Crystal Reports Applications with Visual Studio NET 565
Crystal/VS.NET Bundle Options 566
Trang 21Crystal Reports Windows and Web Forms Viewer Control Objects 568
Your First Application: Viewing a Report 568
Crystal Report Object Types 572
Integrated Report Designer 576
Choosing a Data Source 578
Selecting Records and Adding Field Objects 580
Formatting Objects and Sections 582
Sorting and Grouping 583
VS.NET Report Customization Object Models 587
Run-Time Customization with the CrystalReportViewer Object 588
Report Viewer Events 591
Run-Time Customization with the Crystal Reports Engine (ReportDocument) 592
Distributing Crystal Reports Visual Studio NET Applications 601
General Concepts 602
Part II Crystal Reports Enterprise Reporting 20 Crystal Reports Web Alternatives 607
Exporting to Static HTML 608
Hyperlink Capabilities 613
Cascading Style Sheet Support 617
Navigating and Viewing Report Parts 618
Using Navigation 618
Displaying Report Parts 621
Introduction to BusinessObjects Enterprise XI 3.0 625
BusinessObjects Enterprise Defi ned 625
BusinessObjects Enterprise XI 3.0 New Features 629
BusinessObjects Enterprise XI 3.0 Architecture 629
21 Using InfoView 637
Connecting to InfoView 637
BOE Security Model 640
InfoView Organization 640
My Favorites and My Inbox 641
The Document List 641
Objects and Instances 644
Viewing Reports: On Demand or Instance 646
Viewing Third-Party Objects 649
Trang 22Setting InfoView Preferences 650General Preferences 651Change Password 652Crystal Reports Preferences 652Searching InfoView Objects and Instances 654Object-Level Search 654Content Search 656Viewing, Printing, and Exporting Reports 657Supplying Database Credentials and Parameters 657Using the Report Viewer 660Scheduling Objects 665Scheduling Options 666Scheduling Reports Containing Alerts 674Rescheduling Existing Instances 676Using Discussions 678Modifying or Deleting Existing Messages 680Organizing InfoView 680Working with Folders and Categories 681Organizing Objects and Instances 685The My InfoView Custom Layout 691
22 Administering Enterprise Reporting Systems 697
Introducing the Central Management Console 698Managing Users and Groups 700Adding, Modifying, and Deleting User Accounts 700Password Settings 703Adding Groups 704Placing Users in Groups 710Integrating BusinessObjects Enterprise with Existing Security
Environments 712Windows NT 713Windows Active Directory 715LDAP 717Managing Folders, Crystal Reports, and Third-Party Objects 718Managing Public Folders and Subfolders 718Managing Personal Subfolders 721Adding Reports 722Adding Program Objects 732Adding Third-Party Objects and Hyperlinks 735Working with Categories 737Manipulating Categories 738
Trang 23Assigning Categories to Reports and Other Objects 739Controlling Access Using Rights 741Setting Folder and Object Rights 743Setting Access Rights for CMC Functions 747Defi ning Custom Access Levels 747BusinessObjects Enterprise Architecture 749Central Management Server (CMS) 751File Repository Servers 751Crystal Reports Processing Server 752Crystal Reports Job Server 753Program Job Server 753Destination Job Server 753Crystal Reports Cache Server 754Event Server 754List of Values Job Server 755Defi ning Output Destinations 755Creating Calendars 759Using Events 761Confi guring Success/Failure/Alert Notifi cation 764Success/Failure Notifi cation 764Alert Notifi cation 766Other General Administrative Tasks 768Adding Additional Licenses 768Setting Instance Limits 769Specifying Default InfoView Settings 771Using Instance Manager 772Managing Servers 774Viewing Server Properties and Metrics 774The Server Intelligence Agent and the CCM 778
Appendix Formula Language Reference 787
Functions: Additional Functions 787ByteToText 788DateTimeTo2000 788DateTimeToDate 788DateTimeToSeconds 788DateTimeToTime 789DateTo2000 789DTSTo2000 789DTSToDate 789DTSToDateTime 790
Trang 24DTSToSeconds 790DTSToTimeField 790DTSToTimeString 790EventNumber 790ExchGetId 791ExchGetOrganization 791ExchGetPath 791ExchGetSite 792ExtractString 792FRAccRecTurnover 792FRCashFlowVsTotalDebt 792FRCurrentRatio 793FRDebtEquityRatio 793FRDividendYield 793FREarningsPerCommonShare 794FREquityVsTotalAssets 794FRGrossProfi tMargin 794FRInterestCoverage 794FRInventoryTurnover 795FRNetProfi tMargin 795FROperatingProfi tMargin 795FRPriceEarningsRatio 796FRQuickRatio 796FRReturnOnCommonEquity 796FRReturnOnEquity 796FRReturnOnInvestedCapital 797FRReturnOnNetFixedAssets 797FRReturnOnTotalAssets 797LooksLike 798Now 798Picture 798Soundex 798Functions: Alerts 799AlertMessage 799AlertNames 799IsAlertEnabled 799IsAlertTriggered 800Functions: Arrays 800Average 800Count 800
Trang 26TimeValue 816WeekdayName 816Year 817Functions: Date Ranges 818Aged0To30Days 818Aged31To60Days 818Aged61To90Days 819AllDatesFromToday 819AllDatesFromTomorrow 819AllDatesToToday 819AllDatesToYesterday 820Calendar1stHalf 820Calendar2ndHalf 820Calendar1stQtr 820Calendar2ndQtr 821Calendar3rdQtr 821Calendar4thQtr 821Last4WeeksToSun 821Last7Days 822LastFullMonth 822LastFullWeek 822LastYearMTD 822LastYearYTD 823MonthToDate 823Next30Days 823Next31To60Days 823Next61To90Days 823Next91To365Days 824Over90Days 824WeekToDateFromSun 824YearToDate 824Functions: Document Properties 825ContentLocale 825CurrentCEUserID 825CurrentCEUserName 825CurrentCEUserTimeZone 826DataDate 826DataTime 826DataTimeZone 827FileAuthor 827
Trang 27FileCreationDate 827FileName 827GroupingLevel 828Modifi cationDate 828Modifi cationTime 828PrintDate 828PrintTime 829PrintTimeZone 829ReportComments 829ReportTitle 829SelectionLocale 830Functions: Evaluation Time 830BeforeReadingRecords 830EvaluateAfter 831WhilePrintingRecords 831WhileReadingRecords 831Functions: Financial 832ACCRINT 832ACCRINTM 832AmorDEGRC 833AmorLINC 833CoupDayBS 834CoupDays 834CoupDaysNC 835CoupNCD 835CoupNum 835CoupPCD 836CumIPMT 836CumPrinc 836Days360 837
DB 837DDB 838DISC 838DollarDE 838DollarFR 839Duration 839Effect 840
FV 840FVSchedule 840IntRate 841
Trang 28IPmt 841IRR 842ISPMT 842MDuration 842MIRR 843Nominal 843NPer 843NPV 844OddFPrice 844OddFYield 845OddLPrice 845OddLYield 846Pmt 847PPmt 847Price 848PriceDisc 848PriceMat 849
PV 849Rate 850Received 851SLN 851SYD 851TBillEq 852TBillPrice 852TBillYield 852VDB 852XIRR 853XNPV 854YearFrac 854Yield 855YieldDisc 855YieldMat 856Functions: Grid Value 856CurrentColumnIndex 856CurrentRowIndex 856CurrentSummaryIndex 857GetColumnGroupIndexOf 857GetColumnPathIndexOf 857GetIndexOf 858GetNumColumnGroups 859
Trang 30Next (Crystal Syntax only) 872NextIsNull 872NextValue (Basic Syntax only) 872OnFirstRecord 873OnLastRecord 873PageNofM 873PageNumber 873Previous (Crystal Syntax only) 874PreviousIsNull 874PreviousValue (Basic Syntax only) 874RecordNumber 874RecordSelection 875TotalPageCount 875Functions: Programming Shortcuts 875Choose 875IIF 875Switch 876Functions: Ranges 876HasLowerBound 876HasUpperBound 877IncludesLowerBound 877IncludesUpperBound 877Functions: Strings 878AscW 878ChrW 878Filter 878InStr 879InStrRev 880Join 880Left 881Length 881LowerCase 881Mid 881NumericText 882ProperCase 882Replace 882ReplicateString 883Right 883Roman 883Space 884
Trang 32Functions: Type Conversion 912CBool 912CCur 912CDate 912CDateTime 912CDbl 913CStr 913CTime 913Functions: Xcelsius 913ToXMLColumn 913ToXMLData 913ToXMLRow 914Operators: Arithmetic 914Add (+) 914Divide (/) 914Exponentiate (^) 914Integer Divide (\) 915Modulus 915Multiply (*) 915Negate (–) 916Percent (%) 916Subtract (–) 916Operators: Array 917
In 917Make Array 917Redim 917Redim Preserve 918Subscript ([]) 918Operators: Boolean 918And 918Eqv (Logical equivalence) 919Imp (Logical implication) 919Not 919
Or 920Xor (Logical exclusion) 920Operators: Comparisons 921Equal (=) 921Greater or Equal (>=) 921Greater Than (>) 921Less or Equal (<=) 922
Trang 34Operators: Variable Declarations 936BooleanVar 936CurrencyVar 936DateTimeVar 937DateVar 938NumberVar 938StringVar 939TimeVar 939
Index 941
Trang 35With each successive edition of Crystal Reports: The Complete Reference, there is a
small group of dedicated people who provide immeasurable help in its preparation Some have helped over and over for each edition, while others are helping me for the first time Regardless, I so much appreciate your assistance and patience
First and foremost, some very dedicated people at Business Objects deserve great appreciation Blair Wheadon and Julie Ingram went above and beyond the call of duty
to help make this book a success And, Ian Treleaven’s technical editing is beyond compare It’s good to be “friends” again!
And, as usual, the folks at McGraw-Hill/Osborne are patient and helpful in working towards a successful book My acquisitions editor, Lisa McClain, deserves the top nod Your continued support and understanding year after year is so appreciated Both Lisa and acquisitions coordinator Mandy Canales deserve thanks for putting up with my occasional tantrum “You may call me again.” And, it was terrific to work with Bob Campbell and Carolyn Welch yet again You both keep me on track and keep the words straight
Finally, and most importantly, a heartfelt acknowledgement goes to my partner in life and business, Denise Yet one more time, you’ve been supportive beyond words I’m truly grateful
George Peck, April 2008
author@CrystalBook.com
www.CrystalBook.com
xxxiiiCopyright © 2008 by The McGraw-Hill Companies Click here for terms of use
Trang 37In the past, a new version of Crystal Reports could be expected every year to year
and a half With Crystal Reports 2008, Business Objects has elected to wait a while longer before releasing an updated version of its flagship reporting product And, not only is the software new, so is the organization that created it With SAP’s
acquisition of Business Objects in early 2008, Crystal Reports can now be considered in the true “big leagues” of Business Intelligence products And, the release schedule and vendor organization aren’t the only changes With a brief foray into Roman numeral version number, a new direction has been launched yet again Crystal Reports 2008 is the first version to make reference to a general release year (even though it was
released in late 2007), as opposed to a sequential version number Regardless, internal version numbering, as well as the Program Files directory structure, indicate that this
is a 12.x product release.
While an argument might be made that this is not a “one-dot-oh” upgrade, there are several major changes to Crystal Reports 2008 The look-and-feel change is fairly substantial, with all-new toolbars and various “Office 2007” updates Some major new features, such as Flash/Xcelsius integration and vastly enhanced cross-tab capabilities, can be found While all developers may not appreciate the expected deprecation of older Microsoft COM/Visual Studio 6 support, they should appreciate improved web and Windows NET viewers and integration capabilities And, with a single-edition, all-encompassing release (there are no longer three editions to keep straight), as well
as a substantially reduced “installation footprint,” the simplicity of keeping track of editions and installing the product are welcome additions to Crystal Reports 2008.The 2008 edition of this book largely maintains the layout of previous editions, with a few consolidations While Part I covers general report design techniques that will apply to virtually everybody who uses the tool, developers will now find a single chapter at the end of this part, devoted solely to Visual Studio NET integration
Part II covers various techniques and methods to place your Crystal Reports on the web While some discussion on simple HTML export helps you get your reports
to the web without additional tools, this part concentrates almost entirely on the
xxxvCopyright © 2008 by The McGraw-Hill Companies Click here for terms of use
Trang 38companion BusinessObjects XI 3.0 product family, which provides an extensive feature set for automating and distributing Crystal Reports Use chapters in Part II to help you explore this powerful web-based reporting tool.
And, the appendix provides a complete formula language reference This covers all functions in the formula language (including new functions added to Crystal Reports 2008), along with helpful descriptions and examples that illustrate each function and operator
As with the previous editions, sample reports and developer applications can be found online Many of the sample reports illustrated in Part I, as well as sample Visual Studio NET applications, are available for download And, an extra online chapter is available to accompany the printed chapters here All these supplementary materials, as well as any late-breaking changes to the book, can be found on this
book’s companion web site at CrystalBook.com You may also e-mail the author with suggestions or questions about the book at Author@CrystalBook.com.
What’s New in Crystal Reports 2008
In addition to the vendor-related and version numbering changes discussed earlier, Crystal Reports 2008 presents significant functional changes A short description of most of these additions and updates follows, with chapter number references (although some minor new features may be mentioned only here and not covered extensively in the rest of the book) New Crystal Reports 2008-related features in the BusinessObjects Enterprise XI 3.0 family are discussed in Chapters 20, 21, and 22
• New Look and Feel The first obvious change is the look and feel of Crystal Reports
2008 If you use Microsoft Office 2007, you’ll notice a similar organization (including the distinctive color and shading scheme) in Crystal Reports 2008 All toolbar buttons have also been redesigned Some of these changes are discussed in Chapter 1
• Single Edition and Smaller Installation Footprint Instead of the three or four
editions of previous Crystal Reports versions, all capabilities are combined in a single Crystal Reports 2008 edition that supports all datasources and provides developer enhancements for Visual Studio NET programmers And, the installation “footprint”
of Crystal Reports 2008 has been reduced to less than 500MB, providing for easier distribution of installation media and faster installation
• Interactive Sorting Report viewers can now re-sort their reports by way of any
visible detail section field As with other web-based systems, small arrow icons can now be placed on the report to facilitate an interactive sort change This feature is discussed in Chapter 2
• More Flexible Report Layout and Page Orientation Options Reports no longer
need to be tied to a particular printer As such, page sizes can be set to any desired width and height, independent of any forms defined on a printer Furthermore, the Section Expert now allows you to specify mixed page orientations within a single
Trang 39report, whereas some pages appear in portrait orientation, while other appear in
landscape orientation These options are covered in Chapter 6
• Product and Viewing Locale Settings Crystal Reports 2008 provides much greater
control for language and formatting localization Depending on the language packs
you have purchased, the View pull-down menu’s Product Locale option allows you
to choose from multiple languages to use for the Crystal Reports User Interface
(menus, dialog boxes, and so forth) Regardless of the chosen Crystal Reports product
locale, the Preferred Viewing Locale option affects various regional-specific settings,
such as date formatting in parameter field prompts Making this choice from the
View menu will provide a more appropriate “regional viewing experience” for your
report audience, regardless of their local Windows Control Panel regional settings
• Saved Data Selection This new feature can greatly reduce the number of database
refreshes required for interactive report viewing, particularly when used with
parameter fields In previous versions, any time new parameter values were required,
a database refresh resulted Now, saved data selection can change the “viewed data”
on the screen based on new parameter values without requiring a database refresh
This feature is discussed in Chapters 3 and 13
• Formula/Field Find and Duplicate Enhancements The Field Explorer now includes
additional options on its pop-up menus to make it easier to find an occurrence of a
database field or formula in other formulas This allows you to assess the impact of
changes or deletions by determining where fields/formulas are used throughout
the report Also, you may duplicate an existing formula with a Field Explorer
right-click pop-up menu option, allowing you to create a copy of a complex formula
You may then rename and perform minimal edits to the copy for slightly different
formula functionality
• Optional Parameter Fields and the Parameter Panel One of the most powerful
enhancements in Crystal Reports 2008, parameter fields can now be defined as
optional This, in combination with the new HasValue formula language function,
will permit report viewers to ignore parameter fields they don’t wish to provide a
value for The parameter panel also provides the capability to interact with chosen
parameter fields right in the Preview tab (or an associated web or Windows viewer
in a custom application or BusinessObjects Enterprise) The parameter panel and
saved data selection provide for much higher report interactivity with much less
database access Parameter fields and the parameter panel are covered in Chapter 13
The parameter panel is also covered in Chapter 19 (related to custom applications)
and Chapter 21 (related to BusinessObjects Enterprise XI 3.0 InfoView)
• Flash/Xcelsius/Flex Integration This powerful new feature allows Flash animation
objects to be embedded directly in a Crystal Report While designed primarily to
support integration with Crystal Xcelsius 4.5 and Xcelsius 2008, any Flash SWF file
(whether designed with Xcelsius, Adobe Flash or Flex, or any other Flash development
tool), can be added to a report And, Crystal Reports 2008 even allows values to be
passed to the embedded Xcelsius or Flash SWF file by way of Flash variables, or
Trang 40an enhanced Xcelsius 2008 integration interface Chapter 11 covers this new feature exclusively.
• Custom Cross-Tab Rows, Columns, and Summaries Those familiar with previous Crystal Reports cross-tab capabilities (and limitations) may find new Crystal Reports
2008 cross-tab enhancements to be the most compelling feature in this new release Now, custom cross-tab rows, columns, and summarized fields can be created with the enhanced formula language Many reports that couldn’t make use of cross-tabs
in the past can now make use of a custom cross-tab to provide highly flexible row/column layouts These new features are covered in Chapter 8
• Enhanced Barcode Support A third-party barcode font, additional formula language
functions (provided by a User Function Library), and Convert To Barcode menu options, provide enhanced barcode support in Crystal Reports 2008 This feature is discussed in Chapter 6
• New Formula Language Functions The formula language has been enhanced to
provide complete control for customized cross-tab rows, columns, and summarized fields These new GridValue functions appear when editing or formatting appropriate cross-tab objects Also, the formula language includes some new functions related to the chosen viewing locale Some cross-tab functions are covered in Chapter 8, with all new functions covered in the appendix, the Formula Language Reference
• Enhanced Support for Web-Based Datasources and CrystalReports.com Crystal
Reports 2008 adds an additional datasource in the Database Expert for Salesforce.com, allowing for direct connection to your Salesforce.com CRM data XML web services as data sources also receive some updated features (both Salesforce.com and XML web service data sources are covered in Chapter 16) And, you can now open reports and save reports directly to CrystalReports.com, instead of having to manually upload or download already-saved RPT files
• Improved XML Export Although “standard” XML export capabilities still exist in
Crystal Reports 2008, the steps for setting up custom XML exports have changed dramatically Instead of using the previous built-in dialog box to define the XML export format, Crystal Reports 2008 now provides complete support for XML transforms This allows virtually unlimited text export capability New XML exporting capabilities are discussed in Chapter 14
• Custom Add-In Developer Hooks Crystal Reports 2008 provides expanded
capabilities for developers to create their own custom add-ins This capability allows a Visual Studio NET developer to create a custom Crystal Reports add-in menu and external functionality Information on creating custom add-ins can be found
on the Crystal Reports developer sight, diamond.businessobjects.com
• Visual Studio NET Integration Improvements As with previous versions, Crystal
Reports 2008 will provide additional integration options if installed on a computer already containing a version of Visual Studio NET Not only are there additions to the standard Crystal Reports object model, but enhanced support for new Crystal