The SAS Output Delivery System and reporting techniques

underline and title statement

Reply
Occasional Contributor
Posts: 17

underline and title statement

Hi there,

I currently have the following code:

TITLE5 italic j=left underlin=1 colour=black height=9pt "Definition: &def" j=center "Most Recent Observation: &recent"
j=right "Date/Time: &sysdate / &systime";

What I would like to do is have the word "Definition" either underlined or bolded and then the actual definition (&def) not underlined or bolded. Is there a way to do this?

Thanks,
Christy
SAS Super FREQ
Posts: 8,864

Re: underline and title statement

Hi:
The font_weight of the title is automatically bold, so what you have to do is turn off the bolding (via a style override) for the words you DON'T want bolded. This is using ODS ESCAPECHAR to provide a style override for the piece of the string where you want to turn bolding off.

http://www2.sas.com/proceedings/forum2007/099-2007.pdf (paper about ODS ESCAPECHAR in SAS 9.1 with a preview of ESCAPECHAR in 9.2)
http://www.nesug.org/proceedings/nesug08/np/np10.pdf (more about Escapechar in 9.2)

cynthia

[pre]

%let def = xxxxxxxx;
%let recent = 99999;

ods html file='c:\temp\testunder.html' style=sasweb;

ods escapechar='^';
proc print data=sashelp.class;
TITLE5 italic j=left colour=black height=9pt "Definition: ^S={font_weight=medium} &def"
j=center " Most Recent Observation: ^S={font_weight=medium}&recent"
j=right "Date/Time: ^S={font_weight=medium}&sysdate / &systime";
run;
ods _all_ close;
[/pre]
Occasional Contributor
Posts: 17

Re: underline and title statement

Posted in reply to Cynthia_sas
Thanks Cynthia! This is exactly what I was trying to do.

Cheers,
Christy
Ask a Question
Discussion stats
  • 2 replies
  • 226 views
  • 0 likes
  • 2 in conversation