<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: Create RTF output without dataset in  Proc Report using SAS. in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/Create-RTF-output-without-dataset-in-Proc-Report-using-SAS/m-p/839103#M331769</link>
    <description>&lt;P&gt;I strongly agree with &lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/13879"&gt;@Reeza&lt;/a&gt; that Proc Odstext is likely to be much more manageable than Proc Report. For one thing Report will require a data set. If you don't provide one it will attempt to use the last created data set in some way.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;See if this gets you started. Of course replace the filename with with what you want and appropriate to your operating system.&lt;/P&gt;
&lt;PRE&gt;%let macrovar= some text placed into a macro variable;


ods rtf file="c:\folder\subfolder\example.rtf"
/*any other rtf options*/
;

proc odstext;
p "This is some boilerplate text that doesn't change";
p;
p "Here is &amp;amp;macrovar. as an example.";
run;

ods rtf close;&lt;/PRE&gt;
&lt;P&gt;The p statements are paragraphs. I include one blank line as a separator between two lines of text. If your code for the P statement runs long enough you want to make sure there is a space either at the start of the following line or end of the previous or else you will run words together.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Mon, 17 Oct 2022 22:49:17 GMT</pubDate>
    <dc:creator>ballardw</dc:creator>
    <dc:date>2022-10-17T22:49:17Z</dc:date>
    <item>
      <title>Create RTF output without dataset in  Proc Report using SAS.</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Create-RTF-output-without-dataset-in-Proc-Report-using-SAS/m-p/839094#M331763</link>
      <description>&lt;P&gt;I recently came across a request where I need to write a letter using the SAS. This letter involves some macro variable involved that comes through sas program. I technically don't have any data to run in ' proc report'.&amp;nbsp; I know I may have to use the 'Compute block' to write the whole letter. But I never done this before.&amp;nbsp; Image is the example how they want to see the output with random any kind of scratch notes. I also have question how to control the margins! Thank you&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="SASuserlot_0-1666044472507.png" style="width: 400px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/76261iA36390464BAAEEFA/image-size/medium?v=v2&amp;amp;px=400" role="button" title="SASuserlot_0-1666044472507.png" alt="SASuserlot_0-1666044472507.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 17 Oct 2022 22:10:00 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Create-RTF-output-without-dataset-in-Proc-Report-using-SAS/m-p/839094#M331763</guid>
      <dc:creator>SASuserlot</dc:creator>
      <dc:date>2022-10-17T22:10:00Z</dc:date>
    </item>
    <item>
      <title>Re: Create RTF output without dataset in  Proc Report using SAS.</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Create-RTF-output-without-dataset-in-Proc-Report-using-SAS/m-p/839099#M331766</link>
      <description>I think PROC ODSTEXT is a better option here than PROC REPORT?</description>
      <pubDate>Mon, 17 Oct 2022 22:20:24 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Create-RTF-output-without-dataset-in-Proc-Report-using-SAS/m-p/839099#M331766</guid>
      <dc:creator>Reeza</dc:creator>
      <dc:date>2022-10-17T22:20:24Z</dc:date>
    </item>
    <item>
      <title>Re: Create RTF output without dataset in  Proc Report using SAS.</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Create-RTF-output-without-dataset-in-Proc-Report-using-SAS/m-p/839103#M331769</link>
      <description>&lt;P&gt;I strongly agree with &lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/13879"&gt;@Reeza&lt;/a&gt; that Proc Odstext is likely to be much more manageable than Proc Report. For one thing Report will require a data set. If you don't provide one it will attempt to use the last created data set in some way.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;See if this gets you started. Of course replace the filename with with what you want and appropriate to your operating system.&lt;/P&gt;
&lt;PRE&gt;%let macrovar= some text placed into a macro variable;


ods rtf file="c:\folder\subfolder\example.rtf"
/*any other rtf options*/
;

proc odstext;
p "This is some boilerplate text that doesn't change";
p;
p "Here is &amp;amp;macrovar. as an example.";
run;

ods rtf close;&lt;/PRE&gt;
&lt;P&gt;The p statements are paragraphs. I include one blank line as a separator between two lines of text. If your code for the P statement runs long enough you want to make sure there is a space either at the start of the following line or end of the previous or else you will run words together.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 17 Oct 2022 22:49:17 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Create-RTF-output-without-dataset-in-Proc-Report-using-SAS/m-p/839103#M331769</guid>
      <dc:creator>ballardw</dc:creator>
      <dc:date>2022-10-17T22:49:17Z</dc:date>
    </item>
    <item>
      <title>Re: Create RTF output without dataset in  Proc Report using SAS.</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Create-RTF-output-without-dataset-in-Proc-Report-using-SAS/m-p/839179#M331816</link>
      <description>&lt;P&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/13549"&gt;@Cynthia_sas&lt;/a&gt;&amp;nbsp; have more experience about this topic .&lt;/P&gt;</description>
      <pubDate>Tue, 18 Oct 2022 12:14:51 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Create-RTF-output-without-dataset-in-Proc-Report-using-SAS/m-p/839179#M331816</guid>
      <dc:creator>Ksharp</dc:creator>
      <dc:date>2022-10-18T12:14:51Z</dc:date>
    </item>
    <item>
      <title>Re: Create RTF output without dataset in  Proc Report using SAS.</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Create-RTF-output-without-dataset-in-Proc-Report-using-SAS/m-p/839199#M331823</link>
      <description>&lt;P&gt;Thank you&amp;nbsp;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/13884"&gt;@ballardw&lt;/a&gt;&amp;nbsp;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/13879"&gt;@Reeza&lt;/a&gt;&amp;nbsp; and &lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/18408"&gt;@Ksharp&lt;/a&gt;&amp;nbsp;. Because of you guys I learned a&amp;nbsp; new procedure which I never used it before. I tried using the PROC ODSTEXT and I will say I achieved 80% of my requirement . There are some minor problems I am stuck at. When&amp;nbsp; you get a chance please advice on this. I am attaching two images 1.&amp;nbsp; &lt;FONT color="#FF00FF"&gt;How my results are showing up&lt;/FONT&gt;.&amp;nbsp; and 2.&lt;FONT color="#00FF00"&gt;&amp;nbsp; &lt;FONT color="#0000FF"&gt;How I am expecting. &lt;FONT color="#000000"&gt;Thank you.&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/13549"&gt;@Cynthia_sas&lt;/a&gt;&amp;nbsp; Can you please share your advice on this. Thank you&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="SASuserlot_1-1666102680146.png" style="width: 400px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/76275i82BD9D18E289AE4A/image-size/medium?v=v2&amp;amp;px=400" role="button" title="SASuserlot_1-1666102680146.png" alt="SASuserlot_1-1666102680146.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="SASuserlot_0-1666102646595.png" style="width: 400px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/76274iEAECFEF442AFE8E0/image-size/medium?v=v2&amp;amp;px=400" role="button" title="SASuserlot_0-1666102646595.png" alt="SASuserlot_0-1666102646595.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;
ods path(prepend) work.templat(update);
   proc template;
     define style styles.chk;
       parent=styles.rtf;
/*		replace fonts /*/
/*		'TitleFont' = ("Times Roman",12pt,Bold );*/
/*		'docFont' = ("Times Roman ",12pt,Bold); */
       style body from document /
             leftmargin=1in
             rightmargin=1in
             topmargin=1in
             bottommargin=1in;
       end;
   run;

%let styl= %str(/style={fontsize=12pt});
%put &amp;amp;styl.;

ods listing close;
title '';
options nodate nonumber;
ods rtf file="c:\folder\\example.rtf" style=styles.chk
		 ;
/*any other rtf options*/
title1 j=c  bold  "SAS Support Community";
proc odstext;

P "This community of SAS experts is here to help you succeed. Get SAS tips, share your knowledge, and find out about upcoming SAS-related events."/ style={fontsize=12pt};
P '';
p "Recent Solutions"/  style={fontsize=12pt liststyletype="none" fontweight=bold};

list / style={liststyletype="decimal" fontsize=12pt};
	item "How to show up with diff. Color in Title/SGPLOT"&amp;amp;styl.;
	item "ODS and Base Reporting"&amp;amp;styl.;
	item "Remove Duplicate Words in a String"&amp;amp;styl.;
	item "Watch this Ask the Expert session to learn where the SAS DATA step has a distinct advantage over SQL and where you just can’t beat SQL. "&amp;amp;styl.;
	
end;
P '';
p "Future Solutions"/  style={fontsize=12pt liststyletype="none" fontweight=bold};

list / style={liststyletype="decimal" fontsize=12pt};
	item "How to display by variable from proc report into ods excel file but o…"&amp;amp;styl.;
	item "How to left align _INFILE_ in an email";
	item "https://communities.sas.com/";

end;


run;
ods rtf close;

	&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 18 Oct 2022 14:21:27 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Create-RTF-output-without-dataset-in-Proc-Report-using-SAS/m-p/839199#M331823</guid>
      <dc:creator>SASuserlot</dc:creator>
      <dc:date>2022-10-18T14:21:27Z</dc:date>
    </item>
    <item>
      <title>Re: Create RTF output without dataset in  Proc Report using SAS.</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Create-RTF-output-without-dataset-in-Proc-Report-using-SAS/m-p/839343#M331886</link>
      <description>&lt;P&gt;Here could give you a start.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;data have;
infile cards truncover;
input have $200.;
cards;
This community of SAS experts is here to help you succeed. Get SAS tips, share your knowledge, and find out about upcoming SAS-related events.
.
Recent Solutions
1.How to show up with diff. Color in Title/SGPLOT
(*ESC*){unicode '25CF'x}ODS and Base Reporting
2.Remove Duplicate Words in a String
3.Watch this Ask the Expert session to learn where the SAS DATA step has a distinct advantage over SQL and where you just can’t beat SQL.
.
Future Solutions
1. How to display by variable from proc report into ods excel file but o…
2. How to left align _INFILE_ in an email
3.(*ESC*){style [color=blue url="https://communities.sas.com/"] https://communities.sas.com/}
;

ods rtf file='c:\temp\temp.rtf';
options nodate nonumber;
title1 "(*ESC*)S={fontstyle=roman}SAS Support Community";
proc report data=have nowd noheader
style={rules=none frame=void outputwidth=80% cellspacing=0 cellpadding=0} 
style(column)={fontsize=4 cellspacing=0 cellpadding=0 asis=on} ;
compute have;
n+1;
if n=2 then call define(_col_,'style','style={cellheight=60}');
if n=3 then call define(_col_,'style','style={fontweight=bold}');
if n in (4,6,7) then call define(_col_,'style','style={pretext="   "}');
if n=5 then call define(_col_,'style','style={pretext="      "}');

if n=8 then call define(_col_,'style','style={cellheight=60}');
if n=9 then call define(_col_,'style','style={fontweight=bold}');
if n in (10,11,12) then call define(_col_,'style','style={pretext="   "}');
*if n=12 then call define(_col_,'url','https://communities.sas.com/');
endcomp;
run;
ods rtf close;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Ksharp_0-1666179269135.png" style="width: 400px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/76298i26C203D44BA67AC7/image-size/medium?v=v2&amp;amp;px=400" role="button" title="Ksharp_0-1666179269135.png" alt="Ksharp_0-1666179269135.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 19 Oct 2022 11:34:06 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Create-RTF-output-without-dataset-in-Proc-Report-using-SAS/m-p/839343#M331886</guid>
      <dc:creator>Ksharp</dc:creator>
      <dc:date>2022-10-19T11:34:06Z</dc:date>
    </item>
    <item>
      <title>Re: Create RTF output without dataset in  Proc Report using SAS.</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Create-RTF-output-without-dataset-in-Proc-Report-using-SAS/m-p/839394#M331906</link>
      <description>&lt;P&gt;Thank you&amp;nbsp;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/18408"&gt;@Ksharp&lt;/a&gt;&amp;nbsp; for taking your time to do this. I really appreciate. I definitely learn few newthings.&lt;span class="lia-unicode-emoji" title=":smiling_face_with_heart_eyes:"&gt;😍&lt;/span&gt;&lt;span class="lia-unicode-emoji" title=":smiling_face_with_heart_eyes:"&gt;😍&lt;/span&gt;&lt;/P&gt;</description>
      <pubDate>Wed, 19 Oct 2022 14:51:09 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Create-RTF-output-without-dataset-in-Proc-Report-using-SAS/m-p/839394#M331906</guid>
      <dc:creator>SASuserlot</dc:creator>
      <dc:date>2022-10-19T14:51:09Z</dc:date>
    </item>
  </channel>
</rss>

