Using Fields in Text Objects in Crystal Reports
Business Objects, Crystal Reports, SAP Crystal Reports
Fields, in Crystal Reports, are the way we bring data from a source into a report. Sometimes, we need to combine the data with text even more directly than placing them side by side.
The technique we can use is similar to creating a mail merge with fields in a couple of other programs. First, we pull up the basic data of a report. Choose the data source and table(s), deal with links between them if necessary, and OK out of the Database Expert.
Next, create the text object. One thing to be careful of is making the text object large enough to accommodate the “sizes” of the data in the fields. For addresses, it’s usually not a problem, but because descriptions and bios can be lengthy, previewing the data can help. (Right-click the fields in Design view and selecting Browse Field Data.)
Also, when we create the text within the object, another thing to be careful about is proper punctuation and spacing. Because just as in word processing, lack of attention to this can make the report look shabby and unprofessional.
Dragging the fields into the text object is not hard at all; it simply requires a little practice to make sure we let go the mouse button at just the right spot. Make sure of where your pointer is. If you miss, just undo or delete the field and try again.
So don’t be surprised if you need to go back and forth between Design and Preview a few times to do some fine-tuning of the fields/text object situation. This is quite normal. Additionally, remember that the fields within the text object(s) can and should be formatted to match the text around them. (Selecting by dragging across them, or double-clicking them, will do it.) Otherwise, again, the final result won’t be professional-looking. Mismatches are visually inconsistent, and can actually make the document harder to read.
To get more out of this program, take a look at our Crystal Reports classes.