Crystal Reports in the Real WorldAdvanced Formatting


Often, a report section needs to be more than simply one color or another. A report with many rows might need some color to help guide the reader's eye and make each line distinctly separate from the next. In the following sample, the report created earlier is modified to improve readability:

1.

Open the Chap7RealWorld.rpt report or the report you created at the beginning of this chapter.

2.

From the Report menu, select Section Expert. When the Section Expert dialog window opens, select the Details section and click the Color tab.

3.

As previously described, checking the Background Color box enables you to set all the Detail lines to a single color. The intent here is to highlight the detail lines so they appear distinctly different from the detail line above and below to improve readability. Click the x+2 button and enter the following text into the code window:

If Remainder(RecordNumber,2)=1 Then     crAqua Else     DefaultAttribute;


4.

Finally, go back to the Section Expert. Select Group Footer from the list of sections and check the box labeled New Page After.

5.

Now, each group starts on a new page, and long groups have detail lines defined by color. The color improvement can be seen on page 3 of the report, as shown in Figure 7.15.

Figure 7.15. Records are delimited by color for improved readability.


6.

Save the report.




Crystal Reports XI(c) Official Guide
Crystal Reports XI Official Guide
ISBN: 0672329174
EAN: 2147483647
Year: N/A
Pages: 365

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