<?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 PROC TABULATE: Adding .PNG files &amp;amp;amp; colors to an output in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/PROC-TABULATE-Adding-PNG-files-amp-amp-colors-to-an-output/m-p/952376#M372222</link>
    <description>&lt;P&gt;I have the following code to create a report for a given data:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=""&gt;data cutepets;
    length pet $20;  
    input gender $ pet $ number_of_pets;
    cards;
    boy  cockatiel 1
    boy  turtle    3
    boy  rabbit    4
    girl cockatiel 2
    girl turtle    3
    girl rabbit    7
    ;
run;

title "Number of Cute Pets Owned by Families of 3rd Graders";
proc tabulate data=cutepets style=[just=center];
    class gender pet;
    var number_of_pets;

    table gender='Gender', 
          pet='Pet' * number_of_pets='# of Pets' * sum=' ' /
          box=' ' misstext='0';
run;&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;My output then looks like this:&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="Screenshot 2024-12-02 190633.png" style="width: 400px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/102651iE1AE0857A84D9665/image-size/medium?v=v2&amp;amp;px=400" role="button" title="Screenshot 2024-12-02 190633.png" alt="Screenshot 2024-12-02 190633.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;How can I color certain cells and add pictures of a cockatiel, rabbit, and turtle? Something like this:&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="Screenshot 2024-12-02 190811.png" style="width: 400px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/102652iD545BBA7DF5F4060/image-size/medium?v=v2&amp;amp;px=400" role="button" title="Screenshot 2024-12-02 190811.png" alt="Screenshot 2024-12-02 190811.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Can I just add to my proc tabulate to add the colors and the images? Also, how can I move the "# of pets" to the spot in the 2nd output?&lt;/P&gt;</description>
    <pubDate>Tue, 03 Dec 2024 03:11:29 GMT</pubDate>
    <dc:creator>unwashedhelimix</dc:creator>
    <dc:date>2024-12-03T03:11:29Z</dc:date>
    <item>
      <title>PROC TABULATE: Adding .PNG files &amp;amp; colors to an output</title>
      <link>https://communities.sas.com/t5/SAS-Programming/PROC-TABULATE-Adding-PNG-files-amp-amp-colors-to-an-output/m-p/952376#M372222</link>
      <description>&lt;P&gt;I have the following code to create a report for a given data:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=""&gt;data cutepets;
    length pet $20;  
    input gender $ pet $ number_of_pets;
    cards;
    boy  cockatiel 1
    boy  turtle    3
    boy  rabbit    4
    girl cockatiel 2
    girl turtle    3
    girl rabbit    7
    ;
run;

title "Number of Cute Pets Owned by Families of 3rd Graders";
proc tabulate data=cutepets style=[just=center];
    class gender pet;
    var number_of_pets;

    table gender='Gender', 
          pet='Pet' * number_of_pets='# of Pets' * sum=' ' /
          box=' ' misstext='0';
run;&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;My output then looks like this:&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="Screenshot 2024-12-02 190633.png" style="width: 400px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/102651iE1AE0857A84D9665/image-size/medium?v=v2&amp;amp;px=400" role="button" title="Screenshot 2024-12-02 190633.png" alt="Screenshot 2024-12-02 190633.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;How can I color certain cells and add pictures of a cockatiel, rabbit, and turtle? Something like this:&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="Screenshot 2024-12-02 190811.png" style="width: 400px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/102652iD545BBA7DF5F4060/image-size/medium?v=v2&amp;amp;px=400" role="button" title="Screenshot 2024-12-02 190811.png" alt="Screenshot 2024-12-02 190811.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Can I just add to my proc tabulate to add the colors and the images? Also, how can I move the "# of pets" to the spot in the 2nd output?&lt;/P&gt;</description>
      <pubDate>Tue, 03 Dec 2024 03:11:29 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/PROC-TABULATE-Adding-PNG-files-amp-amp-colors-to-an-output/m-p/952376#M372222</guid>
      <dc:creator>unwashedhelimix</dc:creator>
      <dc:date>2024-12-03T03:11:29Z</dc:date>
    </item>
    <item>
      <title>Re: PROC TABULATE: Adding .PNG files &amp;amp; colors to an output</title>
      <link>https://communities.sas.com/t5/SAS-Programming/PROC-TABULATE-Adding-PNG-files-amp-amp-colors-to-an-output/m-p/952385#M372229</link>
      <description>&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;data cutepets;
    length pet $20;  
    input gender $ pet $ number_of_pets;
    cards;
    boy  cockatiel 1
    boy  turtle    3
    boy  rabbit    4
    girl cockatiel 2
    girl turtle    3
    girl rabbit    7
    ;
run;


proc format;
value $ image(default=80)
'cockatiel'='c:\temp\a.png'
'turtle'='c:\temp\b.png'
'rabbit'='c:\temp\c.png'
;
run;


title "Number of Cute Pets Owned by Families of 3rd Graders";
proc tabulate data=cutepets style=[just=center ];
    class gender /style={background=blue color=white};
	class pet /style={background=pink color=white};
    classlev gender /style={background=purple color=white};
	classlev pet /style={background=green color=white postimage=$image80. };

    var number_of_pets;

    table gender='Gender', 
          pet='Pet'* number_of_pets='' * sum=' ' /
          box='# of Pets' misstext='0';
run;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Ksharp_0-1733208512263.png" style="width: 400px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/102654iD988ED8340B699A9/image-size/medium?v=v2&amp;amp;px=400" role="button" title="Ksharp_0-1733208512263.png" alt="Ksharp_0-1733208512263.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 03 Dec 2024 06:54:01 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/PROC-TABULATE-Adding-PNG-files-amp-amp-colors-to-an-output/m-p/952385#M372229</guid>
      <dc:creator>Ksharp</dc:creator>
      <dc:date>2024-12-03T06:54:01Z</dc:date>
    </item>
  </channel>
</rss>

