The SAS Output Delivery System and reporting techniques

ODS Output and Proc Report

Reply
Occasional Contributor
Posts: 15

ODS Output and Proc Report

Using the following code (only half as I am creating a few tables with different filters), I am trying to output tables directly into PowerPoint, however I have been unsuccessful at controlling the row heights for the table. My end goal would be to fit more rows into the table per slide. Is there sometine with the code? Or could it be a version issue (I'm suing SAS 9.4). 

 

options nodate;
ods POWERPOINT file="";
options missing='';
title1 j=left height=15 bold "";
title2 j=left height=8 bold ".";
footnote1 j=left height=3.5 ".";
footnote2 j=left height=3.5 ",";
footnote3 j=left height=2 ".";
proc report data=test1 nowd
style=[bordertopcolor=CX5B9BD5 borderrightcolor=CX5B9BD5 borderleftcolor=CX5B9BD5 borderbottomcolor=CX5B9BD5 cellspacing=0 cellpadding=0];
column school all_grades K _1 _2 _3 _4 _5;
where subject='Mathematics';
define school/ 'SCHOOL' style={BACKGROUND=CXDDEBF7 fontfamily=Calibri fontsize=4 borderrightcolor=CX5B9BD5 borderbottomcolor=CX5B9BD5 bordertopcolor=CX5B9BD5 borderleftcolor=CX5B9BD5 height=.25in
cellspacing=0 cellpadding=0}
style(header)=[background=CX4472C4 font_weight=bold foreground=white JUST=left fontfamily=Calibri fontsize=3.5 width=28%
borderrightcolor=CX5B9BD5 borderbottomcolor=CX5B9BD5 bordertopcolor=CX5B9BD5 borderleftcolor=CX5B9BD5 height=.25in];
define all_grades/ 'All Grades' style={font_weight=bold JUST=center fontfamily=Calibri fontsize=4 borderrightcolor=CX5B9BD5 borderbottomcolor=CX5B9BD5 bordertopcolor=CX5B9BD5 borderleftcolor=CX5B9BD5 height=.25in
cellspacing=0 cellpadding=0}
style(header)=[BACKGROUND=CXDDEBF7 font_weight=bold foreground=black fontfamily=Calibri fontsize=4 width=9%
borderrightcolor=CX5B9BD5 borderbottomcolor=CX5B9BD5 bordertopcolor=CX5B9BD5 borderleftcolor=CX5B9BD5 height=.25in];
define K/ 'K' style={BACKGROUND=K_format. font_weight=bold JUST=center fontfamily=Calibri fontsize=4 borderrightcolor=CX5B9BD5 borderbottomcolor=CX5B9BD5 bordertopcolor=CX5B9BD5 borderleftcolor=CX5B9BD5 height=.25in
cellspacing=0 cellpadding=0}
style(header)=[BACKGROUND=CXDDEBF7 font_weight=bold foreground=black fontfamily=Calibri fontsize=4 width=8%
borderrightcolor=CX5B9BD5 borderbottomcolor=CX5B9BD5 bordertopcolor=CX5B9BD5 borderleftcolor=CX5B9BD5 height=.25in];
define _1/ '1' style={BACKGROUND=_1_format. font_weight=bold JUST=center fontfamily=Calibri fontsize=4 borderrightcolor=CX5B9BD5 borderbottomcolor=CX5B9BD5 bordertopcolor=CX5B9BD5 borderleftcolor=CX5B9BD5 height=.25in
cellspacing=0 cellpadding=0}
style(header)=[BACKGROUND=CXDDEBF7 font_weight=bold foreground=black fontfamily=Calibri fontsize=4 width=8%
borderrightcolor=CX5B9BD5 borderbottomcolor=CX5B9BD5 bordertopcolor=CX5B9BD5 borderleftcolor=CX5B9BD5 height=.25in];
define _2/ '2' style={BACKGROUND=_2_format. font_weight=bold JUST=center fontfamily=Calibri fontsize=4 borderrightcolor=CX5B9BD5 borderbottomcolor=CX5B9BD5 bordertopcolor=CX5B9BD5 borderleftcolor=CX5B9BD5 height=.25in
cellspacing=0 cellpadding=0}
style(header)=[BACKGROUND=CXDDEBF7 font_weight=bold foreground=black fontfamily=Calibri fontsize=4 width=8%
borderrightcolor=CX5B9BD5 borderbottomcolor=CX5B9BD5 bordertopcolor=CX5B9BD5 borderleftcolor=CX5B9BD5 height=.25in];
define _3/ '3' style={BACKGROUND=_3_format. font_weight=bold JUST=center fontfamily=Calibri fontsize=4 borderrightcolor=CX5B9BD5 borderbottomcolor=CX5B9BD5 bordertopcolor=CX5B9BD5 borderleftcolor=CX5B9BD5 height=.25in
cellspacing=0 cellpadding=0}
style(header)=[BACKGROUND=CXDDEBF7 font_weight=bold foreground=black fontfamily=Calibri fontsize=4 width=8%
borderrightcolor=CX5B9BD5 borderbottomcolor=CX5B9BD5 bordertopcolor=CX5B9BD5 borderleftcolor=CX5B9BD5 height=.25in];
define _4/ '4' style={BACKGROUND=_4_format. font_weight=bold JUST=center fontfamily=Calibri fontsize=4 borderrightcolor=CX5B9BD5 borderbottomcolor=CX5B9BD5 bordertopcolor=CX5B9BD5 borderleftcolor=CX5B9BD5 height=.25in
cellspacing=0 cellpadding=0}
style(header)=[BACKGROUND=CXDDEBF7 font_weight=bold foreground=black fontfamily=Calibri fontsize=4 width=8%
borderrightcolor=CX5B9BD5 borderbottomcolor=CX5B9BD5 bordertopcolor=CX5B9BD5 borderleftcolor=CX5B9BD5 height=.25in];
define _5/ '5' style={BACKGROUND=_5_format. font_weight=bold JUST=center fontfamily=Calibri fontsize=4 borderrightcolor=CX5B9BD5 borderbottomcolor=CX5B9BD5 bordertopcolor=CX5B9BD5 borderleftcolor=CX5B9BD5 height=.25in
cellspacing=0 cellpadding=0}
style(header)=[BACKGROUND=CXDDEBF7 font_weight=bold foreground=black fontfamily=Calibri fontsize=4 width=8%
borderbottomcolor=CX5B9BD5 bordertopcolor=CX5B9BD5 borderleftcolor=CX5B9BD5 borderrightcolor=CX5B9BD5 height=.25in];
run;

Super Contributor
Posts: 394

Re: ODS Output and Proc Report

The row height attribute is pretty much going to be ignored if it's too short to fit the data using the specified font size. Try specifying the font size in points (i.e. 12pt) instead of a relative size like fontsize=4.

 

Check out Figure 21 in this paper. The source code is Figure_21.sas in this zip file.

Post a Question
Discussion Stats
  • 1 reply
  • 276 views
  • 0 likes
  • 2 in conversation