<?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 Report with 3 header lines in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/Report-with-3-header-lines/m-p/602683#M174513</link>
    <description>&lt;P&gt;I've a cross table result and my customer wish that the sum of amount (first line) columns shall stay on the top over the header (second line). The header shall have in the third line an description of the columns.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Any ideas ?&lt;/P&gt;</description>
    <pubDate>Fri, 08 Nov 2019 07:36:19 GMT</pubDate>
    <dc:creator>Sven4IBM</dc:creator>
    <dc:date>2019-11-08T07:36:19Z</dc:date>
    <item>
      <title>Report with 3 header lines</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Report-with-3-header-lines/m-p/602683#M174513</link>
      <description>&lt;P&gt;I've a cross table result and my customer wish that the sum of amount (first line) columns shall stay on the top over the header (second line). The header shall have in the third line an description of the columns.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Any ideas ?&lt;/P&gt;</description>
      <pubDate>Fri, 08 Nov 2019 07:36:19 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Report-with-3-header-lines/m-p/602683#M174513</guid>
      <dc:creator>Sven4IBM</dc:creator>
      <dc:date>2019-11-08T07:36:19Z</dc:date>
    </item>
    <item>
      <title>Re: Report with 3 header lines</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Report-with-3-header-lines/m-p/602758#M174548</link>
      <description>&lt;P&gt;Example starting data&lt;/P&gt;
&lt;P&gt;The code you currently use to create the table&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Describe or provide and example of what this should look like if you have more than one value for Kundennummer and/ or Name.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;If the values you show are actually calculated in a report procedure you may to do a separate step to summarize the data prior to the table creation to have the value for such a use.&lt;/P&gt;</description>
      <pubDate>Fri, 08 Nov 2019 15:57:17 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Report-with-3-header-lines/m-p/602758#M174548</guid>
      <dc:creator>ballardw</dc:creator>
      <dc:date>2019-11-08T15:57:17Z</dc:date>
    </item>
    <item>
      <title>Re: Report with 3 header lines</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Report-with-3-header-lines/m-p/603453#M174845</link>
      <description>&lt;P&gt;I've created a simple example. In the Attachement you find the result of my wish. The proc tabulate cannot work with many class variables. I would take the proc Report but I don't know how could program my result in the Excel sheet.&lt;/P&gt;&lt;P&gt;Line 1 shall stay the sum of the columns. In column G shall stay the sum of lines (E:F). The block H till J is the same like E till G but only in Euro.&lt;/P&gt;&lt;P&gt;At the End I Need an Excel file.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;DATA temp; infile cards delimiter=',';
input subject name $ number currency $ loan $ txt $ amount;
CARDS;
68832,Alice,100240,usd,046200,Nostro,175
68832,Alice,100250,eur,046200,Nostro,150
68832,Alice,100240,usd,046300,Nostro,275
68832,Alice,100250,eur,046300,Nostro,250
68834,Thomas,100340,usd,046300,Nostro,250
68834,Thomas,100350,eur,046300,Nostro,225
68835,Thomas,100340,usd,046300,Nostro,250
68835,Thomas,100350,eur,046300,Nostro,225
;
RUN;

PROC TABULATE
DATA=WORK.TEMP;	
	VAR amount;
	CLASS subject / ORDER=UNFORMATTED MISSING;
	CLASS name / ORDER=UNFORMATTED MISSING;
	CLASS number / ORDER=UNFORMATTED MISSING;
	CLASS currency / ORDER=UNFORMATTED MISSING;
	CLASS loan / ORDER=UNFORMATTED MISSING;
	CLASS txt / ORDER=UNFORMATTED MISSING;
	TABLE /* Zeilendimension */
ALL={LABEL="Summe (ALL)"}*
  Sum={LABEL=""} 
subject*
  name*
    number*
      currency*
        Sum={LABEL=""},
/* Spaltendimension */
loan={LABEL=""}*
  txt={LABEL=""}*
    amount={LABEL="OC"} 		;
	;
RUN;&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 12 Nov 2019 09:00:32 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Report-with-3-header-lines/m-p/603453#M174845</guid>
      <dc:creator>Sven4IBM</dc:creator>
      <dc:date>2019-11-12T09:00:32Z</dc:date>
    </item>
    <item>
      <title>Re: Report with 3 header lines</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Report-with-3-header-lines/m-p/603793#M174969</link>
      <description>&lt;P&gt;I've created a proc Report, but for 'Loan' i've got all 'txt' values. But I've only for one loan one txt.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;DATA temp; infile cards delimiter=',';
input subject name $ number currency $ loan $ txt $ amount;
CARDS;
68832,Alice,100240,usd,046200,Loro,175
68832,Alice,100250,eur,046200,Loro,150
68832,Alice,100240,usd,046300,Nostro,275
68832,Alice,100250,eur,046300,Nostro,250
68834,Thomas,100340,usd,046300,Nostro,250
68834,Thomas,100350,eur,046300,Nostro,225
68835,Thomas,100340,usd,046300,Nostro,250
68835,Thomas,100350,eur,046300,Nostro,225
;
RUN;

proc report data=WORK.temp
nowindows missing headline spanrows split='*'
;
	column subject name number currency loan, txt, amount
;

define subject / group display 'subject '
  style(header)={just=left BACKGROUND=#4F81BD}
  style(column)={font_face=Arial font_size=2};
define name / group display 'name'
  style(header)={just=left BACKGROUND=#4F81BD}
  style(column)={font_face=Arial font_size=2};
define number / group display 'number'
  style(header)={just=left BACKGROUND=#4F81BD}
  style(column)={font_face=Arial font_size=2};
define currency / group display 'currency'
  style(header)={just=left BACKGROUND=#4F81BD}
  style(column)={font_face=Arial font_size=2};
define loan / across ''
  style(header)={just=left BACKGROUND=#4F81BD}
  style(column)={font_face=Arial font_size=2};
define txt / across  ''
  style(header)={just=left BACKGROUND=#4F81BD}
  style(column)={font_face=Arial font_size=2};
define amount / 'Amount in OC'
  style(header)={just=left BACKGROUND=#4F81BD}
  style(column)={font_face=Arial font_size=2 TAGATTR='format:#,##0.00;[Red](#,##0.00);[Blue]0.00;'};
run;&lt;/PRE&gt;</description>
      <pubDate>Wed, 13 Nov 2019 08:37:53 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Report-with-3-header-lines/m-p/603793#M174969</guid>
      <dc:creator>Sven4IBM</dc:creator>
      <dc:date>2019-11-13T08:37:53Z</dc:date>
    </item>
    <item>
      <title>Re: Report with 3 header lines</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Report-with-3-header-lines/m-p/604399#M175231</link>
      <description>&lt;P&gt;I've found the Options. It is calling &lt;STRONG&gt;nozero&lt;/STRONG&gt;.&lt;/P&gt;&lt;PRE&gt;define txt / across nozero ''
  style(header)={just=left BACKGROUND=#4F81BD}
  style(column)={font_face=Arial font_size=2};&lt;/PRE&gt;&lt;P&gt;But I don't understand why I've got single rows instead sum of any Groups.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;The sum option has no effekt (define amount / sum).&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;DATA temp; infile cards delimiter=',';
input subject name $ number currency $ loan $ txt $ amount;
CARDS;
68832,Alice,100240,usd,046200,Loro,175
68832,Alice,100250,eur,046200,Loro,150
68832,Alice,100240,usd,046300,Nostro,275
68832,Alice,100250,eur,046300,Nostro,250
68834,Thomas,100340,usd,046300,Nostro,250
68834,Thomas,100350,eur,046300,Nostro,225
68835,Thomas,100340,usd,046300,Nostro,250
68835,Thomas,100350,eur,046300,Nostro,225
;
RUN;

proc report data=WORK.temp
nowindows missing headline spanrows split='*'
;
	column subject name number currency loan, txt, amount
;

define subject / group display 'subject '
  style(header)={just=left BACKGROUND=#4F81BD}
  style(column)={font_face=Arial font_size=2};
define name / group display 'name'
  style(header)={just=left BACKGROUND=#4F81BD}
  style(column)={font_face=Arial font_size=2};
define number / group display 'number'
  style(header)={just=left BACKGROUND=#4F81BD}
  style(column)={font_face=Arial font_size=2};
define currency / group display 'currency'
  style(header)={just=left BACKGROUND=#4F81BD}
  style(column)={font_face=Arial font_size=2};
define loan / across nozero ''
  style(header)={just=left BACKGROUND=#4F81BD}
  style(column)={font_face=Arial font_size=2};
define txt / across nozero ''
  style(header)={just=left BACKGROUND=#4F81BD}
  style(column)={font_face=Arial font_size=2};
define amount / sum 'Amount in OC'
  style(header)={just=left BACKGROUND=#4F81BD}
  style(column)={font_face=Arial font_size=2 TAGATTR='format:#,##0.00;[Red](#,##0.00);[Blue]0.00;'};
run;

PROC TABULATE
DATA=WORK.TEMP
	
	;
	
	VAR amount;
	CLASS subject /	ORDER=UNFORMATTED MISSING;
	CLASS name /	ORDER=UNFORMATTED MISSING;
	CLASS number /	ORDER=UNFORMATTED MISSING;
	CLASS currency /	ORDER=UNFORMATTED MISSING;
	CLASS loan /	ORDER=UNFORMATTED MISSING;
	CLASS txt /	ORDER=UNFORMATTED MISSING;
	TABLE /* Zeilendimension */
subject*
  name*
    number*
      currency,
/* Spaltendimension */
loan*
  txt*
    amount*
      Sum 		;
	;

RUN;&lt;/PRE&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Unbenannt.jpg" style="width: 385px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/33993iACBAB5CDC5FB65F6/image-size/large?v=v2&amp;amp;px=999" role="button" title="Unbenannt.jpg" alt="Unbenannt.jpg" /&gt;&lt;/span&gt;&lt;/P&gt;</description>
      <pubDate>Fri, 15 Nov 2019 08:01:50 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Report-with-3-header-lines/m-p/604399#M175231</guid>
      <dc:creator>Sven4IBM</dc:creator>
      <dc:date>2019-11-15T08:01:50Z</dc:date>
    </item>
  </channel>
</rss>

