BookmarkSubscribeRSS Feed
Miracle
Barite | Level 11

Dear SAS users,

 

Can I please seek your advice on how to add a little spacing between Var? I understand break after would add an empty row but that would give me 2 pages of rtf output and this is a short table.Hence I am hoping by adding just a little spacing between Var would achieve the desired 1-page rtf output.

 

I have tried the height option in the compute statement as suggested here Proc Print - adjust cellheight of blankline

and cellheight option in the define statement as suggested here ROW height in PDF Output

But they don't work for some reason. Below is my SAS code and the summary data used by proc report to output the rtf.

 

Your insight on this will be very appreciated. Thank you in advance.

 

proc report data = summary headline headskip split = "|" spacing=1;
/*style(lines)=[color=white backgroundcolor=black fontstyle=italic fontweight=bold fontsize=10];*/
	columns (vorder Var stats A B pvalue);
	define vorder / order order=internal noprint; 
	define Var / flow group /*style(column)={cellwidth=200pt}*/ /*style={cellheight=20cm*/ /*cellwidth=20cm}*/ width=35 "Time point"; 
	define stats / display left /*style(column)={cellwidth=200pt}*/ width=12 "Statistics"; 
	define A / display center /*style(column)={cellwidth=200pt}*/ width=18"; 
	define B /display center /*style(column)={cellwidth=200pt}*/ width=18"; 
	define pvalue / display left /*style(column)={cellwidth=30%}*/ width=8 "P-value| "; 
/*	compute after Var /*/ /*style={cellheight=1pt font_size=1pt};*/
/*		line '';*/
/*	endcomp;*/

run;

 

 

Var Stats A B vorder pvalue
Baseline N ## ## 1  
Baseline Mean (SD) ##(##) ##(##) 1  
Baseline Median ## ## 1  
Baseline (Min, Max) (##, ##) (##, ##) 1  
Baseline 95% CI (##, ##) (##, ##) 1  
Visit 3 N ## ## 2  
Visit 3 Mean (SD) ##(##) ##(##) 2  
Visit 3 Median ## ## 2  
Visit 3 (Min, Max) (##, ##) (##, ##) 2  
Visit 3 95% CI (##, ##) (##, ##) 2  
Visit 6 N ## ## 4  
Visit 6 Mean (SD) ##(##) ##(##) 4  
Visit 6 Median ## ## 4  
Visit 6 (Min, Max) (##, ##) (##, ##) 4  
Visit 6 95% CI (##, ##) (##, ##) 4  
Change from baseline to Visit 3 N ## ## 3 #.####
Change from baseline to Visit 3 Mean (SD) ##(##) ##(##) 3  
Change from baseline to Visit 3 Median ## ## 3  
Change from baseline to Visit 3 (Min, Max) (##, ##) (##, ##) 3  
Change from baseline to Visit 3 95% CI (##, ##) (##, ##) 3  
Change from baseline to Visit 6 N ## ## 5 #.####
Change from baseline to Visit 6 Mean (SD) ##(##) ##(##) 5  
Change from baseline to Visit 6 Median ## ## 5  
Change from baseline to Visit 6 (Min, Max) (##, ##) (##, ##) 5  
Change from baseline to Visit 6 95% CI (##, ##) (##, ##) 5  

 

1 REPLY 1
Cynthia_sas
SAS Super FREQ

Hi:

  Without data, no one can test/run your code or change it. I would expect cellheight to work. You don't show your ODS RTF statements or what style you are using with the output.

 

  Some observations -- you have inconsistent font sizes -- you are mixing both PT and percent and then you even have one specification as font_size=10, which defaults to pixels in your ODS style overrides and your FLOW, WIDTH=, HEADLINE, HEADSKIP and SPACING options will be ignored by ODS RTF -- so that is going to be a problem. With RTF, all your font measurements are being converted to TWIPS (twentieth of a printer's point), so it would be better to NOT use mixed units of measure. And 200 pt -- really? That seems doomed to fit on one page.

 

  I also am not sure what you want. Were you trying to add cellheight to get a little space between EACH report (COMPUTE after VAR) row or were you trying to add an empty line AFTER each VAR group (COMPUTE after VORDER) but have the empty line be very small??

 

  Were you using the JOURNAL style -- which is the style without interior tables lines that most reports like this use? Without seeing your ODS RTF statements, it's just a guess.

 

Cynthia

Ready to join fellow brilliant minds for the SAS Hackathon?

Build your skills. Make connections. Enjoy creative freedom. Maybe change the world. Registration is now open through August 30th. Visit the SAS Hackathon homepage.

Register today!
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
  • 1513 views
  • 0 likes
  • 2 in conversation