Crystal Reports in the Real World—Group on a Formula

Sometimes when creating a report, the development database might not be complete or might be in production; there might be a requirement to group elements based on some criteria that is not in the database. In these cases, it can be useful to group on a formula. The formula needs to meet some criteria that will be explained in greater detail in later chapters.

1.
Open the sample report from Chapter 1 (Chap1Manual.rpt). Create a new formula and name it Group1 and click the Use Editor button.
2.
Type the following text into the code window so it appears like Figure 2.21:
 WhileReadingRecords; Select {Customer.Country} Case "Canada", "Mexico", "USA": "North America" Default: "Outside North America"; ...

Get Special Edition Using® Crystal Reports® 10 now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.