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

Innovate_SAS_Blue.png

Registration is open! SAS is returning to Vegas for an AI and analytics experience like no other! Whether you're an executive, manager, end user or SAS partner, SAS Innovate is designed for everyone on your team. Register for just $495 by 12/31/2023.

If you are interested in speaking, there is still time to submit a session idea. More details are posted on the website. 

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.

Get the $99 certification deal.jpg

 

 

Back in the Classroom!

Select SAS Training centers are offering in-person courses. View upcoming courses for:

View all other training opportunities.

Discussion stats
  • 7 replies
  • 8682 views
  • 1 like
  • 3 in conversation