You create a report
template XML definition file to describe your user-defined report.
After you create the report template, upload the template to the SAS
Content Server.
SAS Model Manager
provides a sample report template that you can use as a model for
your XML template. You can use any template as a model or you can
create an XML file with the required XML elements. A best practice
is to open the model XML template and save the template using another
name.
To open a sample report
template:
-
From the Projects category,
click
, and select
Manage Templates.
-
Select
UserReportTemplate.xml and
click
. The UserReportTemplate.xml file has arguments in
quotation marks that you modify for your report. Replace the text
in quotation marks with values that are appropriate for your report.
See the argument descriptions below. Make your changes and click
Save to
upload the report template to the SAS Content Server.
-
Here is the report template
XML definition:
<?xml version="1.0" encoding="UTF-8" ?>
<ReportTemplate
name="report-name"
type="UserDefinedReport"
displayName="display-name"
description="model-description"
>
<Report>
<Data datasetName="input-data-set-name"/>
<Models expectedModelType="model-type"
requiredNumberOfModels="1"
level="level">
</Models>
<SourceCode>
<PreCode filename="pre-code-filename.sas"/>
<Code filename="score-code-filename.sas"/>
</SourceCode>
<Output format="output-format" filename="output-name"/>
</Report>
<Parameters>
<Parameter name="parameter-name" value="parameter-value" />
</Parameters>
</ReportTemplate>
<ReportTemplate>
element arguments
name="report-name"
specifies the name
of the report. The characters @ \ / * % # & $ ( ) ! ? < > ^ +
~ ` = { } [ ] | ; : ‘ " cannot be used in the name.
displayName="display-name"
specifies the name
of the report that is displayed in the Report section
of the New Report window.
description="model-description"
specifies a description
of the report that is displayed at the bottom of the New
Report window when the report is selected in the window.
<Report> element
arguments
<Data datasetName="input-data-set-name"/>
specifies the name
of a data source data set that is used for input to the report. The
data set must be in the form libref.filename.
You can use the following global macro variables as a value for input-data-set-name
as long as the value of the macro variable is in the form of libref.filename:
<Models
expectedModelType="model-type"
requiredNumberOfModels="number-of-models"
level="level">
</Models>
specifies information
about the model.
expectedModelType="model-type"
specifies the model
type.
Valid values: ANALYTICAL,
CLASSIFICATION, PREDICTION, SEGMENTATION, ANY
requiredNumberOfModels="number-of-models"
specifies the number
of models that are processed in this report.
level="folder"
specifies where the
report is to obtain a list of models. If folder is VERSION, the report
creates a list of models in the version. If folder is PROJECT, the
report creates a list of models from all versions in the project.
Valid values: VERSION,
PROJECT
<SourceCode>
<PreCode filename="pre-code-filename.sas"/>
<Code filename="report-code-filename.sas"/>
</SourceCode>
specifies the files
that are used to execute the report.
<PreCode filename="pre-code-filename.sas"/>
specifies the name
of the SAS program that contains macro variable definitions.
<Code filename="report-code-filename.sas"/>
specifies the name
of the SAS program that creates the report.
<Output format="output-format"
filename="output-report-name"/>
specifies the output
format arguments:
format="output-format"
specified the format
of the report output.
Valid values: HTML,
PDF, RTF, or Excel
filename="output-report-name"
specifies the name
of the output report.
<Parameters> Element
Argument
<Parameter name="parameter-name"
value="parameter-value"
/>
This element is not
used. It is reserved for future use.