BookmarkSubscribeRSS Feed
🔒 This topic is solved and locked. Need further help from the community? Please sign in and ask a new question.
Tobias_N
Calcite | Level 5

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

1 ACCEPTED SOLUTION

Accepted Solutions
Ksharp
Super User

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

2 REPLIES 2
Ksharp
Super User

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

Tobias_N
Calcite | Level 5

Thanks! This is a very easy fix.

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
  • 2 replies
  • 1256 views
  • 0 likes
  • 2 in conversation