Previous Page | Next Page

TEMPLATE Procedure: Creating Crosstabulation Table Templates

Overview: ODS Crosstabulation Table Template Output


Using the TEMPLATE Procedure to Create a Customized Crosstabulation Table

The TEMPLATE procedure enables you to customize the appearance of crosstabulation (contingency) tables that are created with the FREQ procedure.

By default, crosstabulation tables are formatted according to the CrossTabFreqs template that SAS provides. However, you can create a customized CrossTabFreqs table template by using the TEMPLATE procedure with the statements in the following table.

PROC TEMPLATE Statements
Task Statement
Create a crosstabulation table template DEFINE CROSSTABS
Define a value that appears in the crosstabulation cells DEFINE CELLVALUE
Specify the order in which the cellvalues are stacked in the cells CELLVALUE
Create a template for a footer DEFINE FOOTER
Create a template for a header DEFINE HEADER
End a crosstabulation table template END


What Can You Do with a Crosstabulation Template?

The CrossTabFreqs crosstabulation template describes how to display PROC FREQ's crosstabulation table. You can create a customized CrossTabFreqs crosstabulation template to do the following:

The following display shows a crosstabulation table that has been created with the default crosstabulation table template:

Crosstabulation Table Created with Default Crosstabulation Table Template

[Crosstabulation Table Created with Default Crosstabulation Table Template]

The following display shows PROC FREQ output that has been created with a modified CrossTabFreqs template:

Crosstabulation Table Created with Modified Crosstabulation Table Template

[Crosstabulation Table Created with Modified Crosstabulation Table Template]

The following are some of the customizations that were made to the crosstabulation table above:

Previous Page | Next Page | Top of Page