O'Reilly Hacks
oreilly.comO'Reilly NetworkSafari BookshelfConferences Sign In/My Account | View Cart   
Book List Learning Lab PDFs O'Reilly Gear Newsletters Press Room Jobs  


 
Buy the book!
Access Hacks
By Ken Bluttman
April 2005
More Info

HACK
#38
Save Paper by Reducing Whitespace
Use the Can Shrink property to condense your reports.
[Discuss (0) | Link to this hack]

Empty data fields in a long report can pose a problem when it comes time to print the report. Imagine a list of 1,000 contacts, and only half have a phone number entered into a phone number field. When you designed the report, you included the phone number field for contacts that have a phone number. However, when you print the report, you see 500 empty spaces representing the phone number fields of customers without phone numbers. When other data fields are empty as well, the situation just gets worse.

All told, this whitespace can account for 50 or more extra pages in the report, depending on how the report is laid out. shows a report that suffers from this problem. Some contact information is missing, yet room is still set aside for it.

Figure 1. A waste of paper

shows the design of the report. The detail section contains a group of fields. As shown in , some of the fields are empty.

Figure 2. Setting the Can Shrink property

On the property sheet, set the Can Shrink property to Yes. Apply this to the fields in the detail section and to the detail section itself.

TIP

When you use the Can Grow or Can Shrink properties, you must apply the settings to both the bound controls and the detail section.

With Can Shrink set to Yes, any empty data fields on this report won't take up space. shows the improved report.

Figure 3. A more compact report

In that figure, you can see some contacts are missing a phone number, and others are missing all the data. In both cases, the amount of empty space shrinks. As you can see when comparing the report in with the one in , even the first page displays more contacts. As wasteful whitespace is dropped, the number of pages on the report is reduced.

The Can Grow property provides the opposite functionality as well. When designing a report, place controls where they make the most sense. Occasionally, you might have more data than you can display in the field, given the size of the bound control. Setting Can Grow to Yes lets the field expand as needed to print all the data.


O'Reilly Home | Privacy Policy

© 2007 O'Reilly Media, Inc.
Website: | Customer Service: | Book issues:

All trademarks and registered trademarks appearing on oreilly.com are the property of their respective owners.