BookmarkSubscribeRSS Feed
gzr2mz39
Quartz | Level 8
I'm using proc print to print out the information created in reports2.
How do I change the font-size for the labels of title1 and title2?
Thank you.

data reports2;
length title1 $64 title2 $64 url1 $200 url2 $200;
label title1="Updated &date1., 2011" title2="Updated June 17, 2011";
input bu $18. / title1 $64. / url1 $200. / title2 $64. / url2 $200. ;
cards;
*****
run;
1 REPLY 1
Cynthia_sas
SAS Super FREQ
Hi:
TITLE1 and TITLE2 appear to be variables, as are BU, URL1 and URL2. When you use PROC PRINT, either the variable names or labels are used, depending on procedure options. With PROC PRINT, you must use either the LABEL or the SPLIT= option in order to have your variable labels used.

Then, in order to alter the default font size of the PROC PRINT output, you must:
1) route your output to a destination that supports style changes (such as HTML, RTF or PDF)
2) use the appropriate STYLE(HEADER)= override in your PROC PRINT code
3a) decide whether you want all the headers the same size or
3b) decide whether you want different headers different sizes.

The program below illustrates the 3b approach. If you wanted ALL the headers to be the same size, then your PROC PRINT code would NOT have style overrides on the VAR statements, but would, instead, have style overrides on the PROC PRINT statement itself:
[pre]
proc print data=sashelp.class label noobs
style(header)={font_size=18pt};
[/pre]

cynthia
[pre]
ods html file='c:\temp\large_labels.html' style=sasweb;

proc print data=sashelp.class(obs=3) split='*' noobs;
var name / style(header)={font_size=18pt vjust=b} ;
var age / style(header)={font_size=10pt vjust=b};
var height weight / style(header)={font_size=24pt vjust=b};
label name = 'Student Name'
age = "Updated on*June 19, 2011";
run;
ods html close;
[/pre]

sas-innovate-2024.png

Don't miss out on SAS Innovate - Register now for the FREE Livestream!

Can't make it to Vegas? No problem! Watch our general sessions LIVE or on-demand starting April 17th. Hear from SAS execs, best-selling author Adam Grant, Hot Ones host Sean Evans, top tech journalist Kara Swisher, AI expert Cassie Kozyrkov, and the mind-blowing dance crew iLuminate! Plus, get access to over 20 breakout sessions.

 

Register now!

How to Concatenate Values

Learn how use the CAT functions in SAS to join values from multiple variables into a single value.

Find more tutorials on the SAS Users YouTube channel.

Click image to register for webinarClick image to register for webinar

Classroom Training Available!

Select SAS Training centers are offering in-person courses. View upcoming courses for:

View all other training opportunities.

Discussion stats
  • 1 reply
  • 1053 views
  • 0 likes
  • 2 in conversation