BookmarkSubscribeRSS Feed
🔒 This topic is solved and locked. Need further help from the community? Please sign in and ask a new question.
Dave25
Quartz | Level 8

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

1 ACCEPTED SOLUTION

Accepted Solutions
Cynthia_sas
Diamond | Level 26

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.

inserting_small_blank.png

 

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

View solution in original post

3 REPLIES 3
SuzanneDorinski
Lapis Lazuli | Level 10

Instead of cellheight=0.1in, I tried fontsize=5pt with your example.  That works in HTML and RTF, but not the PowerPoint destination. 

Cynthia_sas
Diamond | Level 26

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.

inserting_small_blank.png

 

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

Dave25
Quartz | Level 8

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

hackathon24-white-horiz.png

2025 SAS Hackathon: There is still time!

Good news: We've extended SAS Hackathon registration until Sept. 12, so you still have time to be part of our biggest event yet – our five-year anniversary!

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.

SAS Training: Just a Click Away

 Ready to level-up your skills? Choose your own adventure.

Browse our catalog!

Discussion stats
  • 3 replies
  • 3565 views
  • 3 likes
  • 3 in conversation