Slide 1 -
Slide 1
Slide notes
We now show the 'Leave Balances' Report as an
example where we use a Header Subroutine. A Header Subroutine is optional and
is an advanced function available to Developers, and requires programming
skills.
Slide 2 - Slide 2
Slide notes
The Report has a Heading and it is 'Leave
Balances', but when we produce the Report, it has a different Heading, because
we use a Header Subroutine to modify the Heading.
Slide 3 - Slide 3
Slide notes
This is the name of the Program that performs the
Heading for this Report. But let's test-run the Report and see what happens
with the Heading.
Slide 4 - Slide 4
Slide notes
Slide 5 - Slide 5
Slide notes
Slide 6 - Slide 6
Slide notes
Slide 7 - Slide 7
Slide notes
And we see that the Heading now actually includes a
Date, so that from the Heading we can see for which Date the Leave Balances
were performed for the Report at this time.
Slide 8 - Slide 8
Slide notes
But of course, when we write the Report, we cannot
know what Date to put there, because it will be different each time a User
performs the Report.
Slide 9 - Slide 9
Slide notes
So for this purpose, we have a program that is called and the standard Heading is passed
to the program. The program may now perform any logic, and in the process modify
the Heading, then pass it back to the Report. In this logic, just for interest
sake, the program caters for 2 scenarios. In the 1st possibility, a Date has
been passed by another Program via the Common Block and if it is present then
it will be used, but if such a Date is not present, then the Report is being
performed for Leave Balances as at today, and therefore the system then uses today's
Date in the Heading.
Slide 10 - Slide 10
Slide notes
Slide 11 - Slide 11
Slide notes
Now we will show the Help for this Field.
Slide 12 - Slide 12
Slide notes
Slide 13 - Slide 13
Slide notes
Slide 14 - Slide 14
Slide notes
The Help explains more or less what we have just
shown, and also suggests the convenient use of another standard system call for
this purpose.
Slide 15 - Slide 15
Slide notes
Thus, a Header Subroutine can be used to modify the
Report Heading at runtime.