Người khổng lồ phần mềm vừa ra mắt bản beta cuối cùng của công cụ phát triển ứng dụng Visual Studio .NET 2003 và .NET Compact Framework. Đây là những vũ khí chiến lược của Microsoft trong cuộc chiến giành giật lập trình viên từ đối thủ Sun, Oracle, BEA và IBM. | 8 Formulas and Logic It is very seldom that you will create a report that is just a simple list of information. Most reports will include some sort of calculation or logic for everything from a simple calculation to complex statistical work to manipulation of strings dates and so on. In addition to having its own formula language Crystal Reports can also be used to create reports that take advantage of logic and calculations performed elsewhere as well including database views stored procedures and SQL commands and expressions. In this chapter we are going to be looking at all of these methods of integrating calculations into your report and will spend time learning about where the majority of Crystal Reports development time is spent writing formulas and logic. This will include Deciding how to integrate logic into your report Working with the Formula Editor Creating formulas with Basic syntax Creating formulas with Crystal syntax Writing record selection formulas Using conditional formatting At the end of this chapter you will be able to identify the best way to add calculations and logic to your report and understand enough syntax and code to handle most situations. You should also be able to differentiate between the two different flavors of the Crystal Formula Language and to write your own record selection and conditional formatting formulas. Chapter 8 Integrating Formulas and Logic into Your Reports Few reports are ever created just to list information on a page. Most will include at least some basic calculations summaries and logic. You wouldn t want an invoice for example that didn t have a sales tax calculation and total at the bottom or a sales summary without any totals. How this logic is incorporated into your report depends on the requirements set out by the eventual user. The following sections give an overview of the different ways that you can incorporate formulas and logic into your report. The examples in this chapter deal specifically with .