<?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 Report - add headline with values of order variable in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/Proc-Report-add-headline-with-values-of-order-variable/m-p/428759#M105877</link>
    <description>&lt;P&gt;If its a format then maybe (again not tested):&lt;/P&gt;
&lt;PRE class="  language-sas"&gt;&lt;CODE class="  language-sas"&gt;&lt;SPAN class="token keyword"&gt;compute&lt;/SPAN&gt; before studytype&lt;SPAN class="token punctuation"&gt;;&lt;/SPAN&gt;
  line&lt;SPAN class="token string"&gt;''&lt;/SPAN&gt;&lt;SPAN class="token punctuation"&gt;;&lt;/SPAN&gt;  &lt;BR /&gt;  line studytype myfmt.&lt;SPAN class="token punctuation"&gt;;&lt;BR /&gt;&lt;/SPAN&gt;/* Or for character */&lt;BR /&gt;  line studytpe $myfmt.;
&lt;SPAN class="token keyword"&gt;endcomp&lt;/SPAN&gt;&lt;SPAN class="token punctuation"&gt;;&lt;/SPAN&gt;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;Obviously replace the myfmt with the actual name of your format.&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Thu, 18 Jan 2018 12:24:36 GMT</pubDate>
    <dc:creator>RW9</dc:creator>
    <dc:date>2018-01-18T12:24:36Z</dc:date>
    <item>
      <title>Proc Report - add headline with values of order variable</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Proc-Report-add-headline-with-values-of-order-variable/m-p/428749#M105872</link>
      <description>&lt;P&gt;Hi there,&lt;/P&gt;&lt;P&gt;I have a variable "studytype" and further variables var1, var2, var3. Now I want to create an Excel file, that lists all data with var1-var3, grouped by studytype.&amp;nbsp;&lt;/P&gt;&lt;P&gt;Before a new studytype starts, I want to&amp;nbsp;add a Headline mentioning the studytype.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;For example:&lt;/P&gt;&lt;P&gt;studytype var1 var2 var3&lt;/P&gt;&lt;P&gt;A&amp;nbsp; 1 abcd 1111&lt;/P&gt;&lt;P&gt;A&amp;nbsp; 1 werewre 234234&lt;/P&gt;&lt;P&gt;B&amp;nbsp; 1 jwlkerjwerkl 3423432&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Should appear like:&lt;/P&gt;&lt;P&gt;A&lt;/P&gt;&lt;P&gt;1 abcd 111&lt;/P&gt;&lt;P&gt;1 werewere 234324&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;B&lt;/P&gt;&lt;P&gt;1 jwlkerjwerkl 3423432&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;My code:&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;Ods  tagsets.ExcelXP path=&amp;amp;path. file='out.xml' style=seaside;

proc report data=mydata nowd;
column studytype var1 var2 var3;
define studytype/ order noprint;
break before studytype / skip;
compute before studytype;
line'';
endcomp;
run;

ods tagsets.ExcelXP close;&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;It´s quite close to what I need, but how can I get the studytype (current value of studytype for this break)&amp;nbsp;in the Headlines created by the "line" statement?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks a lot for your Input.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 18 Jan 2018 11:48:30 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Proc-Report-add-headline-with-values-of-order-variable/m-p/428749#M105872</guid>
      <dc:creator>meki77</dc:creator>
      <dc:date>2018-01-18T11:48:30Z</dc:date>
    </item>
    <item>
      <title>Re: Proc Report - add headline with values of order variable</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Proc-Report-add-headline-with-values-of-order-variable/m-p/428751#M105873</link>
      <description>&lt;P&gt;Well, posting test data in the form of a datastep would be helpful as I am not typing that in. Two things jump to minds, though I can't test:&lt;/P&gt;
&lt;P&gt;options byline;&lt;/P&gt;
&lt;P&gt;Per:&amp;nbsp;&lt;A href="http://support.sas.com/documentation/cdl/en/lrdict/64316/HTML/default/viewer.htm#a000234737.htm" target="_blank"&gt;http://support.sas.com/documentation/cdl/en/lrdict/64316/HTML/default/viewer.htm#a000234737.htm&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;This should print each by group.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;What about adding:&lt;/P&gt;
&lt;PRE class=" language-sas"&gt;&lt;CODE class="  language-sas"&gt;&lt;SPAN class="token keyword"&gt;compute&lt;/SPAN&gt; before studytype&lt;SPAN class="token punctuation"&gt;;&lt;/SPAN&gt;
  line&lt;SPAN class="token string"&gt;''&lt;/SPAN&gt;&lt;SPAN class="token punctuation"&gt;;&lt;BR /&gt;&lt;/SPAN&gt;  line studytype;
&lt;SPAN class="token keyword"&gt;endcomp&lt;/SPAN&gt;&lt;SPAN class="token punctuation"&gt;;&lt;/SPAN&gt;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;Otherwise as above, post some test data in a usable format.&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 18 Jan 2018 11:53:30 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Proc-Report-add-headline-with-values-of-order-variable/m-p/428751#M105873</guid>
      <dc:creator>RW9</dc:creator>
      <dc:date>2018-01-18T11:53:30Z</dc:date>
    </item>
    <item>
      <title>Re: Proc Report - add headline with values of order variable</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Proc-Report-add-headline-with-values-of-order-variable/m-p/428755#M105875</link>
      <description>&lt;P&gt;Sorry about the missing data - will keep that in mind for the next time &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;"line studytpe" was the solution... So simple! It shows values instead of value labels, but I am pretty sure that I will find a solution for that on my own.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks so much!&lt;/P&gt;</description>
      <pubDate>Thu, 18 Jan 2018 12:06:39 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Proc-Report-add-headline-with-values-of-order-variable/m-p/428755#M105875</guid>
      <dc:creator>meki77</dc:creator>
      <dc:date>2018-01-18T12:06:39Z</dc:date>
    </item>
    <item>
      <title>Re: Proc Report - add headline with values of order variable</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Proc-Report-add-headline-with-values-of-order-variable/m-p/428759#M105877</link>
      <description>&lt;P&gt;If its a format then maybe (again not tested):&lt;/P&gt;
&lt;PRE class="  language-sas"&gt;&lt;CODE class="  language-sas"&gt;&lt;SPAN class="token keyword"&gt;compute&lt;/SPAN&gt; before studytype&lt;SPAN class="token punctuation"&gt;;&lt;/SPAN&gt;
  line&lt;SPAN class="token string"&gt;''&lt;/SPAN&gt;&lt;SPAN class="token punctuation"&gt;;&lt;/SPAN&gt;  &lt;BR /&gt;  line studytype myfmt.&lt;SPAN class="token punctuation"&gt;;&lt;BR /&gt;&lt;/SPAN&gt;/* Or for character */&lt;BR /&gt;  line studytpe $myfmt.;
&lt;SPAN class="token keyword"&gt;endcomp&lt;/SPAN&gt;&lt;SPAN class="token punctuation"&gt;;&lt;/SPAN&gt;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;Obviously replace the myfmt with the actual name of your format.&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 18 Jan 2018 12:24:36 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Proc-Report-add-headline-with-values-of-order-variable/m-p/428759#M105877</guid>
      <dc:creator>RW9</dc:creator>
      <dc:date>2018-01-18T12:24:36Z</dc:date>
    </item>
    <item>
      <title>Re: Proc Report - add headline with values of order variable</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Proc-Report-add-headline-with-values-of-order-variable/m-p/428761#M105878</link>
      <description>compute before studytype;
line'';
line @1 studytype $8. ;
endcomp;</description>
      <pubDate>Thu, 18 Jan 2018 12:28:30 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Proc-Report-add-headline-with-values-of-order-variable/m-p/428761#M105878</guid>
      <dc:creator>Ksharp</dc:creator>
      <dc:date>2018-01-18T12:28:30Z</dc:date>
    </item>
  </channel>
</rss>

