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}?
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;
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;
Did you specify the ODS ESCAPECHAR?
Post your full code that isn't working.
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.
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;
The break line sandwich commands aren't working for ODS PDF though. Any ideas?
Those are RTF commands so they won't work in PDF.
SAS Innovate 2025 is scheduled for May 6-9 in Orlando, FL. Sign up to be first to learn about the agenda and registration!
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.
Ready to level-up your skills? Choose your own adventure.