<?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: ALIGN TITLE in ODS and Base Reporting</title>
    <link>https://communities.sas.com/t5/ODS-and-Base-Reporting/ALIGN-TITLE/m-p/4522#M1830</link>
    <description>Hi:&lt;BR /&gt;
  It depends on your destination. If you are using the LISTING destination and sending output to an ASCII text file, then you cannot variably adjust the alignment of text strings for Text output, -easily-. There used to be a SAS macro program that you could run that would figure out your LINESIZE and then split the string, but you'd have to ask Tech Support whether they even know how to get a copy of that macro -- I used to use something like it in my mainframe days (long, long ago).&lt;BR /&gt;
 &lt;BR /&gt;
However, generally, for HTML, RTF and PDF, you can do this:[pre]&lt;BR /&gt;
title j=l 'Left' j=c 'Center' j=r 'Right';[/pre]&lt;BR /&gt;
 &lt;BR /&gt;
Not all HTML-based tagsets will "accept" this syntax, however. If you use MSOFFICE2K tagset, the differing strings will appear on 3 separate lines.&lt;BR /&gt;
 &lt;BR /&gt;
Here's some code to test:&lt;BR /&gt;
[pre]&lt;BR /&gt;
options nodate nonumber;&lt;BR /&gt;
&lt;BR /&gt;
ods listing;&lt;BR /&gt;
ods html file='c:\temp\test_title.html' style=sasweb;&lt;BR /&gt;
ods rtf file='c:\temp\test_title.rtf';&lt;BR /&gt;
ods pdf file='c:\temp\test_title.pdf';&lt;BR /&gt;
ods msoffice2k file='c:\temp\test_title_mso.html' style=sasweb;&lt;BR /&gt;
   &lt;BR /&gt;
ods escapechar = '~';&lt;BR /&gt;
title j=r 'Page ~{thispage}';&lt;BR /&gt;
title2 j=l 'Left' j=c 'Center' j=r 'Right';&lt;BR /&gt;
  &lt;BR /&gt;
proc print data=sashelp.class;&lt;BR /&gt;
var name age height;&lt;BR /&gt;
run;&lt;BR /&gt;
ods _all_ close;&lt;BR /&gt;
[/pre]&lt;BR /&gt;
&lt;BR /&gt;
cynthia</description>
    <pubDate>Tue, 04 Sep 2007 21:45:12 GMT</pubDate>
    <dc:creator>Cynthia_sas</dc:creator>
    <dc:date>2007-09-04T21:45:12Z</dc:date>
    <item>
      <title>ALIGN TITLE</title>
      <link>https://communities.sas.com/t5/ODS-and-Base-Reporting/ALIGN-TITLE/m-p/4521#M1829</link>
      <description>Hi &lt;BR /&gt;
&lt;BR /&gt;
I have a title as&lt;BR /&gt;
&lt;BR /&gt;
REPRORT_ID                Report for Invoices                              Page 1&lt;BR /&gt;
&lt;BR /&gt;
I want Report_ID to be left aligned&lt;BR /&gt;
Report title i.e. Report for Invoices as center aligned &lt;BR /&gt;
Page 1 i.e. page numberings as right aligned</description>
      <pubDate>Tue, 04 Sep 2007 20:12:53 GMT</pubDate>
      <guid>https://communities.sas.com/t5/ODS-and-Base-Reporting/ALIGN-TITLE/m-p/4521#M1829</guid>
      <dc:creator>SanjayM</dc:creator>
      <dc:date>2007-09-04T20:12:53Z</dc:date>
    </item>
    <item>
      <title>Re: ALIGN TITLE</title>
      <link>https://communities.sas.com/t5/ODS-and-Base-Reporting/ALIGN-TITLE/m-p/4522#M1830</link>
      <description>Hi:&lt;BR /&gt;
  It depends on your destination. If you are using the LISTING destination and sending output to an ASCII text file, then you cannot variably adjust the alignment of text strings for Text output, -easily-. There used to be a SAS macro program that you could run that would figure out your LINESIZE and then split the string, but you'd have to ask Tech Support whether they even know how to get a copy of that macro -- I used to use something like it in my mainframe days (long, long ago).&lt;BR /&gt;
 &lt;BR /&gt;
However, generally, for HTML, RTF and PDF, you can do this:[pre]&lt;BR /&gt;
title j=l 'Left' j=c 'Center' j=r 'Right';[/pre]&lt;BR /&gt;
 &lt;BR /&gt;
Not all HTML-based tagsets will "accept" this syntax, however. If you use MSOFFICE2K tagset, the differing strings will appear on 3 separate lines.&lt;BR /&gt;
 &lt;BR /&gt;
Here's some code to test:&lt;BR /&gt;
[pre]&lt;BR /&gt;
options nodate nonumber;&lt;BR /&gt;
&lt;BR /&gt;
ods listing;&lt;BR /&gt;
ods html file='c:\temp\test_title.html' style=sasweb;&lt;BR /&gt;
ods rtf file='c:\temp\test_title.rtf';&lt;BR /&gt;
ods pdf file='c:\temp\test_title.pdf';&lt;BR /&gt;
ods msoffice2k file='c:\temp\test_title_mso.html' style=sasweb;&lt;BR /&gt;
   &lt;BR /&gt;
ods escapechar = '~';&lt;BR /&gt;
title j=r 'Page ~{thispage}';&lt;BR /&gt;
title2 j=l 'Left' j=c 'Center' j=r 'Right';&lt;BR /&gt;
  &lt;BR /&gt;
proc print data=sashelp.class;&lt;BR /&gt;
var name age height;&lt;BR /&gt;
run;&lt;BR /&gt;
ods _all_ close;&lt;BR /&gt;
[/pre]&lt;BR /&gt;
&lt;BR /&gt;
cynthia</description>
      <pubDate>Tue, 04 Sep 2007 21:45:12 GMT</pubDate>
      <guid>https://communities.sas.com/t5/ODS-and-Base-Reporting/ALIGN-TITLE/m-p/4522#M1830</guid>
      <dc:creator>Cynthia_sas</dc:creator>
      <dc:date>2007-09-04T21:45:12Z</dc:date>
    </item>
    <item>
      <title>Re: ALIGN TITLE</title>
      <link>https://communities.sas.com/t5/ODS-and-Base-Reporting/ALIGN-TITLE/m-p/4523#M1831</link>
      <description>Thanks, I think it should work for PROCREPORT as well.</description>
      <pubDate>Wed, 05 Sep 2007 08:08:37 GMT</pubDate>
      <guid>https://communities.sas.com/t5/ODS-and-Base-Reporting/ALIGN-TITLE/m-p/4523#M1831</guid>
      <dc:creator>SanjayM</dc:creator>
      <dc:date>2007-09-05T08:08:37Z</dc:date>
    </item>
    <item>
      <title>Re: ALIGN TITLE</title>
      <link>https://communities.sas.com/t5/ODS-and-Base-Reporting/ALIGN-TITLE/m-p/4524#M1832</link>
      <description>&lt;QUOTING cynthia=""&gt;&lt;BR /&gt;
&lt;BR /&gt;
&amp;gt; It depends on your destination. If you are using&lt;BR /&gt;
&amp;gt; the LISTING destination and sending output to an&lt;BR /&gt;
&amp;gt; ASCII text file, then you cannot variably adjust the&lt;BR /&gt;
&amp;gt; alignment of text strings for Text output, -easily-.&lt;BR /&gt;
&amp;gt; There used to be a SAS macro program that you could&lt;BR /&gt;
&amp;gt; run that would figure out your LINESIZE and then&lt;BR /&gt;
&amp;gt; split the string, but you'd have to ask Tech Support&lt;BR /&gt;
&amp;gt; whether they even know how to get a copy of that&lt;BR /&gt;
&amp;gt; macro -- I used to use something like it in my&lt;BR /&gt;
&amp;gt;  mainframe days (long, long ago).&lt;BR /&gt;
&lt;BR /&gt;
&lt;/QUOTING&gt; &lt;BR /&gt;
&lt;BR /&gt;
I still occasionally use output destinations that support this Cynthia, although I haven't written a macro to perform the task.&lt;BR /&gt;
&lt;BR /&gt;
The key constraint is that the output medium must be using a non-proportional font, otherwise all bets are off and this won't work consistently as expected.  Aside from anything else, a space character in a proportional font is narrower than "i" in either case, or "L" in lower case.&lt;BR /&gt;
&lt;BR /&gt;
Our old friend  %SysFunc( GetOption( LineSize) ) will retrieve the system setting for the length of the output line in characters, and use of the Left(), Trim() and Length() functions will retrieve the length of the title string which can then be prepended with the appropriate number of spaces.&lt;BR /&gt;
&lt;BR /&gt;
I would never do this in ODS.  As you showed there are many approaches which are much less complex and easier to achieve, however, for producing survey forms I still tend to program with the approach that I know I can make work quickly.&lt;BR /&gt;
&lt;BR /&gt;
Kind regards&lt;BR /&gt;
&lt;BR /&gt;
David</description>
      <pubDate>Thu, 06 Sep 2007 23:42:23 GMT</pubDate>
      <guid>https://communities.sas.com/t5/ODS-and-Base-Reporting/ALIGN-TITLE/m-p/4524#M1832</guid>
      <dc:creator>deleted_user</dc:creator>
      <dc:date>2007-09-06T23:42:23Z</dc:date>
    </item>
  </channel>
</rss>

