<?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: using formatted text with obtitle in ODS and Base Reporting</title>
    <link>https://communities.sas.com/t5/ODS-and-Base-Reporting/using-formatted-text-with-obtitle/m-p/840803#M25991</link>
    <description>&lt;BLOCKQUOTE&gt;&lt;HR /&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/223838"&gt;@js5&lt;/a&gt;&amp;nbsp;wrote:&lt;BR /&gt;
&lt;P&gt;Thank you for pointing out that by statement is supported. It was being highlighted in red by Enterprise Guide so I assumed that it is not supported:&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Screenshot 2022-10-26 093619.png" style="width: 487px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/76623i68D8B2494E9B71B2/image-size/large?v=v2&amp;amp;px=999" role="button" title="Screenshot 2022-10-26 093619.png" alt="Screenshot 2022-10-26 093619.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;I guess I should not trust the syntax highlighting blindly.&lt;/P&gt;
&lt;P&gt;I did use ods escapechar. I solved my problem in the meantime by replacing the by statement needed by where and doing a macro loop, and putting the title code inside the macro loop instead of outside.&lt;/P&gt;
&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;Depends on a number of factors how well syntax highlighting "works". I am surprised about BY but I have had issues with the highlighting not having the options of new procedures work. There is a slim chance that copying code from some sources acquires not-displayed characters that the highlighting finds.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Better to test with a small data set and see what the LOG says.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Wed, 26 Oct 2022 11:07:20 GMT</pubDate>
    <dc:creator>ballardw</dc:creator>
    <dc:date>2022-10-26T11:07:20Z</dc:date>
    <item>
      <title>using formatted text with obtitle</title>
      <link>https://communities.sas.com/t5/ODS-and-Base-Reporting/using-formatted-text-with-obtitle/m-p/840484#M25977</link>
      <description>&lt;P&gt;Is there a way of providing a formatted title with obtitle? With normal title statement, I can do the following:&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=""&gt;title1 justify=left "foo" justify=center "bar" justify=right "baz";&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;with obtitle this does not work. Inline formatting does not seem to work either:&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=""&gt;obtitle2 \a1\titer#1\SGPanel#1 "~{style [textalign=left]foo} ~{style [textalign=center]bar} ~{style [textalign=right]baz}";&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;The problem is that the header needs to change depending on what is being displayed, but proc sgpanel does not support by statement, so I do not have a by variable to work with and can only work with where.&lt;/P&gt;</description>
      <pubDate>Tue, 25 Oct 2022 11:00:26 GMT</pubDate>
      <guid>https://communities.sas.com/t5/ODS-and-Base-Reporting/using-formatted-text-with-obtitle/m-p/840484#M25977</guid>
      <dc:creator>js5</dc:creator>
      <dc:date>2022-10-25T11:00:26Z</dc:date>
    </item>
    <item>
      <title>Re: using formatted text with obtitle</title>
      <link>https://communities.sas.com/t5/ODS-and-Base-Reporting/using-formatted-text-with-obtitle/m-p/840589#M25985</link>
      <description>&lt;P&gt;First thing SGPanel does support By group processing, though maybe not in the manner you want.&lt;/P&gt;
&lt;P&gt;Example:&lt;/P&gt;
&lt;PRE&gt;Proc sort data=sashelp.class out=classsort;
   by sex age;
run;

proc sgpanel data=classsort;
   by sex;
   panelby age;
   scatter x=height y=weight;
run;&lt;/PRE&gt;
&lt;P&gt;Second, you would likely have to show your entire Proc Document code so we can see the context of your attempt, and possibly provide the Sgpanel code and data to create the graphs as well. Best would be to show what you expect the output to look like.&lt;/P&gt;
&lt;P&gt;Just in case: did you remember the Escapechar statement?&lt;/P&gt;
&lt;P&gt;Some places inline formatting seems to prefer (*ESC*) instead of an escapechar such as ~ . Not sure if this is one of them.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;BLOCKQUOTE&gt;&lt;HR /&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/223838"&gt;@js5&lt;/a&gt;&amp;nbsp;wrote:&lt;BR /&gt;
&lt;P&gt;Is there a way of providing a formatted title with obtitle? With normal title statement, I can do the following:&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=""&gt;title1 justify=left "foo" justify=center "bar" justify=right "baz";&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;with obtitle this does not work. Inline formatting does not seem to work either:&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=""&gt;obtitle2 \a1\titer#1\SGPanel#1 "~{style [textalign=left]foo} ~{style [textalign=center]bar} ~{style [textalign=right]baz}";&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;The problem is that the header needs to change depending on what is being displayed, but proc sgpanel does not support by statement, so I do not have a by variable to work with and can only work with where.&lt;/P&gt;
&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 25 Oct 2022 15:19:47 GMT</pubDate>
      <guid>https://communities.sas.com/t5/ODS-and-Base-Reporting/using-formatted-text-with-obtitle/m-p/840589#M25985</guid>
      <dc:creator>ballardw</dc:creator>
      <dc:date>2022-10-25T15:19:47Z</dc:date>
    </item>
    <item>
      <title>Re: using formatted text with obtitle</title>
      <link>https://communities.sas.com/t5/ODS-and-Base-Reporting/using-formatted-text-with-obtitle/m-p/840759#M25989</link>
      <description>&lt;P&gt;Thank you for pointing out that by statement is supported. It was being highlighted in red by Enterprise Guide so I assumed that it is not supported:&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Screenshot 2022-10-26 093619.png" style="width: 487px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/76623i68D8B2494E9B71B2/image-size/large?v=v2&amp;amp;px=999" role="button" title="Screenshot 2022-10-26 093619.png" alt="Screenshot 2022-10-26 093619.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;I guess I should not trust the syntax highlighting blindly.&lt;/P&gt;&lt;P&gt;I did use ods escapechar. I solved my problem in the meantime by replacing the by statement needed by where and doing a macro loop, and putting the title code inside the macro loop instead of outside.&lt;/P&gt;</description>
      <pubDate>Wed, 26 Oct 2022 07:37:02 GMT</pubDate>
      <guid>https://communities.sas.com/t5/ODS-and-Base-Reporting/using-formatted-text-with-obtitle/m-p/840759#M25989</guid>
      <dc:creator>js5</dc:creator>
      <dc:date>2022-10-26T07:37:02Z</dc:date>
    </item>
    <item>
      <title>Re: using formatted text with obtitle</title>
      <link>https://communities.sas.com/t5/ODS-and-Base-Reporting/using-formatted-text-with-obtitle/m-p/840803#M25991</link>
      <description>&lt;BLOCKQUOTE&gt;&lt;HR /&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/223838"&gt;@js5&lt;/a&gt;&amp;nbsp;wrote:&lt;BR /&gt;
&lt;P&gt;Thank you for pointing out that by statement is supported. It was being highlighted in red by Enterprise Guide so I assumed that it is not supported:&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Screenshot 2022-10-26 093619.png" style="width: 487px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/76623i68D8B2494E9B71B2/image-size/large?v=v2&amp;amp;px=999" role="button" title="Screenshot 2022-10-26 093619.png" alt="Screenshot 2022-10-26 093619.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;I guess I should not trust the syntax highlighting blindly.&lt;/P&gt;
&lt;P&gt;I did use ods escapechar. I solved my problem in the meantime by replacing the by statement needed by where and doing a macro loop, and putting the title code inside the macro loop instead of outside.&lt;/P&gt;
&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;Depends on a number of factors how well syntax highlighting "works". I am surprised about BY but I have had issues with the highlighting not having the options of new procedures work. There is a slim chance that copying code from some sources acquires not-displayed characters that the highlighting finds.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Better to test with a small data set and see what the LOG says.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 26 Oct 2022 11:07:20 GMT</pubDate>
      <guid>https://communities.sas.com/t5/ODS-and-Base-Reporting/using-formatted-text-with-obtitle/m-p/840803#M25991</guid>
      <dc:creator>ballardw</dc:creator>
      <dc:date>2022-10-26T11:07:20Z</dc:date>
    </item>
    <item>
      <title>Re: using formatted text with obtitle</title>
      <link>https://communities.sas.com/t5/ODS-and-Base-Reporting/using-formatted-text-with-obtitle/m-p/844577#M26052</link>
      <description>&lt;P&gt;I was able to achieve what I need by using activetitle statement:&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=""&gt;title1 justify=left "foo" justify=center "bar" justify=right "baz";

ods document name=work.test(write);

proc report data=sashelp.cars;
	columns Origin Make MSRP;
	define Origin / group;
	define Make / group;
	define MSRP / analysis mean;
run;

ods document close;
title1;
title1 justify=left "one" justify=center "two" justify=right "three";

ods word file="C:\users\&amp;amp;sysuserid.\Work Folders\Desktop\SAS\obtitle\test.docx";

proc document name=work.test(update);
/*	obtitle \Report#1\Report#1\Report#1 "(*ESC*){style [textalign=left]one} (*ESC*){style [textalign=center]two} (*ESC*){style [textalign=right]three}";*/
	replay ^ / activetitle;
run;

ods word close;&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Wed, 16 Nov 2022 08:18:41 GMT</pubDate>
      <guid>https://communities.sas.com/t5/ODS-and-Base-Reporting/using-formatted-text-with-obtitle/m-p/844577#M26052</guid>
      <dc:creator>js5</dc:creator>
      <dc:date>2022-11-16T08:18:41Z</dc:date>
    </item>
  </channel>
</rss>

