In this exercise, you
create an ad hoc report to categorically display score ranges in an
HTML report. To create output in HTML from an ad hoc report, ensure
that the report code is enclosed by a SAS Model Manager formatting
macro. To do this, follow these steps:
-
In the
<drive>/Tutorial4/Samples
folder, open the example report ScoreRange.sas and copy the code.
-
If necessary, log on
to SAS Model Manager.
-
In the Project Tree,
expand the
Tutorial2 folder, the
Delinquency project, and the
2011 version.
-
Right-click the
Reports folder and select
ReportsCreate Ad Hoc Report.
-
In the
Create Ad Hoc Report window, select
Model 1 in the
Select Models table.
-
In the
SAS
Editor, paste the code that you copied in Step 1.
-
Modify the Score Range
code to format the report in HTML.
The ScoreRange.sas program
uses the SAS Model Manager formatting macros, which enable user reports
to be formatted in PDF, HTML, RTF, and Excel. A beginning formatting
macro code precedes the report code. The ending formatting macro must
be the last line of code in the report program.
-
Add the argument
reportFormat=html
to the %MM_ExportReportsBegin
macro argument list. Here is the modified macro:
%MM_ExportReportsBegin(reportFormat=html, fileName=ScoreRange);
-
Add the argument
reportFormat=html
to the %MM_ExportReportsEnd
macro argument list. Here is the modified macro:
%MM_ExportReportsEnd(reportFormat=html);
-
In the
Name field of the
Report Properties table, enter
ScoreRange
.
-
Click
OK. SAS Model Manager runs the report and creates the
ScoreRange folder under the
Reports folder.
-
To view the
ScoreRange report, expand the
ScoreRange folder, right-click
ScoreRange.html, and
select
Open.
Here is the output from
the FREQ procedure as a table and as a graph:
The Score Range Report Table
The Score Range Report Graph