These five buttons assist you with writing formulas. The first button checks the syntax of the formula. If it finds an error in theformula, it prompts you with a message box telling you if there is a syntax error or not. You can check the syntax after you are finishedwriting the formula or you can do it after each line. Checking the syntax after each line lets you find a problem and correct it beforegoing forward. This is good when you are just learning how to write formulas and you aren't confident of what you are doing yet. It'salso useful if you are writing a complex formula and you want to double check that you didn't make a typo.The next two buttons are the Undo and Redo buttons. You are probably familiar with these from other programs such as MicrosoftWord or Excel. The Undo button removes the last change you made. The Redo button puts that change back if you decide that youshouldn't have clicked the Undo button. It's like an Undo-The-Undo button.?
The last two buttons help you find information. The magnifying glass browses data of a field. This is the same as the Browse Data button we saw with the report experts. It is only available when a field in the Report Fields window is selected.The last button is the Find button. As you might expect, it finds the specified text within the formula and highlights it. But that is justone part of its functionality. What is a really nice feature is that it not only searches your formula, but it searches the text within any of the windows. Look at Figure 5-3 to see what the Find dialog box looks like.Figure 5-3. The Find dialog box lets you do more than just search within the formula. Notice in the center of the dialog box that it has radio buttons that specify where to search for the text. It finds text in Fields,Functions, Operators, and Edit Text (the Definition area). If you've ever tried to find a function name in the Functions tree, it can beconfusing to figure out which node the function is listed under. The Find dialog box finds it for you. And if you only know part of thename then it does partial text finds as well.The Find feature also replaces existing text with new text. But this is only enabled for the Edit Text option (you aren't about to startrenaming Crystal functions!) If you want to rename a formula name that is referenced within another formula, remember from beforethat you don't have to do this with Crystal Reports. When you rename the formula within the Field Explorer window, Crystal Reportsautomatically searches throughout the entire report and updates all formula references to use the new name.
Chapter 6 - Built-In FunctionsString Functions
The ability to modify and concatenate strings is a powerful feature of many programming languages, and Basic syntax doesn'tdisappoint. This section breaks out the different categories of string functions and summarizes how they work. The categories are:Analyzing a String, Parsing Strings, and Manipulating Strings.Throughout this section, many of the functions listed use one or both of the arguments called compare and start. Rather thanrepetitively list their descriptions throughout the chapter, they are explained here for your reference.