Template syntax | Cross-Tab Header Fields

<< Click to display table of contents >>

Template syntax | Cross-Tab Header Fields

See the topic about fields in templates for a general description of the syntax.

See the topic about cross-tab reports.


<cross-tab header> ::= [']#<cross-tab field>['][ <field type>][ "<format>"]

A cross-tab field name (including the starting '#' character) may be enclosed in single quotes. These single quotes are necessary, if it contains space characters.

<cross-tab field> is a value of one of fields specified in Table.CrossTabulation.Levels[].FieldName or Table.CrossTabulation.Levels[].CaptionFieldName.

Field names are case insensitive.

About cross-tab header fields

References to cross-tab fields may occur:

in cells of the cross-tab header;

in Table.CrossTabulation.Levels[].DataQuery, if Table.CrossTabulation.ColumnGenerationType=rvcgtDataQueryCascade

In the first case, you can refer to fields corresponding to the cross-tabulation level of this cell, and to fields corresponding to higher levels of the cross-tabulation.

In the second case, you can refer to fields corresponding to higher levels of the cross-tabulation.

<cross-tab field> can be empty. Such field is an equivalent to the lowest available cross-tab level.

Cross-tab header field types

Report Workshop supports the following types of cross-tab header fields (when referring to a value of FieldName field):


integer value

floating point value


date, time, date and time.

When referring to a value of CaptionFieldName, the field type is always text.

You can override the field type by specifying <field type>, read the topic about specifying data field types.

Cross-tab header field's format strings

Read the topic about format strings.


Let we have:

Table.CrossTabulation.Levels[0].CaptionFieldName = 'Category'

Table.CrossTabulation.Levels[1].CaptionFieldName = 'Product'

A cross-tab report table may look like it is shown below (the pink color denotes cross-tab header cells corresponding to data columns, the light blue color denotes a header for a summary column):




Total for {#Category}




The same report table can be written in a shorter way:




Total for {#Category}




Additional examples can be found:

in the topic about a cross-tab header (replacing fields in header cells)

in the topic about cross-tab data queries (replacing fields in cross-tab data queries)