31
One of the last style changes we will show is a new (with SAS 9.2) style attribute that can be used for text decoration
to underline, overline, or strike through text. For example, when people use the JOURNAL style, they frequently want
to underline the column header values. In the past, this was something that you could do only with RTF or HTML
using destination-specific syntax. However, starting with SAS 9.2, using the TEXTDECORATION style attribute, this
feature became available for PDF, as well as the other destinations. Consider the following code that produced
Display ~27x~. Not only does it underline the column headers, but it also uses the LINK= option of the SAS TITLE
statement to insert a hyperlink into the REPORT and ODS ESCAPECHAR with the PREIMAGE attribute to insert a
logo into the report.
ods escapechar='^';
proc report data=sashelp.cars(obs=20) nowd
style(report)={width=50%}
style(header)={fontweight=bold fontsize=14pt textdecoration=underline};
where substr(make,1,1) in ('A','B','C');
title j=l '^{style[preimage="c:\sgf2014\create_superhero.png"] }'
j=r 'My Report';
title2 link="http://marvel.com/games/play/31/create_your_own_superhero"
'Create Your Own SuperHero}';
column make model msrp mpg_city;
run;
Display 27. Using ODS ESCAPECHAR and Other Style Changes
What you will notice is that the hyperlink for the Marvel.com site is highlighted differently in PDF (with a blue box)
versus HTML, but both links, when clicked, will take you to a website where you can create your own superhero. For
this paper, Cynthia was HTMLWoman and Scott was PDF Guy.
The final word on controlling your output is that it will all come down to style in the end. Whether you use style
templates, style overrides or ODS ESCAPECHAR, it will be worth your time to invest in a study of ODS styles. Last,
but certainly not least, we are going to focus on our two destinations and how they work with non-tabular output.
NON TABULAR OUTPUT
There are other types of output other than tables in your output. We have mentioned Titles and Footnotes. But there
are other types of non-tabular output like images, SAS/GRAPH, and ODS GRAPHICS we have to think about when
designing our output. Each destination handles these differently. We will discuss images first. Three very common
23