Go to the first, previous, next, last section, table of contents.


BANNER

This macro defines a text body that is to be written at the top of each sorted group. Any field references within the text body will be taken from the first record in the sorted group. The macro can take one or more field arguments which defines the level at which the banners occur (for which sorted group with reference to the sorton list defined by the SORTON predefined macro). These field arguments must always correlate with the fields used for sorting. In the example program fragment below a banner is defined on the YEAR field and a header will be written out preceeding each sorted group of years.

%%SORTON %YEAR %SURNAME
%%BANNER %YEAR
\flushleft{\underline{%YEAR}}

Fields given as multiple arguments to one BANNER predefined macro will share the same text body, special equates can be used to distinguish which banner it is (see section Predefined System Variables), however, fields given to separate predefined macros will each have their own unique text body. The banners can be defined in any order as they will be matched to the sorted groups according to their field arguments.

If an SQL query is being used that is ordered it it not neccessary to apply an order using SORTON to use banners. Simply define the banners with field arguments that correlate with those the SQL query is using as below.

%%DATABASE "people.sql"
  select * from people order by year, surname
%%BANNER %YEAR
\flushleft{\underline{%YEAR}}

Note that the GPPBANNER and TEXBANNER predefined macros which the above replaces are deprecated and should not be used.


Go to the first, previous, next, last section, table of contents.