Crystal Reports Online Training

Learn Online, Anytime, Anywhere

Step-by-step tutorials and online videos.

Click Here To Learn More »

6.13 Non-Blank Sections, Repeated Fields

Example 6-2. Adding non-blank sections.

If you can use sections to suppress blank lines, you can do just the opposite: use sections to show special information. For example, you may want a report to only print a section for unique circumstances. There are a multitude of examples on how to use this feature. An employee report could print a special note if an employee’s birthday falls within the current month. Invoices can print reminders to late customers that they need to pay or else penalties will be incurred. A recipe listing can print additional notes for favorite recipes. Each example benefits from using multiple sections because if the section doesn’t have any data to print, additional room isn’t allocated on the report.

Example 6-3. Suppressing sections for a repeated field.

The Suppress If Duplicated format option suppresses a field if its data is duplicated, but this option isn’t available for suppressing entire records. Instead, write your own formula for this. The formula uses the PreviousValue() function to compare the current value of a field to the value in the previous record. If it returns True, the entire section is suppressed.

This code tests if the Orders.CustomerID field has been repeated. Take the following...

Get UNLIMITED Crystal Reports Online Training!

Click Here To Start Your Training!

1500+ Tutorial Pages

Complete Crystal Reports Online Training with over 1,500 pages of better than book quality Crystal Reports tutorials.

Step-by-step Online Videos

Learn at your own pace from the comfort of your home! Pause, rewind and watch online training videos anytime!

Online Community

Members-only community where you can post and answer questions. The community is checked on a regular basis by best selling Crystal Reports book author Brian Bischof to help answer your questions.

Cut & Paste Source Code

Save time with simple cut and paste source code you can use right now in your next report!

Click Here To Start Your Training!