BookmarkSubscribeRSS Feed
BigPete
Obsidian | Level 7

So I'm trying to figure out how to sandwich a paragraph between breaklines via ODS RTF. I tried to test out ^{line} after referring to http://analytics.ncsu.edu/sesug/2009/RV013.Gebhart.pdf, but found out that only works for ODS HTML. Know any ODF RTF/PDF version of ^{line}?

7 REPLIES 7
ballardw
Super User

Are you attempting to do this in a Title statement or somewhere else? Approaches may vary depending on where you are trying this.

 

Here's one way in a Title line

ods escapechar="^";


ods rtf file="C:\path\junk.rtf";
Title "Some text ^{newline} and more text";
proc print data=sashelp.class (obs=1);
run;

title;
ods rtf close;
BigPete
Obsidian | Level 7

Through ODS RTF TEXT but it didn't work

 

ods rtf file="test.rtf";

ODS RTF TEXT="^{line} Attempting breaklines here ^{line}";

ods rtf close;

Reeza
Super User

Did you specify the ODS ESCAPECHAR?

 

Post your full code that isn't working.

ballardw
Super User

You should probably provide an example of what your final output is supposed to look like and what procedure(s) you may be running above and below whatever a "breakline" may be.

 

You might want to investigate Proc ODSText as it is much nicer for placing long bits of text than ODS Text and allows creating bulleted lists as well as using a data set to provide the values for part of those lists.

BigPete
Obsidian | Level 7

Never mind. Looks like I figured out a close enough solution. I thought BORDERBOTTOMCOLOR/BORDERBOTTOMWIDTH/BORDERTOPCOLOR/BORDERTOPWIDTH apply only to boxes or tables but found out it can also work for breakline sandwiches on texts.

 

%let outsy=E:\Users\pete\Desktop\qb;

ods noresults escapechar='^';

%let bc=cxD3DFEE;
%let bw=1;
%let breaklinesandwich=borderbottomcolor=&bc borderbottomwidth=&bw.pt bordertopcolor=&bc bordertopwidth=&bw.pt;
%let boxy=borderwidth=&bw.pt bordercolor=&bc;

ods rtf file="&outsy\qb_summary.rtf" startpage=never;

ods rtf text="^{newline}^{style[font_face=Calibri fontsize=11pt &breaklinesandwich]This report provides a 
summary of data collected for the QB passes in football. The task was issued to Pete in XXX game(s).}^{newline}";
ods rtf text="^{newline}";

ods rtf close;
ods _all_ close;
BigPete
Obsidian | Level 7

The break line sandwich commands aren't working for ODS PDF though. Any ideas?

Reeza
Super User

Those are RTF commands so they won't work in PDF.

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
  • 7 replies
  • 9157 views
  • 1 like
  • 3 in conversation