Multiple Footers

This post will explain how you can have multiple footers, which are shown based on a condition.

The required space for each footer in your report is always reserved. This is also the case if your footer is hidden by conditions in your report. However, there is a feature than can help produce reports with conditional footers. The trick is to tell the system that your footer does not require any space. In the classic version of NAV this was the equivalent of setting a height of 0 (zero) on your section. In the ForNAV designer you have a property named Is Watermark on each section. By setting this property to Yes the system will no longer reserve any space for this section. The result is that the section is printed under the next section, hence the name Watermark.

If you set your footers to behave as watermarks, you can control the visibility from code. After the conditional footers, you should add a placeholder section. A placeholder section is simply an empty section, which reserves the space the previous watermark sections need. This means that the placeholder section should have the height of the highest conditional section.

Example

Below you will find an example of how to control the visibility of multiple footers. It is a simple report built on the item table. The first four pages have a different footer controlled by the ShowOutput source expression on the footer sections.

In this example the condition for showing a section is based on the current page number. Each of the footer sections with content has the Is Watermark property set to Yes.

The last footer section is a placeholder without content other than a sample caption to let you see where it is printing. The Show Output property is set to true and the Is Watermark property is No.

When this report runs, it will only show the first footer and the space reserved by the placeholder on page one.

You can download the report object here:

R50000_multiple_footers