The SAS Output Delivery System and reporting techniques

specify different styles for different text elements in line statement in proc report

Accepted Solution Solved
Reply
Occasional Contributor
Posts: 8
Accepted Solution

specify different styles for different text elements in line statement in proc report

Hello fabulous SAS experts,

I have a 11 line footer, which is a problem because I cannot use footnote statement. So I tried to use the compute block and line statement in proc report procedure as follows:

computer after _page_;

line "Learning Outcomes: are the knowledge, skills, and values we expect students to achieve upon graduation.";

endcomp;

What should I do if I want to bold "Learning Outcomes" and italicize "knowledge", "skills", and "values" in the output?

Any help would be much appreciated!

Yao

c


Accepted Solutions
Solution
‎05-26-2014 10:42 PM
Occasional Contributor
Posts: 8

Re: specify different styles for different text elements in line statement in proc report

Posted in reply to Cynthia_sas

Okay, I got it after some struggle.

ods escapechar='~';

proc report ...;

compute after _page_;

line@1 "~{style [font_weight=bold] SLO:} ~{style [fontstyle=italic] SLO} stands for student learning outcomes.";

endcomp;

This produces a line with both bold and italics as in:

SLO: SLO stands for student learning outcomes.

Thanks everyone for helping.

Yao

View solution in original post


All Replies
Respected Advisor
Posts: 3,799

Re: specify different styles for different text elements in line statement in proc report

Posted in reply to Carrotbing
SAS Super FREQ
Posts: 8,868

Re: specify different styles for different text elements in line statement in proc report

Posted in reply to Carrotbing

Hi:

  You can bold the whole line using a simple STYLE= override, but to only italicize certain words within a text string, you will need to use ODS ESCAPECHAR and in-line formatting. There have been many previous postings on the topic in the forum. I'm sure you can find them if you search.

cynthia

Solution
‎05-26-2014 10:42 PM
Occasional Contributor
Posts: 8

Re: specify different styles for different text elements in line statement in proc report

Posted in reply to Cynthia_sas

Okay, I got it after some struggle.

ods escapechar='~';

proc report ...;

compute after _page_;

line@1 "~{style [font_weight=bold] SLO:} ~{style [fontstyle=italic] SLO} stands for student learning outcomes.";

endcomp;

This produces a line with both bold and italics as in:

SLO: SLO stands for student learning outcomes.

Thanks everyone for helping.

Yao

🔒 This topic is solved and locked.

Need further help from the community? Please ask a new question.

Discussion stats
  • 3 replies
  • 369 views
  • 3 likes
  • 3 in conversation