<?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: How to make a fancy PDF/EXCEL output in New SAS User</title>
    <link>https://communities.sas.com/t5/New-SAS-User/How-to-make-a-fancy-PDF-EXCEL-output/m-p/707372#M26498</link>
    <description>&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;data WORK.TEST;
  infile datalines delimiter=','; 
  input regionsnummer:12.  teststed:$84.  dato:date9. analysebeskrivelse:$564. 
        ventetid:12. ledigtid:$4.;
    format dato ddmmyyd8.;
datalines4;
1801,TescenterX,01DEC2020, Nære kontakter, 0.6, &amp;gt;10%
1802, TestcenterY, 01DEC2020, Nære kontakter,0.01 ,&amp;lt;10%
1803, TestcenterZ, 02DEC2020, Åbne testtilbud, 0.02,&amp;lt;10%
1801, TestcenterW, 03DEC2020,Åbne testtilbud ,0.7 ,&amp;gt;10%
1802, TestcenterYN, 04DEC2020,Åbne testtilbud,0.3 ,&amp;gt;10%
1802, TestcenterYX,05DEC2020,Nære kontakter,0.0006 ,&amp;lt;10%
1804, TestcenterYB, 01DEC2020, Åbne testtilbud,0.004 ,&amp;lt;10%
1803, TestcenterYV,02DEC2020, Åbne testtilbud, 0.002,&amp;lt;10%
;;;;

options mprint;
proc format;
    value pctf .=' ' low-&amp;lt;0.1='&amp;lt;10%' 0.1-high='&amp;gt;10%';
    value colorf .=white low-&amp;lt;0.1=lightmoderatered 0.1-high=lightmoderategreen;
run;

%macro many_col;
    proc sql noprint;
        select count(distinct dato) into :ncols from test;
    quit;
    %put &amp;amp;=ncols;
	proc report data=test;
	    columns regionsnummer teststed dato,ventetid;
	    define regionsnummer/group;
	    define teststed/group;
	    define dato/across;
	    define ventetid/sum format=pctf5. ' ';
	    compute ventetid;
	          %do i=1 %to &amp;amp;ncols;
	               call define("_c%eval(&amp;amp;i+2)_",'style','style={background=colorf.}');
	          %end;
	      endcompute;
	run;
%mend;

%many_col&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;Is it possible to devide this report further, so in my excel ouput I will have several sheets based on region. So each sheet will only be one region?&lt;/P&gt;</description>
    <pubDate>Mon, 21 Dec 2020 07:58:00 GMT</pubDate>
    <dc:creator>mmea</dc:creator>
    <dc:date>2020-12-21T07:58:00Z</dc:date>
    <item>
      <title>How to make a fancy PDF/EXCEL output</title>
      <link>https://communities.sas.com/t5/New-SAS-User/How-to-make-a-fancy-PDF-EXCEL-output/m-p/707161#M26450</link>
      <description>&lt;P&gt;Hi i have a data set looking like this:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I made a proc report with the desired variables from this data set looking like this:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;The code do not giveme the out put that I want. I wish to make something like this:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;TABLE&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD&gt;&lt;P&gt;&lt;STRONG&gt;&amp;nbsp;Region X&lt;/STRONG&gt;&lt;/P&gt;&lt;/TD&gt;&lt;TD&gt;&lt;P&gt;&lt;STRONG&gt;18/12&lt;/STRONG&gt;&lt;/P&gt;&lt;/TD&gt;&lt;TD&gt;&lt;P&gt;&lt;STRONG&gt;19/12&lt;/STRONG&gt;&lt;/P&gt;&lt;/TD&gt;&lt;TD&gt;&lt;P&gt;&lt;STRONG&gt;20/12&lt;/STRONG&gt;&lt;/P&gt;&lt;/TD&gt;&lt;TD&gt;&lt;P&gt;&lt;STRONG&gt;21/12&lt;/STRONG&gt;&lt;/P&gt;&lt;/TD&gt;&lt;TD&gt;&lt;P&gt;&lt;STRONG&gt;21/12&lt;/STRONG&gt;&lt;/P&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;&lt;P&gt;&lt;STRONG&gt;Testcenter X&lt;/STRONG&gt;&lt;/P&gt;&lt;/TD&gt;&lt;TD&gt;&lt;DIV class="mceNonEditable lia-copypaste-placeholder"&gt;&amp;nbsp;&lt;/DIV&gt;&lt;P&gt;green&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;/TD&gt;&lt;TD&gt;&lt;P&gt;red&lt;/P&gt;&lt;DIV class="mceNonEditable lia-copypaste-placeholder"&gt;&amp;nbsp;&lt;/DIV&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;/TD&gt;&lt;TD&gt;&lt;DIV class="mceNonEditable lia-copypaste-placeholder"&gt;&amp;nbsp;&lt;/DIV&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;/TD&gt;&lt;TD&gt;&lt;DIV class="mceNonEditable lia-copypaste-placeholder"&gt;&amp;nbsp;&lt;/DIV&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;/TD&gt;&lt;TD&gt;&lt;DIV class="mceNonEditable lia-copypaste-placeholder"&gt;&amp;nbsp;&lt;/DIV&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;&lt;P&gt;&lt;STRONG&gt;Testcenter Y&lt;/STRONG&gt;&lt;/P&gt;&lt;/TD&gt;&lt;TD&gt;&lt;DIV class="mceNonEditable lia-copypaste-placeholder"&gt;&amp;nbsp;&lt;/DIV&gt;&lt;P&gt;green&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;/TD&gt;&lt;TD&gt;&lt;DIV class="mceNonEditable lia-copypaste-placeholder"&gt;&amp;nbsp;&lt;/DIV&gt;&lt;P&gt;red&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;/TD&gt;&lt;TD&gt;&lt;DIV class="mceNonEditable lia-copypaste-placeholder"&gt;&amp;nbsp;&lt;/DIV&gt;&lt;P&gt;green&lt;/P&gt;&lt;/TD&gt;&lt;TD&gt;&lt;DIV class="mceNonEditable lia-copypaste-placeholder"&gt;&amp;nbsp;&lt;/DIV&gt;&lt;P&gt;green&lt;/P&gt;&lt;/TD&gt;&lt;TD&gt;&lt;BR /&gt;&lt;P&gt;green&lt;/P&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;&lt;P&gt;&lt;STRONG&gt;Testcenter Z&lt;/STRONG&gt;&lt;/P&gt;&lt;/TD&gt;&lt;TD&gt;&lt;BR /&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;/TD&gt;&lt;TD&gt;&lt;BR /&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;/TD&gt;&lt;TD&gt;&lt;BR /&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;/TD&gt;&lt;TD&gt;&lt;BR /&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;/TD&gt;&lt;TD&gt;&lt;BR /&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;A table for every region from the variable "Regionsnummer" and under that&amp;nbsp;&lt;/P&gt;&lt;P&gt;will be testcenter X Y Z which is based on the variable "Teststed". the dates are based on the variable "Dato" and I want the format with only day and month. The values in the boxes represent the "Ledigtid" so "&amp;gt;10%" is green and "&amp;lt;10%" is red. The boxes should be colored here.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;is that possible. Ive tried everything..&lt;/P&gt;&lt;P&gt;Is it possible to output this in Excel?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 29 Dec 2020 16:24:40 GMT</pubDate>
      <guid>https://communities.sas.com/t5/New-SAS-User/How-to-make-a-fancy-PDF-EXCEL-output/m-p/707161#M26450</guid>
      <dc:creator>mmea</dc:creator>
      <dc:date>2020-12-29T16:24:40Z</dc:date>
    </item>
    <item>
      <title>Re: How to make a fancy PDF/EXCEL output</title>
      <link>https://communities.sas.com/t5/New-SAS-User/How-to-make-a-fancy-PDF-EXCEL-output/m-p/707162#M26451</link>
      <description>&lt;P&gt;Yes, all this is possible, but without having (a portion of) your data available, its difficult for me to write such code.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Please provide (a portion of) the data according to these instructions: &lt;A href="https://blogs.sas.com/content/sastraining/2016/03/11/jedi-sas-tricks-data-to-data-step-macro/" target="_blank" rel="noopener"&gt;https://blogs.sas.com/content/sastraining/2016/03/11/jedi-sas-tricks-data-to-data-step-macro/&lt;/A&gt;&amp;nbsp;(Do not provide data as screen captures or attachments)&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;You would be wise to leave your dates as true SAS dates, and display dates as day-month-year instead of leaving out the year. If that's absolutely critical that you leave out the year in the report, then you are probably still better off using true SAS dates, and creating a custom format to display them as day-month.&lt;/P&gt;</description>
      <pubDate>Sat, 19 Dec 2020 12:36:45 GMT</pubDate>
      <guid>https://communities.sas.com/t5/New-SAS-User/How-to-make-a-fancy-PDF-EXCEL-output/m-p/707162#M26451</guid>
      <dc:creator>PaigeMiller</dc:creator>
      <dc:date>2020-12-19T12:36:45Z</dc:date>
    </item>
    <item>
      <title>Re: How to make a fancy PDF/EXCEL output</title>
      <link>https://communities.sas.com/t5/New-SAS-User/How-to-make-a-fancy-PDF-EXCEL-output/m-p/707163#M26452</link>
      <description>&lt;P&gt;This i my data:&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;proc import datafile = "F:\Grupper\DIAS\KID\devel\MMEA\SSI kapacitet Samfundsspor - 2020-12-15.csv" dbms=csv
out= work.vente replace;
delimiter = ";";
guessingrows=3000;
run;

proc sql;
create table ventetider as
select distinct regionsnummer, teststed, dato, analysebeskrivelse, sum(kapacitet)as kapacitet, sum(booket_kapacitet) as booket_kapacitet
from ventetider
group by dato, teststed, analysebeskrivelse
order by dato, teststed;
quit;

&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;then i make a new column to get the "ledigtid"&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;data pdf1;
set pdf1;
ventetid = (kapacitet - booket_kapacitet)/kapacitet;
if ventetid &amp;gt;= 0.1 then farve = 1;
if ventetid &amp;lt; 0.1 then farve = 2;
if ventetid = . then farve = 3;
if ventetid &amp;gt;= 0.1 then Ledigtid = "&amp;gt;10%";
if ventetid &amp;lt; 0.1 then Ledigtid = "&amp;lt;10%";
run;

proc sort data= pdf1;
by dato;
run;&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;my data is big but here is some data lines, just one line:&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;data WORK.TEST;
  infile datalines dsd truncover;
  input Make:BEST12. regionsnummer:$84. teststed:DDMMYY10.. dato:$564. analysebeskrivelse:BEST12.
        ventetid:$4. ledigtid;
datalines4;
1801,Tescenter X,"12/1/2020", 0.6, "&amp;gt;10%";
proc print;
run;&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Sat, 19 Dec 2020 12:51:34 GMT</pubDate>
      <guid>https://communities.sas.com/t5/New-SAS-User/How-to-make-a-fancy-PDF-EXCEL-output/m-p/707163#M26452</guid>
      <dc:creator>mmea</dc:creator>
      <dc:date>2020-12-19T12:51:34Z</dc:date>
    </item>
    <item>
      <title>Re: How to make a fancy PDF/EXCEL output</title>
      <link>https://communities.sas.com/t5/New-SAS-User/How-to-make-a-fancy-PDF-EXCEL-output/m-p/707164#M26453</link>
      <description>&lt;P&gt;Sorry I made the data lines wrong&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;data WORK.TEST;
  infile datalines dsd truncover;
  input regionsnummer:BEST12.  teststed:$84.  dato: DDMMYY10. analysebeskrivelse:$564. 
        ventetid:BEST12.  ledigtid:$4.;
datalines4;
1801,Tescenter X,"12/1/2020", 0.6, "&amp;gt;10%";
proc print;
run;&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Sat, 19 Dec 2020 12:54:21 GMT</pubDate>
      <guid>https://communities.sas.com/t5/New-SAS-User/How-to-make-a-fancy-PDF-EXCEL-output/m-p/707164#M26453</guid>
      <dc:creator>mmea</dc:creator>
      <dc:date>2020-12-19T12:54:21Z</dc:date>
    </item>
    <item>
      <title>Re: How to make a fancy PDF/EXCEL output</title>
      <link>https://communities.sas.com/t5/New-SAS-User/How-to-make-a-fancy-PDF-EXCEL-output/m-p/707165#M26454</link>
      <description>&lt;P&gt;I can't program a report from data that has only one record. Please make a realistic subset of your data that would be good to create a report from.&lt;/P&gt;</description>
      <pubDate>Sat, 19 Dec 2020 12:54:33 GMT</pubDate>
      <guid>https://communities.sas.com/t5/New-SAS-User/How-to-make-a-fancy-PDF-EXCEL-output/m-p/707165#M26454</guid>
      <dc:creator>PaigeMiller</dc:creator>
      <dc:date>2020-12-19T12:54:33Z</dc:date>
    </item>
    <item>
      <title>Re: How to make a fancy PDF/EXCEL output</title>
      <link>https://communities.sas.com/t5/New-SAS-User/How-to-make-a-fancy-PDF-EXCEL-output/m-p/707167#M26455</link>
      <description>&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;data WORK.TEST;
  infile datalines dsd truncover;
  input regionsnummer:BEST12.  teststed:$84.  dato: DDMMYY10. analysebeskrivelse:$564. 
        ventetid:BEST12.  ledigtid:$4.;
datalines4;
1801,Tescenter X,"12/01/2020", 0.6, "&amp;gt;10%"
1802, Testcenter Y, "12/02/2020", 0.01, "&amp;lt;10%"
1803, Testcenter Z "12/03/2020", 0.02, "&amp;lt;10%"
1801, Testcenter W "12/04/2020", 0.1, "&amp;gt;10%"
1802, Testcenter Y-N, "12/05/2020", 0.2, "&amp;gt;10%"
1802, Testcenter YX "12/13/2020", 0.01, "&amp;lt;10%"
1804, Testcenter YB, "12/15/2020", 0.01, "&amp;lt;10%"
1803, Testcenter Y,V "12/20/2020", 0.01, "&amp;lt;10%";
proc print;
run;&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;is that fine?&lt;/P&gt;</description>
      <pubDate>Sat, 19 Dec 2020 12:57:50 GMT</pubDate>
      <guid>https://communities.sas.com/t5/New-SAS-User/How-to-make-a-fancy-PDF-EXCEL-output/m-p/707167#M26455</guid>
      <dc:creator>mmea</dc:creator>
      <dc:date>2020-12-19T12:57:50Z</dc:date>
    </item>
    <item>
      <title>Re: How to make a fancy PDF/EXCEL output</title>
      <link>https://communities.sas.com/t5/New-SAS-User/How-to-make-a-fancy-PDF-EXCEL-output/m-p/707168#M26456</link>
      <description>&lt;PRE class="language-sas"&gt;&lt;CODE&gt;data WORK.TEST;
  infile datalines dsd truncover;
  input regionsnummer:BEST12.  teststed:$84.  dato: DDMMYY10. analysebeskrivelse:$564. 
        ventetid:BEST12.  ledigtid:$4.;
datalines4;
1801,Tescenter X,"12/01/2020", 0.6, "&amp;gt;10%"
1802, Testcenter Y, "12/02/2020", 0.01, "&amp;lt;10%"
1803, Testcenter Z "12/03/2020", 0.02, "&amp;lt;10%"
1801, Testcenter W "12/04/2020", 0.1, "&amp;gt;10%"
1802, Testcenter Y-N, "12/05/2020", 0.2, "&amp;gt;10%"
1802, Testcenter YX "12/13/2020", 0.01, "&amp;lt;10%"
1804, Testcenter YB, "12/15/2020", 0.01, "&amp;lt;10%"
1803, Testcenter Y,V "12/20/2020", 0.01, "&amp;lt;10%";
proc print;
run;&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;is that fine?&lt;/P&gt;</description>
      <pubDate>Sat, 19 Dec 2020 12:58:14 GMT</pubDate>
      <guid>https://communities.sas.com/t5/New-SAS-User/How-to-make-a-fancy-PDF-EXCEL-output/m-p/707168#M26456</guid>
      <dc:creator>mmea</dc:creator>
      <dc:date>2020-12-19T12:58:14Z</dc:date>
    </item>
    <item>
      <title>Re: How to make a fancy PDF/EXCEL output</title>
      <link>https://communities.sas.com/t5/New-SAS-User/How-to-make-a-fancy-PDF-EXCEL-output/m-p/707171#M26458</link>
      <description>&lt;P&gt;It's hard to know if this is fine, the code doesn't run, and I think you are missing a few commas and/or I think you have commas in the wrong places.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;So please clean this up. Make sure the code runs and gives the desired data set TEST.&lt;/P&gt;</description>
      <pubDate>Sat, 19 Dec 2020 13:38:54 GMT</pubDate>
      <guid>https://communities.sas.com/t5/New-SAS-User/How-to-make-a-fancy-PDF-EXCEL-output/m-p/707171#M26458</guid>
      <dc:creator>PaigeMiller</dc:creator>
      <dc:date>2020-12-19T13:38:54Z</dc:date>
    </item>
    <item>
      <title>Re: How to make a fancy PDF/EXCEL output</title>
      <link>https://communities.sas.com/t5/New-SAS-User/How-to-make-a-fancy-PDF-EXCEL-output/m-p/707172#M26459</link>
      <description>&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;data WORK.TEST;
  infile datalines delimiter=','; 
  input regionsnummer:12.  teststed:$84.  dato:date9. analysebeskrivelse:$564. 
        ventetid:12. ledigtid:$4.;
datalines4;
1801,TescenterX,01DEC2020, Nære kontakter, 0.6, &amp;gt;10%
1802, TestcenterY, 01DEC2020, Nære kontakter,0.01 ,&amp;lt;10%
1803, TestcenterZ, 02DEC2020, Åbne testtilbud, 0.02,&amp;lt;10%
1801, TestcenterW, 03DEC2020,Åbne testtilbud ,0.7 ,&amp;gt;10%
1802, TestcenterYN, 04DEC2020,Åbne testtilbud,0.3 ,&amp;gt;10%
1802, TestcenterYX,05DEC2020,Nære kontakter,0.0006 ,&amp;lt;10%
1804, TestcenterYB, 01DEC2020, Åbne testtilbud,0.004 ,&amp;lt;10%
1803, TestcenterYV,02DEC2020, Åbne testtilbud, 0.002,&amp;lt;10%
;;;;

proc print;
run;

&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Sat, 19 Dec 2020 13:57:05 GMT</pubDate>
      <guid>https://communities.sas.com/t5/New-SAS-User/How-to-make-a-fancy-PDF-EXCEL-output/m-p/707172#M26459</guid>
      <dc:creator>mmea</dc:creator>
      <dc:date>2020-12-19T13:57:05Z</dc:date>
    </item>
    <item>
      <title>Re: How to make a fancy PDF/EXCEL output</title>
      <link>https://communities.sas.com/t5/New-SAS-User/How-to-make-a-fancy-PDF-EXCEL-output/m-p/707185#M26460</link>
      <description>&lt;P&gt;I still made some minor changes to your WORK.TEST code&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;data WORK.TEST;
  infile datalines delimiter=','; 
  input regionsnummer:12.  teststed:$84.  dato:date9. analysebeskrivelse:$564. 
        ventetid:12. ledigtid:$4.;
    format dato ddmmyyd8.;
datalines4;
1801,TescenterX,01DEC2020, Nære kontakter, 0.6, &amp;gt;10%
1802, TestcenterY, 01DEC2020, Nære kontakter,0.01 ,&amp;lt;10%
1803, TestcenterZ, 02DEC2020, Åbne testtilbud, 0.02,&amp;lt;10%
1801, TestcenterW, 03DEC2020,Åbne testtilbud ,0.7 ,&amp;gt;10%
1802, TestcenterYN, 04DEC2020,Åbne testtilbud,0.3 ,&amp;gt;10%
1802, TestcenterYX,05DEC2020,Nære kontakter,0.0006 ,&amp;lt;10%
1804, TestcenterYB, 01DEC2020, Åbne testtilbud,0.004 ,&amp;lt;10%
1803, TestcenterYV,02DEC2020, Åbne testtilbud, 0.002,&amp;lt;10%
;;;;

proc format;
    value pctf .=' ' 0-&amp;lt;0.1='&amp;lt;10%' 0.1-high='&amp;gt;=10%';
    value colorf .=white 0-&amp;lt;0.1=lightmoderategreen 0.1-high=lightmoderatered;
run;
proc report data=test;
    columns regionsnummer teststed dato,ventetid;
    define regionsnummer/group;
    define teststed/group;
    define dato/across;
    define ventetid/sum format=pctf5.;
    compute ventetid;
          call define("_c3_",'style','style={background=colorf.}');
          call define("_c4_",'style','style={background=colorf.}');
          call define("_c5_",'style','style={background=colorf.}');
          call define("_c6_",'style','style={background=colorf.}');
          call define("_c7_",'style','style={background=colorf.}');
      endcompute;
run;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;If you have many different values of VENTETID, and it is impractical to write so many lines under COMPUTE VENTETID, then a macro can do this as well.&lt;/P&gt;</description>
      <pubDate>Sat, 19 Dec 2020 15:52:03 GMT</pubDate>
      <guid>https://communities.sas.com/t5/New-SAS-User/How-to-make-a-fancy-PDF-EXCEL-output/m-p/707185#M26460</guid>
      <dc:creator>PaigeMiller</dc:creator>
      <dc:date>2020-12-19T15:52:03Z</dc:date>
    </item>
    <item>
      <title>Re: How to make a fancy PDF/EXCEL output</title>
      <link>https://communities.sas.com/t5/New-SAS-User/How-to-make-a-fancy-PDF-EXCEL-output/m-p/707186#M26461</link>
      <description>&lt;P&gt;You may need to create a format for your dates, so you can use dato as an ACROSS variable with PRELOADFMT (to get the correct order, and have all days in the range in the report even if there's no data for one.&lt;/P&gt;
&lt;P&gt;If all datest are covered in the correct order, you can omit this and use a picture format that contains only day and month.&lt;/P&gt;
&lt;P&gt;regionsnummer and teststed will be GROUP variables; or you use regionsnummer as a BY variable.&lt;/P&gt;</description>
      <pubDate>Sat, 19 Dec 2020 15:59:57 GMT</pubDate>
      <guid>https://communities.sas.com/t5/New-SAS-User/How-to-make-a-fancy-PDF-EXCEL-output/m-p/707186#M26461</guid>
      <dc:creator>Kurt_Bremser</dc:creator>
      <dc:date>2020-12-19T15:59:57Z</dc:date>
    </item>
    <item>
      <title>Re: How to make a fancy PDF/EXCEL output</title>
      <link>https://communities.sas.com/t5/New-SAS-User/How-to-make-a-fancy-PDF-EXCEL-output/m-p/707192#M26462</link>
      <description>&lt;P&gt;Thank you!. It looks very good with the data I made for the example.&amp;nbsp;&lt;/P&gt;&lt;P&gt;In my real data i have over 5000 observations. How can a macro be used in this case?&lt;/P&gt;&lt;P&gt;I have no experience in SAS - so its hard for me to find this information&lt;/P&gt;</description>
      <pubDate>Sat, 19 Dec 2020 16:45:38 GMT</pubDate>
      <guid>https://communities.sas.com/t5/New-SAS-User/How-to-make-a-fancy-PDF-EXCEL-output/m-p/707192#M26462</guid>
      <dc:creator>mmea</dc:creator>
      <dc:date>2020-12-19T16:45:38Z</dc:date>
    </item>
    <item>
      <title>Re: How to make a fancy PDF/EXCEL output</title>
      <link>https://communities.sas.com/t5/New-SAS-User/How-to-make-a-fancy-PDF-EXCEL-output/m-p/707207#M26463</link>
      <description>&lt;BLOCKQUOTE&gt;&lt;HR /&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/353472"&gt;@mmea&lt;/a&gt;&amp;nbsp;wrote:&lt;BR /&gt;
&lt;P&gt;Thank you!. It looks very good with the data I made for the example.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;In my real data i have over 5000 observations. How can a macro be used in this case?&lt;/P&gt;
&lt;P&gt;I have no experience in SAS - so its hard for me to find this information&lt;/P&gt;
&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;Macro would be used for many columns, which come from many dates. Is that the situation you have? Number of observations is not relevant. How many dates are there? (Or don't you know until you get the data?)&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Also, can there be more than one observation for a specific combination of date/region/testcenter? If so, should the output have multiple rows for that combination of date/region/testcenter?&lt;/P&gt;</description>
      <pubDate>Sat, 19 Dec 2020 21:40:14 GMT</pubDate>
      <guid>https://communities.sas.com/t5/New-SAS-User/How-to-make-a-fancy-PDF-EXCEL-output/m-p/707207#M26463</guid>
      <dc:creator>PaigeMiller</dc:creator>
      <dc:date>2020-12-19T21:40:14Z</dc:date>
    </item>
    <item>
      <title>Re: How to make a fancy PDF/EXCEL output</title>
      <link>https://communities.sas.com/t5/New-SAS-User/How-to-make-a-fancy-PDF-EXCEL-output/m-p/707208#M26464</link>
      <description>There Will Always approximately be around 2 weeks of dates. I get new data everyday so there will always be new dates from the current date that I get the data.&lt;BR /&gt;&lt;BR /&gt;The output should give all combinations. There can be observations with same teststed but different values in other columns.&lt;BR /&gt;&lt;BR /&gt;Hope that can help.</description>
      <pubDate>Sat, 19 Dec 2020 21:47:14 GMT</pubDate>
      <guid>https://communities.sas.com/t5/New-SAS-User/How-to-make-a-fancy-PDF-EXCEL-output/m-p/707208#M26464</guid>
      <dc:creator>mmea</dc:creator>
      <dc:date>2020-12-19T21:47:14Z</dc:date>
    </item>
    <item>
      <title>Re: How to make a fancy PDF/EXCEL output</title>
      <link>https://communities.sas.com/t5/New-SAS-User/How-to-make-a-fancy-PDF-EXCEL-output/m-p/707217#M26467</link>
      <description>&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;%macro many_col;
    proc sql noprint;
        select distinct dato into :ncols from test;
    quit;
proc report data=test;
    columns regionsnummer teststed dato,ventetid;
    define regionsnummer/group;
    define teststed/group;
    define dato/across;
    define ventetid/sum format=pctf5.;
    compute ventetid;
          %do i=1 %to &amp;amp;ncols;
               call define("_c%eval(&amp;amp;i+2)_",'style','style={background=colorf.}');
          %end;
      endcompute;
run;
%mend;

%many_col&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Sat, 19 Dec 2020 22:29:50 GMT</pubDate>
      <guid>https://communities.sas.com/t5/New-SAS-User/How-to-make-a-fancy-PDF-EXCEL-output/m-p/707217#M26467</guid>
      <dc:creator>PaigeMiller</dc:creator>
      <dc:date>2020-12-19T22:29:50Z</dc:date>
    </item>
    <item>
      <title>Re: How to make a fancy PDF/EXCEL output</title>
      <link>https://communities.sas.com/t5/New-SAS-User/How-to-make-a-fancy-PDF-EXCEL-output/m-p/707272#M26482</link>
      <description>&lt;P&gt;Thank you for that.&lt;/P&gt;&lt;P&gt;I had a variable called Analysebeskrivelse in the datalines.&lt;/P&gt;&lt;P&gt;But I cannot see it in use in the proc report code?&lt;/P&gt;</description>
      <pubDate>Sun, 20 Dec 2020 17:56:34 GMT</pubDate>
      <guid>https://communities.sas.com/t5/New-SAS-User/How-to-make-a-fancy-PDF-EXCEL-output/m-p/707272#M26482</guid>
      <dc:creator>mmea</dc:creator>
      <dc:date>2020-12-20T17:56:34Z</dc:date>
    </item>
    <item>
      <title>Re: How to make a fancy PDF/EXCEL output</title>
      <link>https://communities.sas.com/t5/New-SAS-User/How-to-make-a-fancy-PDF-EXCEL-output/m-p/707275#M26484</link>
      <description>&lt;P&gt;I ran this code with my real dataset&lt;/P&gt;&lt;P&gt;It works an looks good. But the colors do not show in the fields for ventetid &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&lt;/P&gt;&lt;P&gt;What did i do wrong here?&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;%macro many_col;
    proc sql noprint;
        select distinct dato into :ncols from pdf1;
    quit;

proc format;
    value pctf .=' ' low-&amp;lt;0.1='&amp;lt;10%' 0.1-high='&amp;gt;10%';
    value colorf .=white 0-&amp;lt;0.1='Firebrick' 0.1-high='Steel';
run;
proc report data=pdf1;
    columns region teststed dato,ventetid;
    define region/group;
    define teststed/group;
    define dato/across;
    define ventetid/sum format=pctf5.;
    compute ventetid;
          %do i=1 %to &amp;amp;ncols;
               call define("_c%eval(&amp;amp;i+2)_",'style','style={background=colorf.}');
          %end;
      endcompute;
run;
%mend;

%many_col&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Sun, 20 Dec 2020 18:02:27 GMT</pubDate>
      <guid>https://communities.sas.com/t5/New-SAS-User/How-to-make-a-fancy-PDF-EXCEL-output/m-p/707275#M26484</guid>
      <dc:creator>mmea</dc:creator>
      <dc:date>2020-12-20T18:02:27Z</dc:date>
    </item>
    <item>
      <title>Re: How to make a fancy PDF/EXCEL output</title>
      <link>https://communities.sas.com/t5/New-SAS-User/How-to-make-a-fancy-PDF-EXCEL-output/m-p/707278#M26486</link>
      <description>&lt;P&gt;Alsothe ouput shows me the "ventetid " label under the dates. Can i remove that? And why doesnt it color the fields? Also a question, as i am very new in SAS: Can I divide "tested" further i specific names, so that "teststed" will have to different categories:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;%macro many_col;
    proc sql noprint;
        select distinct dato into :ncols from pdf1;
    quit;

proc format;
    value pctf .=' ' low-&amp;lt;0.1='&amp;lt;10%' 0.1-high='&amp;gt;10%';
    value colorf .=white low-&amp;lt;0.1=lightmoderatered 0.1-high=Steel;
run;
proc report data=pdf1;
    columns region teststed dato,ventetid;
    define region/group;
    define teststed/group;
    define dato/across format=ddmmyy10.;
    define ventetid/sum format=pctf5.;
    compute ventetid;
          %do i=1 %to &amp;amp;ncols;
               call define("_c%eval(&amp;amp;i+2)_",'style','style={background=colorf.}');
          %end;
      endcompute;
run;
%mend;

%many_col

&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 29 Dec 2020 16:25:25 GMT</pubDate>
      <guid>https://communities.sas.com/t5/New-SAS-User/How-to-make-a-fancy-PDF-EXCEL-output/m-p/707278#M26486</guid>
      <dc:creator>mmea</dc:creator>
      <dc:date>2020-12-29T16:25:25Z</dc:date>
    </item>
    <item>
      <title>Re: How to make a fancy PDF/EXCEL output</title>
      <link>https://communities.sas.com/t5/New-SAS-User/How-to-make-a-fancy-PDF-EXCEL-output/m-p/707293#M26489</link>
      <description>&lt;P&gt;Hi.&amp;nbsp;&lt;/P&gt;&lt;P&gt;I have the following code for a proc report.&amp;nbsp;&lt;/P&gt;&lt;P&gt;I have stated that I want some colors, but they do not show in the expected output.&amp;nbsp;&lt;/P&gt;&lt;P&gt;Also I have shown the ouput below - I want to remove the row with the "ventetid" labels - is that possible?&lt;/P&gt;&lt;PRE class="language-sas"&gt;&lt;CODE&gt;%macro many_col;
    proc sql noprint;
        select distinct dato into :ncols from pdf1;
    quit;
proc format;
    value pctf .=' ' low-&amp;lt;0.1='&amp;lt;10%' 0.1-high='&amp;gt;10%';
    value colorf .=white low-&amp;lt;0.1=lightmoderatered 0.1-high=Steel;
run;
proc report data=pdf1;
    columns region teststed dato, ventetid;
    define region/group;
    define teststed/group;
    define dato/across order=internal format= ddmmyyd10.;
    define ventetid/sum format=pctf5.;
    compute ventetid;
          %do i=1 %to &amp;amp;ncols;
               call define("_c%eval(&amp;amp;i+2)_",'style','style={background=colorf.}');
          %end;
      endcompute;
	  
run;
%mend;

%many_col&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Also is it possible in the proc report code to divide the variable "teststed" up in two other groups that will be based on the observations under "teststed" - so e.g. if "teststed" includes something with XXXX then put it in under a new label called "EXAMPLE" etc. So basically under each "region" i want two groups of variables with matching observations.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;hope it makes sense&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="mmea_1-1608493153559.png"&gt;&lt;img src="https://communities.sas.com/skins/images/A5C6DC92CC05C947CDD494E11D917965/responsive_peak/images/image_not_found.png" alt="mmea_1-1608493153559.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Sun, 20 Dec 2020 19:39:38 GMT</pubDate>
      <guid>https://communities.sas.com/t5/New-SAS-User/How-to-make-a-fancy-PDF-EXCEL-output/m-p/707293#M26489</guid>
      <dc:creator>mmea</dc:creator>
      <dc:date>2020-12-20T19:39:38Z</dc:date>
    </item>
    <item>
      <title>Re: How to make a fancy PDF/EXCEL output</title>
      <link>https://communities.sas.com/t5/New-SAS-User/How-to-make-a-fancy-PDF-EXCEL-output/m-p/707294#M26490</link>
      <description>&lt;P&gt;My mistake in PROC SQL. This works:&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;data WORK.TEST;
  infile datalines delimiter=','; 
  input regionsnummer:12.  teststed:$84.  dato:date9. analysebeskrivelse:$564. 
        ventetid:12. ledigtid:$4.;
    format dato ddmmyyd8.;
datalines4;
1801,TescenterX,01DEC2020, Nære kontakter, 0.6, &amp;gt;10%
1802, TestcenterY, 01DEC2020, Nære kontakter,0.01 ,&amp;lt;10%
1803, TestcenterZ, 02DEC2020, Åbne testtilbud, 0.02,&amp;lt;10%
1801, TestcenterW, 03DEC2020,Åbne testtilbud ,0.7 ,&amp;gt;10%
1802, TestcenterYN, 04DEC2020,Åbne testtilbud,0.3 ,&amp;gt;10%
1802, TestcenterYX,05DEC2020,Nære kontakter,0.0006 ,&amp;lt;10%
1804, TestcenterYB, 01DEC2020, Åbne testtilbud,0.004 ,&amp;lt;10%
1803, TestcenterYV,02DEC2020, Åbne testtilbud, 0.002,&amp;lt;10%
;;;;

options mprint;
proc format;
    value pctf .=' ' low-&amp;lt;0.1='&amp;lt;10%' 0.1-high='&amp;gt;10%';
    value colorf .=white low-&amp;lt;0.1=lightmoderatered 0.1-high=lightmoderategreen;
run;

%macro many_col;
    proc sql noprint;
        select count(distinct dato) into :ncols from test;
    quit;
    %put &amp;amp;=ncols;
	proc report data=test;
	    columns regionsnummer teststed dato,ventetid;
	    define regionsnummer/group;
	    define teststed/group;
	    define dato/across;
	    define ventetid/sum format=pctf5. ' ';
	    compute ventetid;
	          %do i=1 %to &amp;amp;ncols;
	               call define("_c%eval(&amp;amp;i+2)_",'style','style={background=colorf.}');
	          %end;
	      endcompute;
	run;
%mend;

%many_col&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;BLOCKQUOTE&gt;
&lt;P&gt;Also is it possible in the proc report code to divide the variable "teststed" up in two other groups that will be based on the observations under "teststed" - so e.g. if "teststed" includes something with XXXX then put it in under a new label called "EXAMPLE" etc. So basically under each "region" i want two groups of variables with matching observations.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;hope it makes sense&lt;/P&gt;
&lt;/BLOCKQUOTE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;No, it does not make sense. Show me an actual data set where you have this, and what the output table should look like.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Sun, 20 Dec 2020 19:43:47 GMT</pubDate>
      <guid>https://communities.sas.com/t5/New-SAS-User/How-to-make-a-fancy-PDF-EXCEL-output/m-p/707294#M26490</guid>
      <dc:creator>PaigeMiller</dc:creator>
      <dc:date>2020-12-20T19:43:47Z</dc:date>
    </item>
  </channel>
</rss>

