The PRINT Procedure |
Procedure features: |
| ||||||||||||
Other features: |
| ||||||||||||
Data set: | EXPREV |
This example
customizes and underlines the text in column headings for variables
customizes the column heading for the column that identifies observations by number
shows the number of observations in the report
writes the values of the variable Price with dollar signs and periods.
creates a default PDF report
creates a stylized PDF report.
Program: Creating a Listing Report |
options nodate pageno=1 linesize=80 pagesize=30 obs=10; |
proc print data=exprev split='*' n obs='Observation*Number*==========='; |
var country sale_type price; |
label country='Country Name**============' sale_type='Order Type**==========' price='Price Per Unit*in USD*=============='; |
format price dollar10.2; title 'Order Type and Price Per Unit in Each Country'; run; |
Output: Listing |
Customizing Text in Column Headings: Listing Output
Order Type and Price Per Unit in Each Country 1 Observation Country Name Order Type Price Per Unit Number in USD =========== ============ ========== ============== 1 Antarctica Internet $92.60 2 Puerto Rico Catalog $51.20 3 Virgin Islands (U.S.) In Store $31.10 4 Aruba Catalog $123.70 5 Bahamas Catalog $113.40 6 Bermuda Catalog $41.00 7 Belize In Store $146.40 8 British Virgin Islands Catalog $40.20 9 Canada Catalog $11.80 10 Cayman Islands In Store $71.00 N = 10
Program: Creating a PDF Report |
You can easily create PDF output by adding a few ODS statements. In the following example, ODS statements were added to produce PDF output.
options nodate pageno=1 linesize=80 pagesize=40 obs=10;
ods pdf file='your_file.pdf'; |
proc print data=exprev split='*' n obs='Observation*Number*==========='; var country sale_type price; label country='Country Name**============' sale_type='Order Type**==========' price='Price Per Unit in USD**==============';
format price dollar10.2; title 'Order Type and Price Per Unit in Each Country'; run;
ods pdf close; |
Output: PDF |
Customizing Text in Column Headings: Default PDF Output
Program: Creating a PDF Report with the STYLE Option |
options nodate pageno=1 linesize=80 pagesize=40 obs=10;
ods pdf file='your_file.pdf';
proc print data=exprev split='*' n obs='Observation*Number*===========' style(n) = {fontstyle=italic backgrouncolor= blue} style(header obs obsheader) = {backgrouncolor=yellow color=blue}; |
title 'Order Type and Price Per Unit in Each Country'; run;
ods pdf close; |
Output: PDF Report with Styles |
Customizing Text in Column Headings: PDF Output Using Styles
Copyright © 2010 by SAS Institute Inc., Cary, NC, USA. All rights reserved.