Crystal Reports Online Training

Learn Online, Anytime, Anywhere

Step-by-step online tutorials.

5.01 Using the Formula Workshop

Crystal Reports comes with a powerful set of tools that let you build sophisticated formulas in your reports. You can perform tasks such as conditional formatting, specialized calculations, selecting records and report alerts. Formulas give you advanced functionality that is often only limited by your experience or imagination. The next three chapters are a thorough training manual for creating and programming formulas.

If you don’t have any past experience writing computer programs, the next few chapters could get a little overwhelming. To make it easier, this chapter focuses on learning how to use the Formula Workshop (where you write the formulas). The following two chapters focus on the logic and syntax of writing formulas. Crystal Reports has so much functionality built in it, you can do a lot with only a little knowledge. But if you want to get the most out of Crystal Reports formulas, then you should look into taking a programming course at night. It can take some training and a lot of practice to really get the hang of how to write more complex formulas. Although the next three chapters give you a lot of material to learn from, they are more of a reference guide than an introductory course for how to learn to program from scratch.

It’s my opinion that there are three levels of understanding how to program formulas. The first level consists of indirectly creating formulas by responding to prompts within the report expert dialog boxes. This doesn’t require any knowledge of formulas except for understanding what the prompts mean. The second level goes a little deeper by using the Formula Workshop to create formulas that simply call one of the built-in report functions and return a value. This consists of using conditional formatting to make reports dynamic, using parameters so that a report changes based upon a user’s needs, and dynamically manipulating the grouping and sorting of a report. The third level involves using sophisticated programming constructs with Crystal syntax and/or Basic syntax. This gives you very advanced formulas for creating professional reports. Being adept at the third level requires a solid understanding of programming logic.

Of the three levels mentioned above, the first level is covered throughout the book wherever report experts are used. This chapter and the next focuses on level two by showing you how and when to use the Formula Workshop and how to work with the built-in report functions. The third chapter is a programming tutorial and syntax reference for writing formulas with Basic syntax.

Before getting into how to use the Formula Workshop editor, let’s start out with a quick tutorial that illustrates conditional formatting. This will give you a high level understanding of how this functionality is used to improve your reports. We won’t get into the details of how each feature works right now. That will be covered later in the chapter.