Controlling formatting of ODS PRINTER (PDF/RTF) outputs has always seemed like a bit of a black art to me, but there are usually ways of getting around potential issues if you know where to look. With SAS V9.2, there are some new and probably unknown features, including the use of ‘inline styles’.
(more…)
Category Archives: Programming
Some SCL functions are available to Base SAS but you cannot use the SCL functions OPTGETN and OPTGETC to find out what the current status of certain SAS Options are.
In this case you can use the OPTSAVE and OPTLOAD Base SAS procedures.
How to use PROTECTSPECIALCHARS to allow HTML tags in your data when using HTML ODS in SAS.
When sending output to the HTML destination using PROC REPORT a number of the usual attributes are not available. For example the FLOW attribute on the DEFINE statement. It can therefore be necessary to include HTML tags within the data to be interpreted when the HTML page is viewed in a browser.
Sometimes you need to pass parameters via a button in Excel but the standard OnAction property syntax does not allow this. If you try .OnAction=”myProc(99,’Some text’)” you will receive an error. But there is a way to get around this.
Using ANNOTATE to add text to a plot in SAS/GRAPH
An example which creates an annotate dataset with a text label to be displayed in a plot, using GPLOT in SAS/GRAPH
* Adds text TEXT HERE at data point 23 on x-axis, 100% *;
* position on y-axis *;
data annot;
length function $8;
x=23;
function='LABEL'; text='TEXT HERE'; color='LIGR';
position='2'; xsys='2'; ysys='1'; y=100; size=1.5;
output;
run;
proc gplot....
plot ... / annotate=annot;
run;
quit;