<?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: How to align columns in proc report in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/How-to-align-columns-in-proc-report/m-p/714689#M220673</link>
    <description>Is this applicable for all outputs like RTF, PDF, HTML?</description>
    <pubDate>Wed, 27 Jan 2021 17:59:59 GMT</pubDate>
    <dc:creator>RAVI2000</dc:creator>
    <dc:date>2021-01-27T17:59:59Z</dc:date>
    <item>
      <title>How to align columns in proc report</title>
      <link>https://communities.sas.com/t5/SAS-Programming/How-to-align-columns-in-proc-report/m-p/713796#M220273</link>
      <description>&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I want to keep my indentation in proc report (as presented in data), but when it flows to a new line it misalign.&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="HitmonTran_0-1611539683093.png" style="width: 400px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/53854iF7295F1688145EA6/image-size/medium?v=v2&amp;amp;px=400" role="button" title="HitmonTran_0-1611539683093.png" alt="HitmonTran_0-1611539683093.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;data:&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;desc
Number of participants
Cardiac disorders
   Palpitations
Gastrointestinal disorders
   Gastrointestinal polyp haemorrhage&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;code: define statement "desc"&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;proc report data = final1 nowd headline headskip missing split='@' style(header column)=[protectspecialchars=off];


 %if &amp;amp;blind=Y %then %do;
	 columns ordx1 aebodsys total1 aedecod  desc ;
	  define ordx1     / descending order     order=internal noprint;
	  define aebodsys  / order order=internal noprint;
	  define total1  / descending order  order=internal noprint;
	  define aedecod   / order order=internal noprint;

	  define desc    	  	/display   style(header)=[just=left]    style(column)=[asis=on cellwidth=2.5 in ] flow " "; 
run;&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 25 Jan 2021 06:21:07 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/How-to-align-columns-in-proc-report/m-p/713796#M220273</guid>
      <dc:creator>HitmonTran</dc:creator>
      <dc:date>2021-01-25T06:21:07Z</dc:date>
    </item>
    <item>
      <title>Re: How to align columns in proc report</title>
      <link>https://communities.sas.com/t5/SAS-Programming/How-to-align-columns-in-proc-report/m-p/713806#M220282</link>
      <description>&lt;P&gt;The text-wrapping occurs in the first column? Did you try setting a large width for the first column?&lt;/P&gt;</description>
      <pubDate>Mon, 25 Jan 2021 03:59:05 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/How-to-align-columns-in-proc-report/m-p/713806#M220282</guid>
      <dc:creator>ChrisNZ</dc:creator>
      <dc:date>2021-01-25T03:59:05Z</dc:date>
    </item>
    <item>
      <title>Re: How to align columns in proc report</title>
      <link>https://communities.sas.com/t5/SAS-Programming/How-to-align-columns-in-proc-report/m-p/713813#M220288</link>
      <description>&lt;P&gt;Do you want the&amp;nbsp;&lt;FONT face="courier new,courier"&gt;&amp;nbsp;h&amp;nbsp;&lt;/FONT&gt; to be aligned with&amp;nbsp; &lt;FONT face="courier new,courier"&gt;G&amp;nbsp;&lt;/FONT&gt; in the line above it in your yellow-coloured text?&lt;/P&gt;</description>
      <pubDate>Mon, 25 Jan 2021 04:25:58 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/How-to-align-columns-in-proc-report/m-p/713813#M220288</guid>
      <dc:creator>ChrisNZ</dc:creator>
      <dc:date>2021-01-25T04:25:58Z</dc:date>
    </item>
    <item>
      <title>Re: How to align columns in proc report</title>
      <link>https://communities.sas.com/t5/SAS-Programming/How-to-align-columns-in-proc-report/m-p/713824#M220293</link>
      <description>that's correct. I updated the post to include sample data.</description>
      <pubDate>Mon, 25 Jan 2021 06:21:51 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/How-to-align-columns-in-proc-report/m-p/713824#M220293</guid>
      <dc:creator>HitmonTran</dc:creator>
      <dc:date>2021-01-25T06:21:51Z</dc:date>
    </item>
    <item>
      <title>Re: How to align columns in proc report</title>
      <link>https://communities.sas.com/t5/SAS-Programming/How-to-align-columns-in-proc-report/m-p/713858#M220308</link>
      <description>&lt;BLOCKQUOTE&gt;&lt;HR /&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/111564"&gt;@HitmonTran&lt;/a&gt;&amp;nbsp;wrote:&lt;BR /&gt;that's correct. I updated the post to include sample data.&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;Not really "data".&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Instructions here: &lt;A href="https://communities.sas.com/t5/SAS-Communities-Library/How-to-create-a-data-step-version-of-your-data-AKA-generate/ta-p/258712" target="_blank"&gt;https://communities.sas.com/t5/SAS-Communities-Library/How-to-create-a-data-step-version-of-your-data-AKA-generate/ta-p/258712&lt;/A&gt; will show how to turn an existing SAS data set into data step code that can be pasted into a forum code box using the &amp;lt;/&amp;gt; icon or attached as text to show exactly what you have and that we can test code against.&lt;/P&gt;</description>
      <pubDate>Mon, 25 Jan 2021 10:34:03 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/How-to-align-columns-in-proc-report/m-p/713858#M220308</guid>
      <dc:creator>ballardw</dc:creator>
      <dc:date>2021-01-25T10:34:03Z</dc:date>
    </item>
    <item>
      <title>Re: How to align columns in proc report</title>
      <link>https://communities.sas.com/t5/SAS-Programming/How-to-align-columns-in-proc-report/m-p/714130#M220418</link>
      <description>&lt;P&gt;&lt;EM&gt;&amp;gt; &amp;nbsp;I updated the post to include sample data.&lt;/EM&gt;&lt;/P&gt;
&lt;P&gt;Sample data would be data we can your code against.&lt;/P&gt;
&lt;P&gt;This should always be provided when you ask for help if you want to help yourself.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;In any case, I think that's the standard behaviour, and that's it.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Maybe try inserting padding characters in those labels that cause problems?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 25 Jan 2021 23:39:52 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/How-to-align-columns-in-proc-report/m-p/714130#M220418</guid>
      <dc:creator>ChrisNZ</dc:creator>
      <dc:date>2021-01-25T23:39:52Z</dc:date>
    </item>
    <item>
      <title>Re: How to align columns in proc report</title>
      <link>https://communities.sas.com/t5/SAS-Programming/How-to-align-columns-in-proc-report/m-p/714367#M220539</link>
      <description>Did you find a way to do this alignment?</description>
      <pubDate>Tue, 26 Jan 2021 18:54:48 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/How-to-align-columns-in-proc-report/m-p/714367#M220539</guid>
      <dc:creator>RAVI2000</dc:creator>
      <dc:date>2021-01-26T18:54:48Z</dc:date>
    </item>
    <item>
      <title>Re: How to align columns in proc report</title>
      <link>https://communities.sas.com/t5/SAS-Programming/How-to-align-columns-in-proc-report/m-p/714423#M220561</link>
      <description>not yet.&lt;BR /&gt;</description>
      <pubDate>Tue, 26 Jan 2021 21:15:13 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/How-to-align-columns-in-proc-report/m-p/714423#M220561</guid>
      <dc:creator>HitmonTran</dc:creator>
      <dc:date>2021-01-26T21:15:13Z</dc:date>
    </item>
    <item>
      <title>Re: How to align columns in proc report</title>
      <link>https://communities.sas.com/t5/SAS-Programming/How-to-align-columns-in-proc-report/m-p/714452#M220573</link>
      <description>&lt;P&gt;How about trying these STYLE options in your column DEFINE statement?&lt;/P&gt;
&lt;PRE&gt;style=[textalign=left cellwidth=2.5in tagattr="wrap:yes"]&lt;/PRE&gt;
&lt;P&gt;You need to use TEXTALIGN=left to ensure there is no indenting and the TAGATTR setting WRAP to yes should set wrapping on in the column.&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 27 Jan 2021 00:08:46 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/How-to-align-columns-in-proc-report/m-p/714452#M220573</guid>
      <dc:creator>SASKiwi</dc:creator>
      <dc:date>2021-01-27T00:08:46Z</dc:date>
    </item>
    <item>
      <title>Re: How to align columns in proc report</title>
      <link>https://communities.sas.com/t5/SAS-Programming/How-to-align-columns-in-proc-report/m-p/714458#M220574</link>
      <description>&lt;P&gt;Hi:&lt;/P&gt;
&lt;P&gt;&amp;nbsp; This is a variation of a program I posted for someone else about indenting -- he did not have to worry about wrapping, but the fix is the same -- use the leftmargin= option, as shown below.&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Cynthia_sas_0-1611710132199.png" style="width: 400px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/53947iAC8DA890DB1FB690/image-size/medium?v=v2&amp;amp;px=400" role="button" title="Cynthia_sas_0-1611710132199.png" alt="Cynthia_sas_0-1611710132199.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;With a big enough cellwidth and leftmargin set at .25 in , there is NOT any wrapping.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;However, with cellwidth of 1.5in and a leftmargin of .25, you can see that when the line does need to wrap, it wraps to the leftmargin value:&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Cynthia_sas_1-1611710220627.png" style="width: 400px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/53948iD6D91EF246BBA31B/image-size/medium?v=v2&amp;amp;px=400" role="button" title="Cynthia_sas_1-1611710220627.png" alt="Cynthia_sas_1-1611710220627.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I already had the code set up for PDF using the same data as the previous example, so all I did was change the cellwidth and change the output file name and you can see that wrapping occurs as you wanted.&lt;/P&gt;
&lt;P&gt;Cynthia&lt;/P&gt;</description>
      <pubDate>Wed, 27 Jan 2021 01:18:00 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/How-to-align-columns-in-proc-report/m-p/714458#M220574</guid>
      <dc:creator>Cynthia_sas</dc:creator>
      <dc:date>2021-01-27T01:18:00Z</dc:date>
    </item>
    <item>
      <title>Re: How to align columns in proc report</title>
      <link>https://communities.sas.com/t5/SAS-Programming/How-to-align-columns-in-proc-report/m-p/714686#M220671</link>
      <description>Thank you for your response Cynthia. Can you link the thread here.</description>
      <pubDate>Wed, 27 Jan 2021 17:46:42 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/How-to-align-columns-in-proc-report/m-p/714686#M220671</guid>
      <dc:creator>RAVI2000</dc:creator>
      <dc:date>2021-01-27T17:46:42Z</dc:date>
    </item>
    <item>
      <title>Re: How to align columns in proc report</title>
      <link>https://communities.sas.com/t5/SAS-Programming/How-to-align-columns-in-proc-report/m-p/714687#M220672</link>
      <description>Can we use INDENT= option in proc report?</description>
      <pubDate>Wed, 27 Jan 2021 17:53:30 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/How-to-align-columns-in-proc-report/m-p/714687#M220672</guid>
      <dc:creator>RAVI2000</dc:creator>
      <dc:date>2021-01-27T17:53:30Z</dc:date>
    </item>
    <item>
      <title>Re: How to align columns in proc report</title>
      <link>https://communities.sas.com/t5/SAS-Programming/How-to-align-columns-in-proc-report/m-p/714689#M220673</link>
      <description>Is this applicable for all outputs like RTF, PDF, HTML?</description>
      <pubDate>Wed, 27 Jan 2021 17:59:59 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/How-to-align-columns-in-proc-report/m-p/714689#M220673</guid>
      <dc:creator>RAVI2000</dc:creator>
      <dc:date>2021-01-27T17:59:59Z</dc:date>
    </item>
    <item>
      <title>Re: How to align columns in proc report</title>
      <link>https://communities.sas.com/t5/SAS-Programming/How-to-align-columns-in-proc-report/m-p/714851#M220748</link>
      <description>Hi: INDENT= and LEFTMARGIN= sometimes do the same thing. It depends on the destination, you'll have to look in the ODS documentation on style attributes and whether they are honored by each destination. As you can see, LEFTMARGIN= works for PDF. The INDENT= option may be an RTF option. Can't remember off the top of my head.&lt;BR /&gt;Cynthia</description>
      <pubDate>Thu, 28 Jan 2021 00:41:07 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/How-to-align-columns-in-proc-report/m-p/714851#M220748</guid>
      <dc:creator>Cynthia_sas</dc:creator>
      <dc:date>2021-01-28T00:41:07Z</dc:date>
    </item>
    <item>
      <title>Re: How to align columns in proc report</title>
      <link>https://communities.sas.com/t5/SAS-Programming/How-to-align-columns-in-proc-report/m-p/714853#M220750</link>
      <description>Hi:&lt;BR /&gt;  As you can see in the example above, LEFTMARGIN= works for PDF. I don't think it works for HTML. Can't remember about RTF. Better to check in the doc or run a simple test using fake data such as I show in my example.&lt;BR /&gt;Cynthia</description>
      <pubDate>Thu, 28 Jan 2021 00:42:05 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/How-to-align-columns-in-proc-report/m-p/714853#M220750</guid>
      <dc:creator>Cynthia_sas</dc:creator>
      <dc:date>2021-01-28T00:42:05Z</dc:date>
    </item>
  </channel>
</rss>

