<?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: Proc Print - How to get labels displayed on separate lines in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/Proc-Print-How-to-get-labels-displayed-on-separate-lines/m-p/257244#M49362</link>
    <description>&lt;P&gt;Great advice from&amp;nbsp;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/13879"&gt;@Reeza﻿&lt;/a&gt;,&amp;nbsp;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/4954"&gt;@Astounding﻿&lt;/a&gt;. &amp;nbsp;I would add that you may want to move to proc report. &amp;nbsp;You are generating clinical tables there, you will find that the control you have with proc report helps later on. &amp;nbsp;Another few things to remember, its likely you are going to RTF destination, you may want to put RTF tags in and control output that way also. &amp;nbsp;You can do this by using an Escape character:&lt;/P&gt;
&lt;P&gt;ods escapechar="^";&lt;/P&gt;
&lt;P&gt;You can do all kinds of funky things with the output then, have a look at this for example:&lt;/P&gt;
&lt;P&gt;&lt;A href="http://www2.sas.com/proceedings/forum2007/099-2007.pdf" target="_blank"&gt;http://www2.sas.com/proceedings/forum2007/099-2007.pdf&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;One other thing to remember, whilst it doesn't impact on the titles, if you were to use the technique of indenting by using spaces in the data, i.e.&lt;/P&gt;
&lt;P&gt;COL1&lt;/P&gt;
&lt;P&gt;HEADACHE^{newline} &amp;nbsp; &amp;nbsp; HEAD&lt;/P&gt;
&lt;P&gt;This would come out without the spaces. &amp;nbsp;You need to use the option:&lt;/P&gt;
&lt;P&gt;define COL1 / "Title" style{column}={asis=on};&lt;/P&gt;
&lt;P&gt;Note the asis=on, this is always a headache if you don't know what to look for,&lt;/P&gt;</description>
    <pubDate>Thu, 17 Mar 2016 09:40:26 GMT</pubDate>
    <dc:creator>RW9</dc:creator>
    <dc:date>2016-03-17T09:40:26Z</dc:date>
    <item>
      <title>Proc Print - How to get labels displayed on separate lines</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Proc-Print-How-to-get-labels-displayed-on-separate-lines/m-p/257107#M49328</link>
      <description>&lt;P&gt;Hi I need help in my code&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I am running proc print with label option in it. I am using following codes.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;data seven;
set six;
label &amp;nbsp;aetext='Treatment-emergent
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;Adverse Event';
run;
&amp;nbsp;
proc print data=seven label;
var aetext cnt_pct1 cnt_pct2 cnt_pct3 cnt_pct4 cnt_pct5 cnt_pct6 cnt_pct7;
run;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp; I need output for aetext label statement&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;Treatment-emergent&lt;/P&gt;
&lt;P&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; Adverse Event.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;But my output shows like this.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Treatment-emergent &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; Adverse Event&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Thanks&lt;/P&gt;</description>
      <pubDate>Wed, 16 Mar 2016 19:30:01 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Proc-Print-How-to-get-labels-displayed-on-separate-lines/m-p/257107#M49328</guid>
      <dc:creator>knveraraju91</dc:creator>
      <dc:date>2016-03-16T19:30:01Z</dc:date>
    </item>
    <item>
      <title>Re: Proc Print - How to get labels displayed on separate lines</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Proc-Print-How-to-get-labels-displayed-on-separate-lines/m-p/257113#M49331</link>
      <description>&lt;P&gt;Please see &amp;nbsp;Splitting Labels across Two or More Lines in the following link:&lt;/P&gt;
&lt;P&gt;&lt;A href="http://support.sas.com/documentation/cdl/en/basess/58133/HTML/default/viewer.htm#a001292467.htm" target="_blank"&gt;http://support.sas.com/documentation/cdl/en/basess/58133/HTML/default/viewer.htm#a001292467.htm&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Use the SPLIT option within proc print.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;options linesize=80 pageno=1 nodate;

proc sort data=qtr02;
   by SalesRep; 
run;

proc print data=qtr02 noobs split='/';
   var SalesRep Month Units AmountSold;
   where Month='04';
   format Units comma7. AmountSold dollar14.2;
   sum Units AmountSold;
   title 'TruBlend Coffee Maker Sales Report for April';
   label SalesRep   = 'Sales/Representative'
         Units      = 'Units/Sold'
         AmountSold = 'Amount/Sold';
   run;&lt;/CODE&gt;&amp;nbsp;&lt;/PRE&gt;</description>
      <pubDate>Wed, 16 Mar 2016 19:43:49 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Proc-Print-How-to-get-labels-displayed-on-separate-lines/m-p/257113#M49331</guid>
      <dc:creator>Reeza</dc:creator>
      <dc:date>2016-03-16T19:43:49Z</dc:date>
    </item>
    <item>
      <title>Re: Proc Print - How to get labels displayed on separate lines</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Proc-Print-How-to-get-labels-displayed-on-separate-lines/m-p/257114#M49332</link>
      <description>&lt;P&gt;Instead of adding all those blanks in the middle of the label, add a character instead:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;label aetext = 'Treatment-emergent*Adverse Event';&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Then change the PROC PRINT statement to indicate that an asterisk within a label is actually an instruction to start a new line:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;proc print data=seven split='*';&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Using SPLIT= implies that labels are in effect, so you don't need to add the LABEL option.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Looks like Reeza is a little faster than me. &lt;img id="smileywink" class="emoticon emoticon-smileywink" src="https://communities.sas.com/i/smilies/16x16_smiley-wink.png" alt="Smiley Wink" title="Smiley Wink" /&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 16 Mar 2016 19:47:07 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Proc-Print-How-to-get-labels-displayed-on-separate-lines/m-p/257114#M49332</guid>
      <dc:creator>Astounding</dc:creator>
      <dc:date>2016-03-16T19:47:07Z</dc:date>
    </item>
    <item>
      <title>Re: Proc Print - How to get labels displayed on separate lines</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Proc-Print-How-to-get-labels-displayed-on-separate-lines/m-p/257244#M49362</link>
      <description>&lt;P&gt;Great advice from&amp;nbsp;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/13879"&gt;@Reeza﻿&lt;/a&gt;,&amp;nbsp;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/4954"&gt;@Astounding﻿&lt;/a&gt;. &amp;nbsp;I would add that you may want to move to proc report. &amp;nbsp;You are generating clinical tables there, you will find that the control you have with proc report helps later on. &amp;nbsp;Another few things to remember, its likely you are going to RTF destination, you may want to put RTF tags in and control output that way also. &amp;nbsp;You can do this by using an Escape character:&lt;/P&gt;
&lt;P&gt;ods escapechar="^";&lt;/P&gt;
&lt;P&gt;You can do all kinds of funky things with the output then, have a look at this for example:&lt;/P&gt;
&lt;P&gt;&lt;A href="http://www2.sas.com/proceedings/forum2007/099-2007.pdf" target="_blank"&gt;http://www2.sas.com/proceedings/forum2007/099-2007.pdf&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;One other thing to remember, whilst it doesn't impact on the titles, if you were to use the technique of indenting by using spaces in the data, i.e.&lt;/P&gt;
&lt;P&gt;COL1&lt;/P&gt;
&lt;P&gt;HEADACHE^{newline} &amp;nbsp; &amp;nbsp; HEAD&lt;/P&gt;
&lt;P&gt;This would come out without the spaces. &amp;nbsp;You need to use the option:&lt;/P&gt;
&lt;P&gt;define COL1 / "Title" style{column}={asis=on};&lt;/P&gt;
&lt;P&gt;Note the asis=on, this is always a headache if you don't know what to look for,&lt;/P&gt;</description>
      <pubDate>Thu, 17 Mar 2016 09:40:26 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Proc-Print-How-to-get-labels-displayed-on-separate-lines/m-p/257244#M49362</guid>
      <dc:creator>RW9</dc:creator>
      <dc:date>2016-03-17T09:40:26Z</dc:date>
    </item>
    <item>
      <title>Re: Proc Print - How to get labels displayed on separate lines</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Proc-Print-How-to-get-labels-displayed-on-separate-lines/m-p/257710#M49510</link>
      <description>&lt;P&gt;Thank you all for your support&lt;/P&gt;</description>
      <pubDate>Fri, 18 Mar 2016 21:43:55 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Proc-Print-How-to-get-labels-displayed-on-separate-lines/m-p/257710#M49510</guid>
      <dc:creator>knveraraju91</dc:creator>
      <dc:date>2016-03-18T21:43:55Z</dc:date>
    </item>
  </channel>
</rss>

