The Crystal Reports 10 Format Painter


While Crystal Reports 10 doesn t provide a large number of new features when compared to Crystal Reports 9, one new feature has been sought after for some time. The Format Painter, which provides capabilities like those of similarly named features in standard office suites, is a welcome addition to this Crystal Reports version. The Format Painter allows you to copy a large number of formatting properties from one previously formatted object to one or more additional objects with simple mouse clicks.

First, decide which object will contain the formatting that you want to copy (this object is known as the source object ). If necessary, double-check the source object s formatting by displaying the Format Editor after selecting the object. Once you re sure of its formatting, select the source object (you can only select a single object ”the Format Painter won t work if you select more than one source object). Then, click the Format Painter button in the Standard toolbar, choose Format Format Painter from the pull-down menus , or right-click and choose Format Painter from the pop-up menu.

The mouse cursor will change to the Format Painter paintbrush. Now, move the mouse cursor to the report object (known as the target object ) you want to copy the source formatting to. If you move the mouse cursor over an object that the Format Painter won t work with, a no-drop cursor (a circle with a line through it) will appear. For example, you won t be able to copy formatting from a database field to a bitmap image. Objects that can accept Format Painter formatting will show the paintbrush cursor. Click on the target object to apply the copied formatting. If you want to copy Format Painter formatting to more than one object, make sure to hold down the ALT key while clicking on the object. The paintbrush icon will continue to appear as you click on subsequent objects.

Data types play a significant role in Format Painter behavior. If you ve set a combination of formatting properties for the source object that both are and are not dependent upon data type (for example, font color is not dependent upon data type, but number of decimal places is), some of the properties will not stick to the target object. Continuing with the previous example, using a numeric field that contains a red font color and three decimal places will only result in the red font color sticking on a non-numeric field ”the three decimal place formatting will stick only when the target object is a numeric or currency field.

Conditional formatting is also a consideration when using the Format Painter. First and foremost, any conditional formatting applied with the Highlighting Expert (discussed earlier in the chapter) will not be copied to target objects by the Format Painter. However, conditional formatting applied with formulas set with Format Editor conditional formatting buttons will be copied. Again, only those conditional formulas that are applicable to the target data type will be copied ”a conditional formula setting the number of decimal places won t be copied to a non-numeric field, while a conditional formula setting font size will.

While data types play a role in determining what will be copied to target objects, the type of report object (database field, text object, bitmap image, cross-tab, and so forth) determines whether or not the Format Painter will even work. If you attempt to copy formatting with the Format Painter, you may find the no-drop cursor (circle with line) appearing more often than you might expect. This is often because you are attempting to copy formatting to a dissimilar type of report object.

For example, if you click a database field prior to clicking the Format Painter toolbar button, you ll encounter a no-drop cursor if you hover the mouse over a text object, bitmap field, or other dissimilar report object. Sometimes, this behavior will be completely understandable (you can t change the font color of a bitmap). In other cases, you may wish to paste some common formatting properties (font color, size, or face) onto the text object target from the source database field. Because the objects are dissimilar, the Format Painter won t work. This is a limitation of Crystal Reports 10.

Tip  

For a complete object type “by “object type description of Format Painter behavior, search online help for Format Painter, using.




Crystal Reports 10
Crystal Reports 10: The Complete Reference
ISBN: B005DI80VA
EAN: N/A
Year: 2004
Pages: 223
Authors: George Peck

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net