<?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: create a report in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/create-a-report/m-p/651388#M195443</link>
    <description>&lt;P&gt;Thank you so much!&amp;nbsp;Is there a way to remove the gridlines?&lt;/P&gt;</description>
    <pubDate>Thu, 28 May 2020 14:36:45 GMT</pubDate>
    <dc:creator>Amy0223</dc:creator>
    <dc:date>2020-05-28T14:36:45Z</dc:date>
    <item>
      <title>create a report</title>
      <link>https://communities.sas.com/t5/SAS-Programming/create-a-report/m-p/651246#M195376</link>
      <description>&lt;P&gt;&lt;STRONG&gt;Hi, I need to create a report in a format like below using the given data but I'm new to this. Any sample codes or advice would be greatly appreciated!&lt;/STRONG&gt;&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Screen Shot 2020-05-27 at 2.10.35 PM.png" style="width: 558px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/40059i9C920DD155AB1245/image-size/large?v=v2&amp;amp;px=999" role="button" title="Screen Shot 2020-05-27 at 2.10.35 PM.png" alt="Screen Shot 2020-05-27 at 2.10.35 PM.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;Given data:&lt;/P&gt;
&lt;PRE&gt;LEADING CAUSES OF DEATH IN STATE OF TENNESSEE, ALL AGES	
TENNESSEE RESIDENT DATA, 2014-2017	
	
Leading Cause	Deaths
TOTAL DEATHS	268881
DISEASES OF HEART	62317
MALIGNANT NEOPLASMS	57083
CHRONIC LOWER RESPIRATORY DISEASES	17177
ACCIDENTS AND ADVERSE EFFECTS	16282
CEREBROVASCULAR DISEASE	13792
ALZHEIMER'S DISEASE	12552
DIABETES MELLITUS	7315
PNEUMONIA AND INFLUENZA	6503
NEPHRITIS,NEPHROTIC SYNDROME,NEPHROSIS	4406
SUICIDE	4283
CHRONIC LIVER DISEASE AND CIRRHOSIS	3870
SEPTICEMIA	3671
OTHER DISEASES OF RESPIRATORY SYSTEM	3420
HYPERTENSION AND RENAL DISEASE	2686
PARKINSON'S DISEASE	2490
PNEUMONITIS DUE TO SOLIDS AND LIQUIDS	2251
ASSAULT (HOMICIDE)	1946
OTHER DISEASES OF CIRCULATORY SYSTEM	1902
BENIGN NEOPLASMS	1321
CERTAIN PERINATAL CONDITIONS	1014
CERTAIN OTHER INTESTINAL INFECTIONS	972
CONGENITAL ANOMALIES	968
VIRAL HEPATITIS	849
HUMAN IMMUNODEFICIENCY VIRUS (HIV) DIS	572
ALL OTHER INFECTIOUS AND PARASITIC DIS	572
NUTRITIONAL DEFICIENCIES	503
EVENTS OF UNDETERMINED INTENT	503
OTHER DISORDERS OF CIRCULATORY SYSTEM	478
ANEMIAS	440
COMPLICATIONS OF MEDICAL &amp;amp; SURGICAL CARE	367
ATHEROSCLEROSIS	350
CHOLELITHIASIS AND OTHER DISORDERS OF GALLBLADDER	348
PEPTIC ULCER	309
HERNIA	200
PREGNANCY, CHILDBIRTH AND THE PUERPERIUM	117&lt;/PRE&gt;</description>
      <pubDate>Thu, 28 May 2020 00:07:47 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/create-a-report/m-p/651246#M195376</guid>
      <dc:creator>Amy0223</dc:creator>
      <dc:date>2020-05-28T00:07:47Z</dc:date>
    </item>
    <item>
      <title>Re: create a report</title>
      <link>https://communities.sas.com/t5/SAS-Programming/create-a-report/m-p/651258#M195382</link>
      <description>&lt;P&gt;you can try something as below and you can change the ods destination as per your requirement , here i used html destination&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;ods html body='deaths.html';&lt;BR /&gt;title 'LEADING CAUSES OF DEATH IN STATE OF TENNESSEE, ALL AGES TENNESSEE RESIDENT DATA, 2014-2017';&lt;BR /&gt;proc report data=have;
column leading_death deaths;
define leading_death / display width=100;
define deaths / display width=20;
run;&lt;BR /&gt;ods html close;
&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 28 May 2020 01:42:23 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/create-a-report/m-p/651258#M195382</guid>
      <dc:creator>Jagadishkatam</dc:creator>
      <dc:date>2020-05-28T01:42:23Z</dc:date>
    </item>
    <item>
      <title>Re: create a report</title>
      <link>https://communities.sas.com/t5/SAS-Programming/create-a-report/m-p/651265#M195386</link>
      <description>&lt;P&gt;Think you just need the COMMA format. Make it wide enough to be applied to the TOTAL DEATHS which will have the largest number. Taking a small sample from your data. Is this what you are looking for?&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;data have ;
    length leading_cause $36 deaths 8 ;
    input @1 leading_cause $char36. deaths ;
cards ;
TOTAL DEATHS	                                 268881
DISEASES OF HEART	                         62317
MALIGNANT NEOPLASMS	                         57083
CHRONIC LOWER RESPIRATORY DISEASES	         17177
ACCIDENTS AND ADVERSE EFFECTS	                 16282
CEREBROVASCULAR DISEASE	                         13792
;
run ;
      
proc print noobs data = have ;
   var leading_cause deaths ;
   format deaths comma10. ;
run ;&lt;/PRE&gt;
&lt;DIV id="tinyMceEditorbiopharma_0" class="mceNonEditable lia-copypaste-placeholder"&gt;&amp;nbsp;&lt;/DIV&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 28 May 2020 03:30:35 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/create-a-report/m-p/651265#M195386</guid>
      <dc:creator>biopharma</dc:creator>
      <dc:date>2020-05-28T03:30:35Z</dc:date>
    </item>
    <item>
      <title>Re: create a report</title>
      <link>https://communities.sas.com/t5/SAS-Programming/create-a-report/m-p/651268#M195388</link>
      <description>Thank you for your kind help! I'm wondering how to create a report that shows the colors as shown in the picture. Any help is greatly appreciated. Thanks!</description>
      <pubDate>Thu, 28 May 2020 03:35:50 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/create-a-report/m-p/651268#M195388</guid>
      <dc:creator>Amy0223</dc:creator>
      <dc:date>2020-05-28T03:35:50Z</dc:date>
    </item>
    <item>
      <title>Re: create a report</title>
      <link>https://communities.sas.com/t5/SAS-Programming/create-a-report/m-p/651269#M195389</link>
      <description>Thank you very much for helping me out. Do you know how to create the report with colors as shown above? I really appreciate it!</description>
      <pubDate>Thu, 28 May 2020 03:37:36 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/create-a-report/m-p/651269#M195389</guid>
      <dc:creator>Amy0223</dc:creator>
      <dc:date>2020-05-28T03:37:36Z</dc:date>
    </item>
    <item>
      <title>Re: create a report</title>
      <link>https://communities.sas.com/t5/SAS-Programming/create-a-report/m-p/651276#M195391</link>
      <description>&lt;P&gt;Is this a HTML, RTF or some other output? Get familiar with ODS STYLE templates here:&amp;nbsp;&lt;FONT style="background-color: #ffffff;"&gt;&lt;A href="https://documentation.sas.com/?docsetId=odsug&amp;amp;docsetTarget=n13ivejjjk8flyn1jajj8onc3xnw.htm&amp;amp;docsetVersion=9.4&amp;amp;locale=en" target="_blank"&gt;https://documentation.sas.com/?docsetId=odsug&amp;amp;docsetTarget=n13ivejjjk8flyn1jajj8onc3xnw.htm&amp;amp;docsetVersion=9.4&amp;amp;locale=en&lt;/A&gt;&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I have used the PDF destination with FestivalPrinter as an example (see attached). You will need to experiment with the various styles in the document I mentioned to figure out which one you need. If there isn't one that is suitable, it gets tricky. You may have to go with a custom style and that will require some learning.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;FONT style="background-color: #ffffff;"&gt;&lt;BR /&gt;ods pdf file="&amp;amp;mypath./deaths.pdf" style=FestivalPrinter ;&lt;BR /&gt;proc print noobs data = have ;&lt;BR /&gt;&amp;nbsp;&amp;nbsp; var leading_cause deaths ;&lt;BR /&gt;&amp;nbsp;&amp;nbsp; format deaths comma10. ;&lt;BR /&gt;run ;&lt;BR /&gt;ods pdf close ;&lt;/FONT&gt;&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 28 May 2020 04:11:30 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/create-a-report/m-p/651276#M195391</guid>
      <dc:creator>biopharma</dc:creator>
      <dc:date>2020-05-28T04:11:30Z</dc:date>
    </item>
    <item>
      <title>Re: create a report</title>
      <link>https://communities.sas.com/t5/SAS-Programming/create-a-report/m-p/651313#M195410</link>
      <description>&lt;P&gt;Please try the style(header) option in the proc report to change the back ground color and text color. Also call define to change the background color of columns displayed.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Here i generated the HTML file, you can try PDF as well.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;ods html file='~/sample.html';
PROC REPORT DATA=WORK.HAVE LS=143 PS=30  SPLIT="/" CENTER &lt;FONT color="#FF0000"&gt;style(header)=header{BACKGROUND=BLUE}&lt;/FONT&gt;;
COLUMN  leading_cause deaths;

DEFINE  leading_cause / DISPLAY FORMAT= $36. WIDTH=36    SPACING=2   LEFT "Leading Cause" &lt;FONT color="#FF0000"&gt;style(header)=header{color=white}&lt;/FONT&gt;;
DEFINE  deaths /  FORMAT= BEST9. WIDTH=9     SPACING=2   RIGHT "Deaths" &lt;FONT color="#FF0000"&gt;style(header)=header{color=white}&lt;/FONT&gt;;
COMPUTE leading_cause; 
&lt;FONT color="#FF0000"&gt;CALL DEFINE(_COL_, "style", "STYLE=[BACKGROUND=LIGHTGREEN]");  &lt;/FONT&gt; 
ENDCOMP; 
COMPUTE deaths; 
&lt;FONT color="#FF0000"&gt;CALL DEFINE(_COL_, "style", "STYLE=[BACKGROUND=LIGHTGREEN]");  &lt;/FONT&gt; 
ENDCOMP;
RUN;
ods html close;&lt;/CODE&gt;&lt;/PRE&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="image.png" style="width: 314px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/40069i35F54CF46FA63ACC/image-size/large?v=v2&amp;amp;px=999" role="button" title="image.png" alt="image.png" /&gt;&lt;/span&gt;&lt;/P&gt;</description>
      <pubDate>Thu, 28 May 2020 07:28:56 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/create-a-report/m-p/651313#M195410</guid>
      <dc:creator>Jagadishkatam</dc:creator>
      <dc:date>2020-05-28T07:28:56Z</dc:date>
    </item>
    <item>
      <title>Re: create a report</title>
      <link>https://communities.sas.com/t5/SAS-Programming/create-a-report/m-p/651351#M195430</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/265801"&gt;@Amy0223&lt;/a&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;As the report is quite "simple", PROC PRINT provides good alternative to PROC REPORT:&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;proc print noobs data = have label
		   style(data)={backgroundcolor=lilg}
		   style(header)={backgroundcolor=skyblue color=white fontweight=bold};
   var leading_cause deaths;
   label leading_cause = "Leading Cause" deaths = "Deaths";
   format deaths comma10. ;
   title j=c color=black "Leading Causes of Death, Tennessee, Resident Data, 2014-2017";
run ;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Capture d’écran 2020-05-28 à 13.17.57.png" style="width: 400px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/40074iCEA22E92F7733ED7/image-size/medium?v=v2&amp;amp;px=400" role="button" title="Capture d’écran 2020-05-28 à 13.17.57.png" alt="Capture d’écran 2020-05-28 à 13.17.57.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt; &lt;/P&gt;
&lt;P&gt; &lt;/P&gt;</description>
      <pubDate>Thu, 28 May 2020 11:18:22 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/create-a-report/m-p/651351#M195430</guid>
      <dc:creator>ed_sas_member</dc:creator>
      <dc:date>2020-05-28T11:18:22Z</dc:date>
    </item>
    <item>
      <title>Re: create a report</title>
      <link>https://communities.sas.com/t5/SAS-Programming/create-a-report/m-p/651356#M195432</link>
      <description>This is such a great help! Thank you so much!!!</description>
      <pubDate>Thu, 28 May 2020 11:52:17 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/create-a-report/m-p/651356#M195432</guid>
      <dc:creator>Amy0223</dc:creator>
      <dc:date>2020-05-28T11:52:17Z</dc:date>
    </item>
    <item>
      <title>Re: create a report</title>
      <link>https://communities.sas.com/t5/SAS-Programming/create-a-report/m-p/651387#M195442</link>
      <description>&lt;P&gt;I have another question. How do I remove the gridlines?&lt;/P&gt;</description>
      <pubDate>Thu, 28 May 2020 14:35:50 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/create-a-report/m-p/651387#M195442</guid>
      <dc:creator>Amy0223</dc:creator>
      <dc:date>2020-05-28T14:35:50Z</dc:date>
    </item>
    <item>
      <title>Re: create a report</title>
      <link>https://communities.sas.com/t5/SAS-Programming/create-a-report/m-p/651388#M195443</link>
      <description>&lt;P&gt;Thank you so much!&amp;nbsp;Is there a way to remove the gridlines?&lt;/P&gt;</description>
      <pubDate>Thu, 28 May 2020 14:36:45 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/create-a-report/m-p/651388#M195443</guid>
      <dc:creator>Amy0223</dc:creator>
      <dc:date>2020-05-28T14:36:45Z</dc:date>
    </item>
    <item>
      <title>Re: create a report</title>
      <link>https://communities.sas.com/t5/SAS-Programming/create-a-report/m-p/651414#M195448</link>
      <description>&lt;P&gt;you can try to use style=mystyle option in ods statement and also style(report)=[rules=none frame=void]&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;ods html file='~/sample.html' style=mystyle;
PROC REPORT DATA=WORK.HAVE LS=143 PS=30  SPLIT="/" CENTER style(header)=header{BACKGROUND=BLUE}  style(report)=[rules=none frame=void];
COLUMN  leading_cause deaths;

DEFINE  leading_cause / DISPLAY FORMAT= $36. WIDTH=36    SPACING=2   LEFT "Leading Cause" style(header)=header{color=white};
DEFINE  deaths /  FORMAT= BEST9. WIDTH=9     SPACING=2   RIGHT "Deaths" style(header)=header{color=white};
COMPUTE leading_cause; 
CALL DEFINE(_COL_, "style", "STYLE=[BACKGROUND=LIGHTGREEN]");   
ENDCOMP; 
COMPUTE deaths; 
CALL DEFINE(_COL_, "style", "STYLE=[BACKGROUND=LIGHTGREEN]");   
ENDCOMP;
RUN;
ods html close;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="image.png" style="width: 437px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/40101i3928FE89B9EDD5F3/image-size/large?v=v2&amp;amp;px=999" role="button" title="image.png" alt="image.png" /&gt;&lt;/span&gt;&lt;/P&gt;</description>
      <pubDate>Thu, 28 May 2020 15:14:15 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/create-a-report/m-p/651414#M195448</guid>
      <dc:creator>Jagadishkatam</dc:creator>
      <dc:date>2020-05-28T15:14:15Z</dc:date>
    </item>
    <item>
      <title>Re: create a report</title>
      <link>https://communities.sas.com/t5/SAS-Programming/create-a-report/m-p/651415#M195449</link>
      <description>Thank you so much! Your information is very helpful! I greatly appreciate it.</description>
      <pubDate>Thu, 28 May 2020 15:19:51 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/create-a-report/m-p/651415#M195449</guid>
      <dc:creator>Amy0223</dc:creator>
      <dc:date>2020-05-28T15:19:51Z</dc:date>
    </item>
  </channel>
</rss>

