Data visualization with SAS programming

Inserting breaklines via ODS RTF/PDF

Reply
Contributor
Posts: 26

Inserting breaklines via ODS RTF/PDF

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}?

Super User
Posts: 10,500

Re: Inserting breaklines via ODS RTF/PDF

[ Edited ]

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;
Contributor
Posts: 26

Re: Inserting breaklines via ODS RTF/PDF

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;

Super User
Posts: 17,819

Re: Inserting breaklines via ODS RTF/PDF

Did you specify the ODS ESCAPECHAR?

 

Post your full code that isn't working.

Super User
Posts: 10,500

Re: Inserting breaklines via ODS RTF/PDF

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.

Contributor
Posts: 26

Re: Inserting breaklines via ODS RTF/PDF

[ Edited ]

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;
Contributor
Posts: 26

Re: Inserting breaklines via ODS RTF/PDF

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

Super User
Posts: 17,819

Re: Inserting breaklines via ODS RTF/PDF

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

Ask a Question
Discussion stats
  • 7 replies
  • 246 views
  • 1 like
  • 3 in conversation