Chapter 10. Adding Formulas to Reports

In This Chapter

  • Understanding formula syntax

  • Writing formulas with Formula Workshop

  • Deleting formulas you no longer want

  • Using data types in formulas

  • Manipulating data with variables in formulas

  • Altering reports at runtime with control structures

You can create a report by dragging database fields onto a blank report, adding text and images, and performing a variety of summaries. Such reports are fine for many applications, but sometimes you want to do more than merely summarize data. You might want to process it in some way before displaying it. Crystal Reports has a formula capability that gives you much more latitude in creating the report you want. If you're already a programmer, using formulas won't be tough. If you're not a programmer, you might be surprised to see how soon you can do useful things with formulas. Formulas enable you to perform arithmetic, logical, and string manipulation operations on your data. Using formulas, you can present in your report the information you want your readers to see, even if it's not present in the proper form in your database.

In this chapter, I show you how to use formulas to massage raw data into a presentable form. Crystal Reports includes a number of built-in functions that you can include in your formulas to speed your development efforts. In addition to the built-in functions, you can create your own custom functions to perform operations that are a little out of the ordinary.

Formula Overview and Syntax ...

Get Crystal Reports® 2008 For Dummies® 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.