BookmarkSubscribeRSS Feed
Amber1331
Calcite | Level 5

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;

1 REPLY 1
Tim_SAS
Barite | Level 11

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.

sas-innovate-2024.png

Don't miss out on SAS Innovate - Register now for the FREE Livestream!

Can't make it to Vegas? No problem! Watch our general sessions LIVE or on-demand starting April 17th. Hear from SAS execs, best-selling author Adam Grant, Hot Ones host Sean Evans, top tech journalist Kara Swisher, AI expert Cassie Kozyrkov, and the mind-blowing dance crew iLuminate! Plus, get access to over 20 breakout sessions.

 

Register now!

How to Concatenate Values

Learn how use the CAT functions in SAS to join values from multiple variables into a single value.

Find more tutorials on the SAS Users YouTube channel.

Click image to register for webinarClick image to register for webinar

Classroom Training Available!

Select SAS Training centers are offering in-person courses. View upcoming courses for:

View all other training opportunities.

Discussion stats
  • 1 reply
  • 1012 views
  • 0 likes
  • 2 in conversation