Slide 1 -
Slide 1
Slide notes
Despite all the IES Report Writers, there are
occasions when Developers may prefer to write a specific Report by program. For
example, all the Audit Trail programs in IES are programs, in other words, written
by code logic rather than Report Writers.This can only be done when we have
programming skills. When we choose to write a Report by program, then it is
recommended that we use the IES framework that is provided for this purpose. In
the file CLIENT.BP, we have a sample program that makes it quite clear how to
do this. This Program is called "sample.program.report" and it may be
copied to new names and then used as the basis of a new report program, by
extending and adding to it.
Slide 2 - Slide 2
Slide notes
Our program will always start with a subroutine
name and possibly some arguments. This sample program includes many comment
lines to explain what we should do.
Slide 3 - Slide 3
Slide notes
The data selector statement is always at the top,
before the standard includes used in the framework.
Slide 4 - Slide 4
Slide notes
The standard includes take care of the required
subroutines for print lines, new pages and closing procedures for the report.
Slide 5 - Slide 5
Slide notes
After this, we usually open the data files that we
will access, and when done according to the IES standard as shown here then we
have the fail-safe procedure included.
Slide 6 - Slide 6
Slide notes
After that, we have program code to retrieve the
data selection which would have already been performed and saved by the system.
Slide 7 - Slide 7
Slide notes
This is how it's done in the framework context.
Slide 8 - Slide 8
Slide notes
And after this we have an execution loop where we
perform the Data Record iterations. Of course, the program can also work
differently if it is not based on a Data Record iteration, but it should still
be clear how we will go about the logic. It is during this stage that we are
very likely to perform subroutines that may be placed lower down in the
subroutine section.
Slide 9 - Slide 9
Slide notes
When all is said and done, we perform
"myf.final" to wrap up the results and present the Report Output to
the User.
Slide 10 - Slide 10
Slide notes
And here we have the sample subroutine section,
with examples of how we will deal with print lines and new pages.
Slide 11 - Slide 11
Slide notes
Slide 12 - Slide 12
Slide notes
And there we have the end of the program. So by
using this basis, we can use the IES framework productively, and add to and pad
the program with our own required logic.