You can insert a number of fields into table headers and footers to add information about the tables, filters, weighting, data set, date and time of generation, etc. You can use more than one field in a single header or footer, and you can combine the fields with plain text.
Use the options in the Field Selection dialog box to select fields to add to a selected header or footer position.
To display this dialog box, open either the Header and Footer tab on the Table Properties dialog box:
or the Global Header and Footer dialog box:
Then place the cursor in a header or footer text box and choose the Insert Field button.
Field | Description | Options |
---|---|---|
CDSCName | The internal name of the CDSC, such as "mrXmlDsc". | \n \p |
CellContents | The table's cell contents. If there is more than one, they are separated by line breaks. | \n \p |
Context | The user context being used, such as "Analysis". | \n \p |
CurrentTime | The current date and time. By default this is in the long date format for the current language's default regional setting (locale). Use the \s option to use the short date format. | \n \p \s |
DBLocation | The name and location of the case data. | \n \p |
DocumentDescription | The description of the table document, such as "Analysis of age and education against interest in the various galleries". | \n \p |
Filters | The descriptions of all of the filters, concatenated with the
word "AND" in bold. If the filters are at different levels, details
of the levels are shown. If the filter doesn't have a description,
its expression is shown. You can use one or more of a number of options. These are described in the table below. | \e \g \i+ \i- \n \p \t |
LabelType | The label type being used, such as "Label". | \n \p |
Language | The metadata language being used, such as "English (United States)". | \n \p |
Level | The name of the level at which the table was generated. For example, "Person[..].Trip". Use the \l option to use the level's description instead of the name. For example, "Overseas trips taken by each person". | \l \n \p \s |
MDSCName | The internal name of the MDSC being used, such as "mrQvDsc". | \n \p |
MetaDataLocation | The name and location of the metadata. | \n \p |
MetadataVersion | The version(s) of the metadata being used in the form of a version expression, for example, "{..}", which indicates a combination of all versions. | \n \p |
ProjectDescription | The description of the data set, such as "Museum Survey". | \n \p |
ProjectName | When you are using a CDSC that supports multiple projects (such as RDB DSC), you can show the name of the project being used, such as "short_drinks". | \n \p |
Rules | The rules defined for the table. Each rule is separated by
a line break. For example, "Hide cells where Count equals 0". | \n \p |
RunTime | The date and time of generation in the current language's default regional setting (locale). By default this is in the long date format. Use the \s option to use the short date format. | \n \p \s |
SideSpec | The specification of the side of the table. For example, "age". Use the \l option for a more "friendly" version of the side specification in which variable names are replaced by their descriptions. For example, "Age of respondent". | \l \n \p \s |
SortColumn | The column by which the table is sorted. For example, "Gender{Male}". | \n \p \s |
SortRow | The row by which the table is sorted. For example, "Age{Base}". | \n \p \s |
Statistics | Notes relating to the statistical tests, separated by a line break. This field should always be used in tables that include a statistical text. For example, "Column Proportions: Columns Tested (5%) A/B". If a statistic is invalid, the annotation indicates this. The \i- option suppresses annotations for invalid statistics. | \i- \n \p |
TableBase | The table's base value. For example, "602". | \n \p |
TableDescription | The table description, such as "Age by gender for all respondents". | \n \p |
TableName | The name of the table, such as "MyTable". | \n \p |
TableNumber | The index of the table in the table document, such as "5". | \g \n \p |
TableSpec | The table specification, such as "age * gender". Use the \l option if you want to replace variable names with their descriptions. For example, "Age of respondent * Gender of respondent". | \l \n \p \s |
TopSpec | The specification of the top of the table. For example, "gender". Use the \l option if you want to replace variable names with their descriptions. For example, "Gender of respondent". | \l \n \p \s |
TotalNumberOfTables | The total number of tables in the table document, such as "10". | \n \p |
WeightVariable | The name of the weighting variable. For example, "agebalance". Use the \l option if you want to display the weighting variable's description. For example, "Weighting factor for age balance". | \l \n \p \s |
The following additional fields are not available for selection in the Insert Field dialog box, but can be added by typing the syntax directly into the relevant header or footer position, surrounded by curly brackets {}.
Field | Description | Options |
---|---|---|
CellItemSymbols | Information about symbols displayed in the table cells. | \n \p |
PopulateWarnings | Displays warnings generated during the generation of statistical tests, for example, if the type of test requested is not valid for the type of table. | \n \p |
TableProperty:PropertyName | The content of a custom table property. Add the name of the custom property after the colon. To add the text in the Table Notes pane to a table, use the predefined TableNotes custom property. See the topic Adding Notes to Headers and Footers for more information. | \n \p |
Field Codes. Choose this button to see a list of the field codes corresponding to the field options.
Field Options. The following table describes the field option codes that are available for use with header and footer fields:
Option | Description |
---|---|
\e | Always use the filter expression instead of the description. |
\g | (Used with Filters field) Include only global filters (that is, ignore any filters applied directly to the table). |
\g | (Used with TableNumber field) Add hierarchical numbering if the tables are stored in folders; for example, 2.1, 2.1.1, etc. |
\i+ | Include only Interview filters. |
\i- | (Used with Filters field) Include only filters that are not Interview
filters. (Used with Statistics field) Suppress annotations for invalid statistics. |
\l | A more "friendly" version in which variable names are replaced by their descriptions (labels). |
\n | When combining more than one field in a header or footer position, you can use this option to add a conditional line break after the text inserted by the field. The line break will only be inserted if the field inserts some text. |
\p | This option can be used with all fields to add a text prefix. For example, when used with the Filters field, it inserts the text "Filters: " in front of the details of the filters. |
\s | Used with the CurrentTime and RunTime fields, displays
the short date format rather than the long date format. Used with the Level, SideSpec, SortColumn, SortRow, TableSpec, TopSpec, and WeightVariable fields, displays the short name of the field instead of the full name. This option is ignored if you use the \l option. |
\t | Include only filters applied directly to the table (that is, ignore global filters). |