<?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: style of grouped columns in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/style-of-grouped-columns/m-p/855952#M338232</link>
    <description>&lt;P&gt;Without example data of what you have and the rules involved for exactly how to "colorize them differently" there really isn't any way to tell if dummy variables are needed.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;So please describe what coloring you expect.&lt;/P&gt;</description>
    <pubDate>Fri, 27 Jan 2023 14:05:27 GMT</pubDate>
    <dc:creator>ballardw</dc:creator>
    <dc:date>2023-01-27T14:05:27Z</dc:date>
    <item>
      <title>style of grouped columns</title>
      <link>https://communities.sas.com/t5/SAS-Programming/style-of-grouped-columns/m-p/855921#M338220</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;
&lt;P&gt;I want to group some columns as "test1" and "test" and want to colorize them differently and the font should be bold. But which is the easiest way to do that? Via google I found that: &lt;A href="https://communities.sas.com/t5/SAS-Programming/proc-report-making-spanning-header-a-different-color/td-p/697169" target="_blank"&gt;https://communities.sas.com/t5/SAS-Programming/proc-report-making-spanning-header-a-different-color/td-p/697169&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;But are dummy-variables really necessary? Is this way the only and best way to do that? That sounds pretty complicated to me.&lt;/P&gt;
&lt;P&gt;Thank you!&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;proc report data=shoes(obs=3);&lt;BR /&gt;column ("test1"(region subsidiary)) ("test2"(product sales));&lt;BR /&gt;define region / display;&lt;BR /&gt;define subsidiary / display;&lt;BR /&gt;define product / display;&lt;BR /&gt;define sales / display;&lt;BR /&gt;run;
&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 27 Jan 2023 11:39:53 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/style-of-grouped-columns/m-p/855921#M338220</guid>
      <dc:creator>Konkordanz</dc:creator>
      <dc:date>2023-01-27T11:39:53Z</dc:date>
    </item>
    <item>
      <title>Re: style of grouped columns</title>
      <link>https://communities.sas.com/t5/SAS-Programming/style-of-grouped-columns/m-p/855952#M338232</link>
      <description>&lt;P&gt;Without example data of what you have and the rules involved for exactly how to "colorize them differently" there really isn't any way to tell if dummy variables are needed.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;So please describe what coloring you expect.&lt;/P&gt;</description>
      <pubDate>Fri, 27 Jan 2023 14:05:27 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/style-of-grouped-columns/m-p/855952#M338232</guid>
      <dc:creator>ballardw</dc:creator>
      <dc:date>2023-01-27T14:05:27Z</dc:date>
    </item>
    <item>
      <title>Re: style of grouped columns</title>
      <link>https://communities.sas.com/t5/SAS-Programming/style-of-grouped-columns/m-p/856053#M338259</link>
      <description>&lt;P&gt;Hi:&lt;/P&gt;
&lt;P&gt;&amp;nbsp; I'm not entirely clear what you mean by grouping and colorizing. As you show them now, your test1 and test2 are just spanning headers so without some advanced technique, you only have one way to alter the style attributes of those header cells, as shown in #2 and #3.:&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Cynthia_sas_0-1674853500958.png" style="width: 400px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/79887i2E0864EE351C29D5/image-size/medium?v=v2&amp;amp;px=400" role="button" title="Cynthia_sas_0-1674853500958.png" alt="Cynthia_sas_0-1674853500958.png" /&gt;&lt;/span&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Cynthia_sas_1-1674853568521.png" style="width: 400px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/79888iF837B7184F3F5F54/image-size/medium?v=v2&amp;amp;px=400" role="button" title="Cynthia_sas_1-1674853568521.png" alt="Cynthia_sas_1-1674853568521.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;But if you want the headers for test1 and test2 to be the SAME as the other headers and columns, then you have to either use dummy variables (#4) or a technique like the user defined format in #5:&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Cynthia_sas_2-1674853636309.png" style="width: 400px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/79889iDF8418CA5684EB2C/image-size/medium?v=v2&amp;amp;px=400" role="button" title="Cynthia_sas_2-1674853636309.png" alt="Cynthia_sas_2-1674853636309.png" /&gt;&lt;/span&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Cynthia_sas_3-1674853660028.png" style="width: 400px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/79890iF00F42FADFA105D0/image-size/medium?v=v2&amp;amp;px=400" role="button" title="Cynthia_sas_3-1674853660028.png" alt="Cynthia_sas_3-1674853660028.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp; Since it is not entirely clear to me what you are trying to do, this is all I can envision at this point.&lt;/P&gt;
&lt;P&gt;Cynthia&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 27 Jan 2023 21:08:22 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/style-of-grouped-columns/m-p/856053#M338259</guid>
      <dc:creator>Cynthia_sas</dc:creator>
      <dc:date>2023-01-27T21:08:22Z</dc:date>
    </item>
    <item>
      <title>Re: style of grouped columns</title>
      <link>https://communities.sas.com/t5/SAS-Programming/style-of-grouped-columns/m-p/856178#M338317</link>
      <description>&lt;P&gt;Right, sorry, I didnt set the dataset-step correctly. Thats the sample:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;proc report data=sashelp.shoes(obs=3);
    column ("test1"(region subsidiary)) ("test2"(product sales));
	define region / display;
	define subsidiary / display;
	define product / display;
	define sales / display;
 run;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;What I want is to colorize the spanning headers "test1" and "test2" differently. For example:&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Konkordanz_0-1675059578326.png" style="width: 400px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/79903i1C17600AF87740B6/image-size/medium?v=v2&amp;amp;px=400" role="button" title="Konkordanz_0-1675059578326.png" alt="Konkordanz_0-1675059578326.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 30 Jan 2023 06:19:50 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/style-of-grouped-columns/m-p/856178#M338317</guid>
      <dc:creator>Konkordanz</dc:creator>
      <dc:date>2023-01-30T06:19:50Z</dc:date>
    </item>
    <item>
      <title>Re: style of grouped columns</title>
      <link>https://communities.sas.com/t5/SAS-Programming/style-of-grouped-columns/m-p/856189#M338320</link>
      <description>&lt;P&gt;Thx for your answer. What I want is different colored spanning header. Something like that:&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Konkordanz_0-1675061529666.png" style="width: 400px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/79904iDBC2D50C4B0DC46B/image-size/medium?v=v2&amp;amp;px=400" role="button" title="Konkordanz_0-1675061529666.png" alt="Konkordanz_0-1675061529666.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I tried a little bit around and the current result is this code with a strange result:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;proc format;
	value $test
	"test1" = 'lightblue'
	"test2" = "grey"
	"Region" = "red";
run;	

/*=================================================================================================*/
/*Output-Optionen*/
ods excel file="." ;
/*=================================================================================================*/
 
proc report data=sashelp.shoes(obs=3) style(header)=[background=$test.];
    column ("test1"(region subsidiary)) ("test2"(product sales));
	define region / display;
	define subsidiary / display;
	define product / display;
	define sales / display;
 run;
&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;After running this code SAS shows this result:&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Konkordanz_1-1675061753425.png" style="width: 400px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/79905i8ED43F84C77E7133/image-size/medium?v=v2&amp;amp;px=400" role="button" title="Konkordanz_1-1675061753425.png" alt="Konkordanz_1-1675061753425.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Right, no colors. But now I open it with Excel...&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Konkordanz_3-1675061864297.png" style="width: 400px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/79907i595F3F86C77E8EEA/image-size/medium?v=v2&amp;amp;px=400" role="button" title="Konkordanz_3-1675061864297.png" alt="Konkordanz_3-1675061864297.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;...and in Excel it shows the result I want:&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Konkordanz_4-1675061891561.png" style="width: 400px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/79908i2893DA07CA355C85/image-size/medium?v=v2&amp;amp;px=400" role="button" title="Konkordanz_4-1675061891561.png" alt="Konkordanz_4-1675061891561.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Now my spanning headers are colored differently and I got the result without dummyvariables. But only within the excel output. Do you see a problem in my code?&lt;/P&gt;</description>
      <pubDate>Mon, 30 Jan 2023 07:01:00 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/style-of-grouped-columns/m-p/856189#M338320</guid>
      <dc:creator>Konkordanz</dc:creator>
      <dc:date>2023-01-30T07:01:00Z</dc:date>
    </item>
    <item>
      <title>Re: style of grouped columns</title>
      <link>https://communities.sas.com/t5/SAS-Programming/style-of-grouped-columns/m-p/856192#M338321</link>
      <description>&lt;P&gt;No problems. When I run your code on SAS on Demand without the Excel destination, I get this result:&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Bildschirmfoto 2023-01-30 um 10.04.43.png" style="width: 400px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/79909iA207E8957B535132/image-size/medium?v=v2&amp;amp;px=400" role="button" title="Bildschirmfoto 2023-01-30 um 10.04.43.png" alt="Bildschirmfoto 2023-01-30 um 10.04.43.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;Which main ODS destination do you use?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 30 Jan 2023 09:08:35 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/style-of-grouped-columns/m-p/856192#M338321</guid>
      <dc:creator>Kurt_Bremser</dc:creator>
      <dc:date>2023-01-30T09:08:35Z</dc:date>
    </item>
    <item>
      <title>Re: style of grouped columns</title>
      <link>https://communities.sas.com/t5/SAS-Programming/style-of-grouped-columns/m-p/856193#M338322</link>
      <description>&lt;P&gt;Sorry, but what means "main ODS destination"?&lt;/P&gt;</description>
      <pubDate>Mon, 30 Jan 2023 09:12:05 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/style-of-grouped-columns/m-p/856193#M338322</guid>
      <dc:creator>Konkordanz</dc:creator>
      <dc:date>2023-01-30T09:12:05Z</dc:date>
    </item>
    <item>
      <title>Re: style of grouped columns</title>
      <link>https://communities.sas.com/t5/SAS-Programming/style-of-grouped-columns/m-p/856198#M338325</link>
      <description>&lt;P&gt;It's what you select in the Results settings of your SAS interface (SAS Studio or Enterprise Guide). The default setting in SAS On Demand is HTML (in particular, HTML5).&lt;/P&gt;</description>
      <pubDate>Mon, 30 Jan 2023 09:53:54 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/style-of-grouped-columns/m-p/856198#M338325</guid>
      <dc:creator>Kurt_Bremser</dc:creator>
      <dc:date>2023-01-30T09:53:54Z</dc:date>
    </item>
  </channel>
</rss>

