![]() ![]() |
|
|
|
A Sharp Report, Part 2: Sections November 2003 |
|
In our last episode, this one being the sequel (in case the “Part 2” in the title didn’t give it away), I talked about the basic structure of an ACT! Report Template and how to create and position controls (Labels, Field boxes, and so on). I also discussed the very important concept of sections. It is sections more than anything else that give you the ability to control how your report arranges its information, so it’s critical that you understand what they are and how to use them. Sections: A Brief Review Every Report Template is divided into sections. Each section is identified by a section title located (for reasons I have yet to understand) at the bottom left of the section itself. Each section’s width and height represent, in a very real way, the amount of space the contents of the section will occupy on the printed page (see Figure 1).
Figure 1. How sections relate to the printed page. The Header section, for example, will print at the top of every page in the report. If the section is 1" high (2.54 cm if you are from anywhere other than the U.S.), then one inch at the top of every page (inside the margin) will be taken up by the content of the Header. The Contact section will be repeated as many times as possible on the page, but each iteration will take the exact height of the contact section on the template. If Header, Footer, and Contact sections were all ACT! reports had to offer, we could stop right here, but it would severely limit your reporting options. Fortunately, there are other section types, and each gives you a bit more control over your final output. Section Types Header and Footer sections are primarily used for formatting your report. That is, they’re used to provide the same information on each page of the report and not to display contact or group fields information. The only useful contact information in a Header or Footer comes from your “My Record.” Contact and Group sections are “data” sections. They compile information from the Contact and Group tables and display them in a clearly defined way on the page. Summary sections are used to summarize information in data sections or control the grouping and/or the sorting of the data on your report. Subsections are used to display lists of related information in a subordinate table. For example, the Contact section can have a Notes History subsection added to it that displays the notes and histories that belong to each contact the report prints. There’s an Activities section that works in a similar fashion, but with Activities. Some sections are dependent on the presence of other sections:
At first glance, the number and variety of sections seem daunting, but in truth, each has a simple purpose, so relax. Let’s take a quick look at each choice.
Summary Sections I had a real problem understanding this section type. In retrospect, it wasn’t because Summary sections are confusing; rather, I think it was because the name confused me. Summary sections are used to display summary information for a data section. Summary sorted by sections can be used to display summary information as well, but they also control how the report is sorted and how the data is grouped. Not all sections can be summarized (for example, you can’t summarize the page footer). You can add a Summary section above or below the section you wish to summarize. Simple Summary sections summarize an entire data or subsection and cannot break that section up into logical groups, like Summary sorted by sections. Let’s say you want to produce a Contact report and list your contacts by City. Creating a Summary sorted by City section will cause the report to sort its contacts by City first (regardless of your sort in ACT!) and provide space at the top or bottom of each City section for summary calculations and data. The Summary sorted by section itself often contains column headings and data from the field you sorted by. In our example, you might place the name of the city, so it appears only once at the top of each city’s contacts instead of on every line (see Figure 2).
Figure 2. The effect of Summary sorted by. |
||||||||||||
|
| |||||||||||||||||