<?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 RTF SGRENDER title location in Graphics Programming</title>
    <link>https://communities.sas.com/t5/Graphics-Programming/RTF-SGRENDER-title-location/m-p/77508#M2857</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I'm using SGRENDER to output a box plot to RTF, and consumers want easy cut-paste to PowerPoint.&amp;nbsp;&amp;nbsp; (Don't have 9.4 yet, so can't try ODS to powerpoint).&amp;nbsp; I'm using&amp;nbsp; imagefmt=EMF.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have TITLE statements for my titles.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Titles are going to the header of the RTF document, so cut-paste is a hassle for users.&amp;nbsp; I thought "no problem, I'll just set GTITLE on the ODS statement".&amp;nbsp; But while that would do what I want for SGPLOT, it doesn't effect SGRENDER.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Looks like if I want the titles in the image with SGRENDER, I need to switch from using title statements to using ENTRYTITLE in the GTL, is that right?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;My other thought to (save all of my title statements), was to turn on BODYTITLE.&amp;nbsp; So the title would not be part of the image, but since it's in the body of the rtf, it's easier to cut-paste.&amp;nbsp; But at least with Office 2003, while the RTF document looks good in word (titles centered above the image), when I paste it into powerpoint the title text goes into a text box separate from the image, and is left aligned.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;So my questions:&lt;/P&gt;&lt;P&gt;1.&amp;nbsp; Using SGRENDER, is there a way to get titles defined on a TITLE statement to be printed in the image?&lt;/P&gt;&lt;P&gt;2.&amp;nbsp; If not, any other suggestions for managing title text when generating RTF that will eventually end up in PowerPoint?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;--Q.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;proc template;
&amp;nbsp; define statgraph MyBoxPlot;
&amp;nbsp;&amp;nbsp;&amp;nbsp; begingraph;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; layout overlay ;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; boxplot x=Region y=Sales ; 
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; endlayout;
&amp;nbsp;&amp;nbsp;&amp;nbsp; endgraph;
&amp;nbsp; end;
run;

ods graphics/reset=all;
ods _all_ close;
ods rtf file="d:\junk\me.rtf" gtitle ;

title1 "This is a title";
title2 "I am a subtitle";

proc sgrender data=sashelp.shoes template="MyBoxPlot" ;
run;

proc sgplot data=sashelp.shoes;
&amp;nbsp; vbox sales/group=region;
run;

title1;
ods _all_ close;
ods listing;
&lt;/PRE&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Tue, 10 Sep 2013 14:45:44 GMT</pubDate>
    <dc:creator>Quentin</dc:creator>
    <dc:date>2013-09-10T14:45:44Z</dc:date>
    <item>
      <title>RTF SGRENDER title location</title>
      <link>https://communities.sas.com/t5/Graphics-Programming/RTF-SGRENDER-title-location/m-p/77508#M2857</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I'm using SGRENDER to output a box plot to RTF, and consumers want easy cut-paste to PowerPoint.&amp;nbsp;&amp;nbsp; (Don't have 9.4 yet, so can't try ODS to powerpoint).&amp;nbsp; I'm using&amp;nbsp; imagefmt=EMF.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have TITLE statements for my titles.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Titles are going to the header of the RTF document, so cut-paste is a hassle for users.&amp;nbsp; I thought "no problem, I'll just set GTITLE on the ODS statement".&amp;nbsp; But while that would do what I want for SGPLOT, it doesn't effect SGRENDER.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Looks like if I want the titles in the image with SGRENDER, I need to switch from using title statements to using ENTRYTITLE in the GTL, is that right?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;My other thought to (save all of my title statements), was to turn on BODYTITLE.&amp;nbsp; So the title would not be part of the image, but since it's in the body of the rtf, it's easier to cut-paste.&amp;nbsp; But at least with Office 2003, while the RTF document looks good in word (titles centered above the image), when I paste it into powerpoint the title text goes into a text box separate from the image, and is left aligned.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;So my questions:&lt;/P&gt;&lt;P&gt;1.&amp;nbsp; Using SGRENDER, is there a way to get titles defined on a TITLE statement to be printed in the image?&lt;/P&gt;&lt;P&gt;2.&amp;nbsp; If not, any other suggestions for managing title text when generating RTF that will eventually end up in PowerPoint?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;--Q.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;proc template;
&amp;nbsp; define statgraph MyBoxPlot;
&amp;nbsp;&amp;nbsp;&amp;nbsp; begingraph;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; layout overlay ;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; boxplot x=Region y=Sales ; 
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; endlayout;
&amp;nbsp;&amp;nbsp;&amp;nbsp; endgraph;
&amp;nbsp; end;
run;

ods graphics/reset=all;
ods _all_ close;
ods rtf file="d:\junk\me.rtf" gtitle ;

title1 "This is a title";
title2 "I am a subtitle";

proc sgrender data=sashelp.shoes template="MyBoxPlot" ;
run;

proc sgplot data=sashelp.shoes;
&amp;nbsp; vbox sales/group=region;
run;

title1;
ods _all_ close;
ods listing;
&lt;/PRE&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 10 Sep 2013 14:45:44 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Graphics-Programming/RTF-SGRENDER-title-location/m-p/77508#M2857</guid>
      <dc:creator>Quentin</dc:creator>
      <dc:date>2013-09-10T14:45:44Z</dc:date>
    </item>
    <item>
      <title>Re: RTF SGRENDER title location</title>
      <link>https://communities.sas.com/t5/Graphics-Programming/RTF-SGRENDER-title-location/m-p/77509#M2858</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;For question #1, I can definitely tell you that you cannot use TITLE/FOOTNOTE statements with GTL/SGRENDER. However, TITLE/FOOTNOTE statements will work with SG procedure output (SGPLOT/SGPANEL/SGSCATTER). The underlying rendering system is the same, so if the plot you're creating does not require a GTL-only option, I would use the SG procedures to solve both of your problems. However, if you require GTL, you can use ENTRYTITLE/ENTRYFOONOTE statements in the template to define your text. I would also make the text dynamic so that you can pass it into SGRENDER. Here is an example using your code:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;proc template;&lt;/P&gt;&lt;P&gt;&amp;nbsp; define statgraph MyBoxPlot;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; dynamic TITLE1 TITLE2;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; begingraph;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; entrytitle TITLE1;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; entrytitle TITLE2;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; layout overlay ;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; boxplot x=Region y=Sales ; &lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; endlayout;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; endgraph;&lt;/P&gt;&lt;P&gt;&amp;nbsp; end;&lt;/P&gt;&lt;P&gt;run;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;proc sgrender data=sashelp.shoes template="MyBoxPlot" ;&lt;/P&gt;&lt;P&gt;dynamic TITLE1="This is a title"; &lt;/P&gt;&lt;P&gt;dynamic TITLE2="I am a subtitle";&lt;/P&gt;&lt;P&gt;run;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Hope this helps!&lt;/P&gt;&lt;P&gt;Dan&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 10 Sep 2013 15:03:25 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Graphics-Programming/RTF-SGRENDER-title-location/m-p/77509#M2858</guid>
      <dc:creator>DanH_sas</dc:creator>
      <dc:date>2013-09-10T15:03:25Z</dc:date>
    </item>
    <item>
      <title>Re: RTF SGRENDER title location</title>
      <link>https://communities.sas.com/t5/Graphics-Programming/RTF-SGRENDER-title-location/m-p/77510#M2859</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks Dan,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Building off of your suggestion to make the title text dynamic, maybe I'll play with a macro function solution that would read the title text from sashelp.vtitle, and generate the dynamic statement for me.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;so end up with:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;proc sgrender data=sashelp.shoes template="MyBoxPlot";&lt;/P&gt;&lt;P&gt;&amp;nbsp; %MakeDynamicTitles()&amp;nbsp;&amp;nbsp; /*read titles from sashelp.vtitle and generate one DYNAMIC statement for each*/&lt;/P&gt;&lt;P&gt;run;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Could be useful when you have titles defined for tables, and want them to be honored for plots.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;But actually, since I'm already passing the titles in a macro call, I can just do:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;proc sgrender data=sashelp.shoes template="MyBoxPlot";&lt;/P&gt;&lt;P&gt;&amp;nbsp; dynamic TITLE1="&amp;amp;title1";&lt;/P&gt;&lt;P&gt;run;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;--Q.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 10 Sep 2013 15:40:08 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Graphics-Programming/RTF-SGRENDER-title-location/m-p/77510#M2859</guid>
      <dc:creator>Quentin</dc:creator>
      <dc:date>2013-09-10T15:40:08Z</dc:date>
    </item>
  </channel>
</rss>

