O'Reilly logo

Special Edition Using® Crystal Reports® 10 by Roger Sanborn, Steve Lucas, Kathryn Hunt, Joe Estes, Michael Voloshko, James Edkins, Bob Coates, Naisan Geula, Ryan Marples, Neil FitzGerald

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

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"; ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required