<?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 - Header text in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/PROC-REPORT-Header-text/m-p/812400#M320541</link>
    <description>" It's not clear to me what the  structure of your data is or why you're repeating var4, var5 and pct_tot in the column statement but with different headers. I don't see how the values will be different."&lt;BR /&gt;&lt;BR /&gt;Actually, i forgot to edit this part of the code. They are not supposed to be repeated variables but others variables which could be var6, var7, pct_tot2 (also defined in the DEFINE statement). &lt;BR /&gt;&lt;BR /&gt;Is all the code required to understand why can't i color a part of my header in red ?</description>
    <pubDate>Tue, 10 May 2022 13:45:39 GMT</pubDate>
    <dc:creator>elsfy</dc:creator>
    <dc:date>2022-05-10T13:45:39Z</dc:date>
    <item>
      <title>PROC REPORT - Header text</title>
      <link>https://communities.sas.com/t5/SAS-Programming/PROC-REPORT-Header-text/m-p/812153#M320416</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Doing a proc report i have some issues regarding the format of my output.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;So i did this but this is not exactly what i want :&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;proc report data = a ; 

column ( '^{style[color=red]Date}' ('Category of the product sold before the month' '^{style[color=red]Company n°1784}' var1 var2 ... ; 
... ; 
run ; &lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="isgnr_0-1652099754769.png" style="width: 400px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/71230i39929E69D95D4261/image-size/medium?v=v2&amp;amp;px=400" role="button" title="isgnr_0-1652099754769.png" alt="isgnr_0-1652099754769.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;Here "Company n°1784" is like a subheader of "Category of [...] month" but what i want is to display "Company n°1784" below&amp;nbsp;"Category of [...] month" but recognized in the same header in order to have this excel output :&amp;nbsp;&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="isgnr_2-1652100026669.png" style="width: 400px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/71232iE9C13202C281E29D/image-size/medium?v=v2&amp;amp;px=400" role="button" title="isgnr_2-1652100026669.png" alt="isgnr_2-1652100026669.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;So this was the first part of the problem.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Now, after that, i have another issue when exporting the output on an excel worksheet.&lt;/P&gt;
&lt;P&gt;Instead of displaying the header as shown above, it displays it like that on excel:&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="isgnr_3-1652100136575.png" style="width: 400px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/71233i18055B65F4994B68/image-size/medium?v=v2&amp;amp;px=400" role="button" title="isgnr_3-1652100136575.png" alt="isgnr_3-1652100136575.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;&lt;BR /&gt;(Yet, it is displayed correctly on the SAS report).&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Thanks&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 09 May 2022 12:43:15 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/PROC-REPORT-Header-text/m-p/812153#M320416</guid>
      <dc:creator>elsfy</dc:creator>
      <dc:date>2022-05-09T12:43:15Z</dc:date>
    </item>
    <item>
      <title>Re: PROC REPORT - Header text</title>
      <link>https://communities.sas.com/t5/SAS-Programming/PROC-REPORT-Header-text/m-p/812293#M320483</link>
      <description>&lt;P&gt;Why not put it all together and using split char ?&lt;/P&gt;
&lt;P&gt;Or&amp;nbsp;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/13549"&gt;@Cynthia_sas&lt;/a&gt;&amp;nbsp; could give you right answer.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;proc report &lt;FONT color="#FF0000"&gt;&lt;STRONG&gt;split='/'&lt;/STRONG&gt; &lt;/FONT&gt;&lt;BR /&gt;&lt;BR /&gt;('Category of the product sold before the month &lt;STRONG&gt;&lt;FONT color="#FF0000"&gt;  /&lt;/FONT&gt;  &lt;/STRONG&gt; ^{style[color=red]Company n°1784}'&lt;/PRE&gt;</description>
      <pubDate>Tue, 10 May 2022 03:55:43 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/PROC-REPORT-Header-text/m-p/812293#M320483</guid>
      <dc:creator>Ksharp</dc:creator>
      <dc:date>2022-05-10T03:55:43Z</dc:date>
    </item>
    <item>
      <title>Re: PROC REPORT - Header text</title>
      <link>https://communities.sas.com/t5/SAS-Programming/PROC-REPORT-Header-text/m-p/812338#M320509</link>
      <description>&lt;P&gt;Hi,&lt;BR /&gt;Thank you, now "Company n°1784" is under the other text.&lt;/P&gt;
&lt;P&gt;Do you know why it's not in red ? The code you shared is not putting "Company n°1784" in red.&lt;/P&gt;
&lt;P&gt;Also, i still have this problem below :&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="isgnr_0-1652175447685.png" style="width: 400px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/71261i229AD5FE3B6BB74F/image-size/medium?v=v2&amp;amp;px=400" role="button" title="isgnr_0-1652175447685.png" alt="isgnr_0-1652175447685.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 10 May 2022 09:37:36 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/PROC-REPORT-Header-text/m-p/812338#M320509</guid>
      <dc:creator>elsfy</dc:creator>
      <dc:date>2022-05-10T09:37:36Z</dc:date>
    </item>
    <item>
      <title>Re: PROC REPORT - Header text</title>
      <link>https://communities.sas.com/t5/SAS-Programming/PROC-REPORT-Header-text/m-p/812377#M320529</link>
      <description>Hi:&lt;BR /&gt;  In order to provide any suggestions, I would need to see more than 2 snippets of code in order to make suggestions. For example, ALL of the PROC REPORT code, including the column statement, define statements and any compute blocks. And, also useful would be the ODS statements showing which destination is being used for the Excel file. In addition, having some context or picture of the entire report (not just 1 header) would be useful.&lt;BR /&gt;Cynthia</description>
      <pubDate>Tue, 10 May 2022 12:29:37 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/PROC-REPORT-Header-text/m-p/812377#M320529</guid>
      <dc:creator>Cynthia_sas</dc:creator>
      <dc:date>2022-05-10T12:29:37Z</dc:date>
    </item>
    <item>
      <title>Re: PROC REPORT - Header text</title>
      <link>https://communities.sas.com/t5/SAS-Programming/PROC-REPORT-Header-text/m-p/812392#M320537</link>
      <description>&lt;P&gt;Hi,&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Hope this code helps. This is what i've done :&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;title color=red bcolor=red "xxxx" ; &lt;BR /&gt;ods excel file = "..../file.xlsx"&lt;BR /&gt;    options(sheet_interval='none' embedded_titles='yes' start_at='1,2' hidden_rows = '2') ; &lt;BR /&gt;ods listing;&lt;BR /&gt;ods escapechar = '^' ; &lt;BR /&gt;options missing=0 orientation=landscape center;&lt;BR /&gt;
proc report data = a split ='-' nowd headskip center &lt;BR /&gt;       style(header)={background=white borderwidth=1 bordercolor=black width=150 color=black just=c textalign=c} &lt;BR /&gt;       style(report)={borderwidth=1 bordercolor=black outputwidth=150 just=c}&lt;BR /&gt;       style(column)= {borderwidth=1 bordercolor=black just=r color=black tagattr='format:###,###,###,###,###0'}&lt;BR /&gt;       style(summary)= [just=c textalign=c];&lt;BR /&gt;
column ('^{style[color=red] Reporting}'  ('Category of the product (sold before the date) - ^{style[color=red] Company n°1784}'  var1 var2 var3 var4 var5 pct_tot&lt;BR /&gt;        ('Category of the product (sold before the date) - ^{style[color=red] Company n°2001}'  var4 var5 pct_tot)) &lt;BR /&gt;) ;
define var1 / group width=132;&lt;BR /&gt;define var2 / group ; &lt;BR /&gt;define var3 / group ; &lt;BR /&gt;define var4 / analysis sum '...€' style(column)=[borderrightwidth=2 borderrightcolor=black]; &lt;BR /&gt;define var5 / analysis sum '...€' ; &lt;BR /&gt;define pct_tot / computed style(column) = [tagattr = "format:#0.%"] ; &lt;BR /&gt;rbreak after / summarize style(summary) = {font_weight=bold background=lightgrey just=r} ; &lt;BR /&gt;&lt;BR /&gt;compute pct_tot ;&lt;BR /&gt;pct_tot = var4.sum/var5.sum ; &lt;BR /&gt;endcomp ; 
run ; &lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;This is what i get :&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="isgnr_0-1652187158297.png" style="width: 400px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/71263i4EDC16FDAB73214F/image-size/medium?v=v2&amp;amp;px=400" role="button" title="isgnr_0-1652187158297.png" alt="isgnr_0-1652187158297.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;Replacing the split symbol "/" with "-" helped me to get all the text&amp;nbsp;("Category [...] date)")&lt;SPAN&gt;&amp;nbsp;on the same line&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Now the only problem left is that i want "Company n°...." in red. Since it isn't a defined column i can't change it's style in the define statement (from what i know).&lt;/P&gt;
&lt;P&gt;PS:I am sorry if the code isn't very clear, i can't share everything due to confidentiality.&lt;/P&gt;</description>
      <pubDate>Tue, 10 May 2022 13:12:08 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/PROC-REPORT-Header-text/m-p/812392#M320537</guid>
      <dc:creator>elsfy</dc:creator>
      <dc:date>2022-05-10T13:12:08Z</dc:date>
    </item>
    <item>
      <title>Re: PROC REPORT - Header text</title>
      <link>https://communities.sas.com/t5/SAS-Programming/PROC-REPORT-Header-text/m-p/812396#M320539</link>
      <description>&lt;P&gt;Hi:&lt;/P&gt;
&lt;P&gt;&amp;nbsp; It's too bad you can't make some fake data to illustrate the issue. Without data, it's hard to make constructive suggestions. I've formatted your code and highlighted some inconsistencies:&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Cynthia_sas_0-1652189602755.png" style="width: 400px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/71265i9721152453F455FF/image-size/medium?v=v2&amp;amp;px=400" role="button" title="Cynthia_sas_0-1652189602755.png" alt="Cynthia_sas_0-1652189602755.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;You are mixing LISTING only options with ODS Style overrides. None of your ODS overrides for width have a unit of measure. It's not clear to me what the&amp;nbsp; structure of your data is or why you're repeating var4, var5 and pct_tot in the column statement but with different headers. I don't see how the values will be different.&lt;/P&gt;
&lt;P&gt;Cynthia&lt;/P&gt;</description>
      <pubDate>Tue, 10 May 2022 13:35:54 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/PROC-REPORT-Header-text/m-p/812396#M320539</guid>
      <dc:creator>Cynthia_sas</dc:creator>
      <dc:date>2022-05-10T13:35:54Z</dc:date>
    </item>
    <item>
      <title>Re: PROC REPORT - Header text</title>
      <link>https://communities.sas.com/t5/SAS-Programming/PROC-REPORT-Header-text/m-p/812400#M320541</link>
      <description>" It's not clear to me what the  structure of your data is or why you're repeating var4, var5 and pct_tot in the column statement but with different headers. I don't see how the values will be different."&lt;BR /&gt;&lt;BR /&gt;Actually, i forgot to edit this part of the code. They are not supposed to be repeated variables but others variables which could be var6, var7, pct_tot2 (also defined in the DEFINE statement). &lt;BR /&gt;&lt;BR /&gt;Is all the code required to understand why can't i color a part of my header in red ?</description>
      <pubDate>Tue, 10 May 2022 13:45:39 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/PROC-REPORT-Header-text/m-p/812400#M320541</guid>
      <dc:creator>elsfy</dc:creator>
      <dc:date>2022-05-10T13:45:39Z</dc:date>
    </item>
    <item>
      <title>Re: PROC REPORT - Header text</title>
      <link>https://communities.sas.com/t5/SAS-Programming/PROC-REPORT-Header-text/m-p/812485#M320580</link>
      <description>&lt;P&gt;Hi:&lt;/P&gt;
&lt;P&gt;&amp;nbsp; When I run your code with some fake data, the headers have some odd placement; but the header seems to be colored as you want&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Cynthia_sas_1-1652212343844.png" style="width: 400px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/71285i1A67A32719A9BA04/image-size/medium?v=v2&amp;amp;px=400" role="button" title="Cynthia_sas_1-1652212343844.png" alt="Cynthia_sas_1-1652212343844.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;I used this code running on a Windows system with 9.4M7:&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Cynthia_sas_2-1652212495411.png" style="width: 400px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/71286i88377ECA35DB1514/image-size/medium?v=v2&amp;amp;px=400" role="button" title="Cynthia_sas_2-1652212495411.png" alt="Cynthia_sas_2-1652212495411.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;If you want your spanning header for Company n°1784 to be in the blank box, then I think you need to move one of your ending parentheses so it is after pct_tot.&lt;/P&gt;
&lt;P&gt;&amp;nbsp; When I altered the column statement to move just one of the ending parentheses, I got these results:&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Cynthia_sas_3-1652213024337.png" style="width: 400px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/71287iBB400CFA5249B5B2/image-size/medium?v=v2&amp;amp;px=400" role="button" title="Cynthia_sas_3-1652213024337.png" alt="Cynthia_sas_3-1652213024337.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;Cynthia&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 10 May 2022 20:04:24 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/PROC-REPORT-Header-text/m-p/812485#M320580</guid>
      <dc:creator>Cynthia_sas</dc:creator>
      <dc:date>2022-05-10T20:04:24Z</dc:date>
    </item>
  </channel>
</rss>

