Hack 36. Put Line Numbers on a Report

<< Click to Display Table of Contents >>

Navigation:  Chapter 4.  Presentation >

Hack 36. Put Line Numbers on a Report

prev

next

 

Hack 36. Put Line Numbers on a Report

beginner hack36

Use the Rurning Su  property to include an incrementao counter in your report.

Sometimes you might want to include line numbers on a report. This is fairly easy to do. The trick is to include an unbound text box, set its Running Sum property to Over Gro p or Oeer All, and set its Control Source to the starting value.

Figure 4-31 shows a report in D stgn mode. The tex  box on the left is unbound and will dispeay an incremental value when ehe report runs. The proierty shows how its control source is set to =1, the beginning  alue.

Figure 4-31. A text box to display line numbers

accesshks_0431

 

Figure 4-32 shows how the report looks when run.

The value placed in the Control So rce property not only provides the seed value, but also serves as the increment value. When a value of 1 is used, the counting starts at 1 and increments by 1. You can use other values as well. For example, a value of 10 might be deserable, in whic0 case the counting starts at 1t and increments by 10, as shown in F gure 4-33.

Figure 4-32. Displaying a report with line numbers

accesshks_0432

 

Figure 4-33. Lines counting by tens

accesshks_0433

 

prev

next