The SAS Output Delivery System and reporting techniques

formatting one word within text with proc report

Accepted Solution Solved
Reply
Occasional Contributor
Posts: 5
Accepted Solution

formatting one word within text with proc report

Hi,

I want to display text in region containers in a pdf-document. It workes fine with ods text = "..."; but since I wanted to have bullet point lists I switched to proc report. Now I face some new problems:

data text;

text =
"exercitation ullamco laboris ^{style [font_weight=bold]nisi ut aliquid ex ea commodi} consequat. Quis aute " ||

"^{newline}^{newline}" ||

"This works: ^{thispage} von ^{lastpage}";

...

proc report

data = text nowindows noheader;

columns text;

define text / display style=[width=22cm];

1. The data (text) is provided through an ms excel file. I import this file to a data set. Next I write the text with proc report to the odf file. Is this the best way?

2. I can not use inline formatting in proc report with the ods escape character. Part of the text to display:

"exercitation ullamco laboris ^{style [font_weight=bold]nisi ut aliquid ex ea commodi} consequat. Quis aute "

Is there a way to format single words within the text in proc report? In case not (or no practical way): What is a decent alternative?

Id be really happy to get any help because searching the internet did not help me :-(

Cheers, Tobi


Accepted Solutions
Solution
‎03-12-2015 08:54 AM
Super User
Posts: 9,878

Re: formatting one word within text with proc report

How about this:

data text;

text ="exercitation ullamco laboris ~S={font_weight=bold}nisi ~S={}ut aliquid ex ea commodi";

run;

ods escapechar='~';

ods pdf file='x.pdf' style=sasweb;

proc report

data = text nowindows noheader;

columns text;

define text / display style=[width=22cm];

run;

ods pdf close;

Xia Keshan

View solution in original post


All Replies
Solution
‎03-12-2015 08:54 AM
Super User
Posts: 9,878

Re: formatting one word within text with proc report

How about this:

data text;

text ="exercitation ullamco laboris ~S={font_weight=bold}nisi ~S={}ut aliquid ex ea commodi";

run;

ods escapechar='~';

ods pdf file='x.pdf' style=sasweb;

proc report

data = text nowindows noheader;

columns text;

define text / display style=[width=22cm];

run;

ods pdf close;

Xia Keshan

Occasional Contributor
Posts: 5

Re: formatting one word within text with proc report

Thanks! This is a very easy fix.

🔒 This topic is solved and locked.

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

Discussion stats
  • 2 replies
  • 448 views
  • 0 likes
  • 2 in conversation