Any way i can adjust the height of the Blankline in Proc Print? Here's an example of what I tried (obviously, doesn't work):
data x;
do a = 1 to 6;
b = a + 1;
output;
end; run;
ods powerpoint file = 'C:\test.pptx';
proc print data = x noobs label blankline=(count=2 style={cellheight=0.1in});
var a /style=[cellwidth=2in just=c TEXTALIGN=left VERTICALALIGN= MIDDLE fontsize=11pt];
var b /style=[cellwidth=2in just=c TEXTALIGN=left VERTICALALIGN= MIDDLE fontsize=11pt];
run;
ods powerpoint close;
Thanks,
Dave
Hi, Well, I found that I can change the height of the blank line in PROC PRINT for HTML but not in PPTX. However, with PROC REPORT, I can generate output that changes the height in both destinations.
Here's the code I used (changed your style overrides .. just and textalign are the same option):
** need BLNKVAR to insert blank line in PROC REPORT;
** want to group observations by "twos" so a blank can be inserted;
** every 2 rows;
data x;
do a = 1 to 6;
b = a + 1;
blnkvar = round(a,2);
output;
end;
run;
title;
ods html file='c:\temp\test_blank_height.html';
ods powerpoint file = 'C:\temp\test_blank_height.pptx';
proc print data = x noobs label blankline=(count=2 style={height=3pt font_size=1pt})
style(header)=[cellwidth=2in just=c VERTICALALIGN= MIDDLE fontsize=11pt]
style(data)=[cellwidth=2in just=c VERTICALALIGN= MIDDLE fontsize=11pt];
title 'proc print -- height works in HTML, not in PPTX';
var a b;
run;
proc report data=x
style(header)=[cellwidth=2in just=c VERTICALALIGN= MIDDLE fontsize=11pt]
style(column)=[cellwidth=2in just=c VERTICALALIGN= MIDDLE fontsize=11pt];
title 'proc report -- height works in HTML and PPTX';
column blnkvar a b;
define blnkvar / order noprint;
define a / display;
define b / display;
compute after blnkvar/style={height=3pt font_size=1pt};
line ' ';
endcomp;
run;
ods _all_ close;
title;
Hope this helps,
cynthia
Instead of cellheight=0.1in, I tried fontsize=5pt with your example. That works in HTML and RTF, but not the PowerPoint destination.
Hi, Well, I found that I can change the height of the blank line in PROC PRINT for HTML but not in PPTX. However, with PROC REPORT, I can generate output that changes the height in both destinations.
Here's the code I used (changed your style overrides .. just and textalign are the same option):
** need BLNKVAR to insert blank line in PROC REPORT;
** want to group observations by "twos" so a blank can be inserted;
** every 2 rows;
data x;
do a = 1 to 6;
b = a + 1;
blnkvar = round(a,2);
output;
end;
run;
title;
ods html file='c:\temp\test_blank_height.html';
ods powerpoint file = 'C:\temp\test_blank_height.pptx';
proc print data = x noobs label blankline=(count=2 style={height=3pt font_size=1pt})
style(header)=[cellwidth=2in just=c VERTICALALIGN= MIDDLE fontsize=11pt]
style(data)=[cellwidth=2in just=c VERTICALALIGN= MIDDLE fontsize=11pt];
title 'proc print -- height works in HTML, not in PPTX';
var a b;
run;
proc report data=x
style(header)=[cellwidth=2in just=c VERTICALALIGN= MIDDLE fontsize=11pt]
style(column)=[cellwidth=2in just=c VERTICALALIGN= MIDDLE fontsize=11pt];
title 'proc report -- height works in HTML and PPTX';
column blnkvar a b;
define blnkvar / order noprint;
define a / display;
define b / display;
compute after blnkvar/style={height=3pt font_size=1pt};
line ' ';
endcomp;
run;
ods _all_ close;
title;
Hope this helps,
cynthia
thanks! - all three pieces of info were helpful: 1) use pt instead of in; 2) rtf works, but not ppt (found that pdf works also); 3) a great template to use with Proc Report.
Dave
Are you ready for the spotlight? We're accepting content ideas for SAS Innovate 2025 to be held May 6-9 in Orlando, FL. The call is open until September 25. Read more here about why you should contribute and what is in it for you!
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.