Overview of User Reports

Ad Hoc Reports and User-Defined Reports

User reports are SAS programs that you create and import to SAS Model Manager so that you can customize reports to meet your business requirements. The ad hoc report enables you to develop, test, and run your report within SAS Model Manager. The user-defined report can be developed either within or external to SAS Model Manager. It requires a SAS program and the associated auxiliary files to be installed in a directory that is available to SAS Model Manager and is run using the New Report window.
Using ad hoc reports, you modify and submit your code from the SAS Editor within the Create Ad Hoc Reports window. Ad hoc reports are defined and can be run only under the version where it was created.
A user-defined report is a report that is available for reporting on all models in SAS Model Manager. The user-defined report requires three files to be installed in your server's file structure:
  • a SAS program to create the report
  • a report template XML file that specifies the report requirements, such as report name and the number of required models to run the report
  • a SAS program file that lists the SAS Model Manager global macro variables and macros that are used in your report
After you have these three files, you use the SAS Model Manager Template Editor to upload the files to the SAS Content Server.
The ad hoc report can be used to develop, test, and debug user-defined reports. When your ad hoc report is ready for a production environment, you can create the report template XML file and the macro file, and install the three files in the user-defined report file structure.

Comparison of Ad Hoc and User-Defined Reports

Report Difference
Ad Hoc Report
User-Defined Report
Version
An ad hoc report is defined and can be run only under the version where it was created.
A user-defined report can be run under any project version.
Report template
An ad hoc report does not require a template.
A user-defined report requires a template to define the report parameters.
Report results
Each time an ad hoc report is run, the existing report files are overwritten.
Each time a user-defined report is run, a new report folder is created under the Reports node.
Location of SAS files used to generate the report
The ad hoc report SAS program is stored in the report folder for the version where it was created.
The user-defined report SAS files are uploaded to the SAS Content Server.

Output Created by User Reports

The first time you create a report, SAS Model Manager creates a node for the report under the Reports node.
Each time you run create a new ad hoc report, SAS Model Manager creates these files:
  • the report in either HTML, PDF, RTF, or Excel format
  • smm_userCode.sas
  • taskCode.log
  • taskCode.sas
Each time you run create a new user-defined report, SAS Model Manager creates these files:
  • the report in either HTML, PDF, RTF, or Excel format
  • taskCode.log
  • taskCode.sas
CAUTION:
The wizard overwrites the output files if an output file of the same name already exists.
Here is a description of the ad hoc report output files:
Report File
Description
report-name.html
This file is the report output in HTML format.
report-name.pdf
This file is the report output in PDF format.
report-name.rtf
This file is the report output in RTF format.
report-name.xls
This file is the report output in Excel format.
smm_userCode.sas
This file contains the SAS program report code that was submitted in the Create Ad Hoc window.
taskCode.log
This file is the log file that contains messages from running the SAS code to create the report.
taskCode.sas
This file is the SAS code that is used to create the report. The file contains the user-defined report code as well as code that was generated by SAS Model Manager to create the report.
You can see the contents of these files by selecting them in the Project Tree. You can also see the taskCode.sas file and the taskCode.log files by selecting the report name. SAS Model Manager displays tabs for these files to the right of the Properties tab.