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
SAS Super FREQ

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
SAS Super FREQ

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

sas-innovate-2024.png

Join us for SAS Innovate April 16-19 at the Aria in Las Vegas. Bring the team and save big with our group pricing for a limited time only.

Pre-conference courses and tutorials are filling up fast and are always a sellout. Register today to reserve your seat.

 

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
  • 3 replies
  • 2605 views
  • 3 likes
  • 3 in conversation