BookmarkSubscribeRSS Feed
☑ This topic is solved. Need further help from the community? Please sign in and ask a new question.
SASuserlot
Barite | Level 11

I want to have a break in the spanning line between the categories ( Indicated n the Image in Red).  Is it possible to do that? Thank you for your suggestions.

SASuserlot_0-1683925534697.png

data check;
pla = '80';
drug= '100';
col1=' Total';
pla_pct= '80.0';
drug_pct = '100';
run; 

ods _all_ close;
options orientation = landscape errors = 2 missing = ' ' nobyline;
ods escapechar = '^';
Ods results on;
ods rtf file = "c:temp\check.rtf" style = custom;
proc report data=check  ls = 145 ps = 55  split = "?" headline center missing formchar(2) = '_'
							;
							
	title1 j = l "Table 1";  
	
	column   ("^R/RTF'\brdrb\brdrs '" col1
				           	("(*ESC*)S={borderbottomcolor=black borderbottomwidth=2}	category"
							("(*ESC*)S={borderbottomcolor=black borderbottomwidth=2} Placebo ?(N=)"
							pla pla_pct )
							("(*ESC*)S={borderbottomcolor=black borderbottomwidth=2} Drug ?(N=.)" 
							Drugdrug drug_pct)));
           
	 define col1  	/ 'Statistics' order 	
		style(header) = [just=l] id  ;
	 define pla	    /  "count"			
			style(header) = [just=c] style(column) = [just=c vjust=b  	cellwidth=11% asis=on] ;
	 define pla_pct	    /  "Percent" 			
			style(header) = [just=c] style(column) = [just=c vjust=b  	cellwidth=11% asis=on];
	 define drug	    / "count" 	 					
			style(header) = [just=c] style(column) = [just=c vjust=b  	cellwidth=11% asis=on] ;
	 define drug_pct	    / "Percent" 	 			
			style(header) = [just=c] style(column) = [just=c vjust=b 	cellwidth=11% asis=on];
	 
run;
ods rtf close;
ods listing close;

 

1 ACCEPTED SOLUTION

Accepted Solutions
Ksharp
Super User
data check;
pla = '80';
drug= '100';
col1=' Total';
pla_pct= '80.0';
drug_pct = '100';
run; 

options orientation = landscape errors = 2 missing = ' ' nobyline;
ods escapechar = '^';
ods rtf file = "c:\temp\check.rtf" style = journal;
proc report data=check  ls = 145 ps = 55  split = "?" nowd headline center missing formchar(2) = '_'
							;
							
	title1 j = l "Table 1";  
	
	column   ("^R/RTF'\brdrb\brdrs '" col1
				           	("(*ESC*)S={borderbottomcolor=black borderbottomwidth=2}	category"
							("(*ESC*)S={borderbottomcolor=black borderbottomwidth=2} Placebo ?(N=)"
							pla pla_pct )
                            dummy
							("(*ESC*)S={borderbottomcolor=black borderbottomwidth=2} Drug ?(N=.)" 
							drug drug_pct)));
           
	 define col1  	/ 'Statistics' order 	
		style(header) = [just=l] id  ;
	 define pla	    /  "count"			
			style(header) = [just=c] style(column) = [just=c vjust=b  	cellwidth=11% asis=on] ;
	 define pla_pct	    /  "Percent" 			
			style(header) = [just=c] style(column) = [just=c vjust=b  	cellwidth=11% asis=on];
	 define drug	    / "count" 	 					
			style(header) = [just=c] style(column) = [just=c vjust=b  	cellwidth=11% asis=on] ;
	 define drug_pct	    / "Percent" 	 			
			style(header) = [just=c] style(column) = [just=c vjust=b 	cellwidth=11% asis=on];
	 define dummy/computed ' ';
	 compute dummy/character length=1;
         dummy=' ';
	 endcomp;
run;
ods rtf close;

Ksharp_0-1683971239430.png

 

View solution in original post

4 REPLIES 4
ballardw
Super User

Since you are using a CUSTOM style in your ODS RTF output you should share the code for that style as well.

 

It isn't impossible for us to come up with a solution that may work for some ODS Styles but not the one you are using as we do not have your style.

SASuserlot
Barite | Level 11

Thanks @ballardw  for your response. Unfortunately, I couldn't find the code where it is stored in my organization. They are set up in such a way it reads into the SAS automatically.

Ksharp
Super User
data check;
pla = '80';
drug= '100';
col1=' Total';
pla_pct= '80.0';
drug_pct = '100';
run; 

options orientation = landscape errors = 2 missing = ' ' nobyline;
ods escapechar = '^';
ods rtf file = "c:\temp\check.rtf" style = journal;
proc report data=check  ls = 145 ps = 55  split = "?" nowd headline center missing formchar(2) = '_'
							;
							
	title1 j = l "Table 1";  
	
	column   ("^R/RTF'\brdrb\brdrs '" col1
				           	("(*ESC*)S={borderbottomcolor=black borderbottomwidth=2}	category"
							("(*ESC*)S={borderbottomcolor=black borderbottomwidth=2} Placebo ?(N=)"
							pla pla_pct )
                            dummy
							("(*ESC*)S={borderbottomcolor=black borderbottomwidth=2} Drug ?(N=.)" 
							drug drug_pct)));
           
	 define col1  	/ 'Statistics' order 	
		style(header) = [just=l] id  ;
	 define pla	    /  "count"			
			style(header) = [just=c] style(column) = [just=c vjust=b  	cellwidth=11% asis=on] ;
	 define pla_pct	    /  "Percent" 			
			style(header) = [just=c] style(column) = [just=c vjust=b  	cellwidth=11% asis=on];
	 define drug	    / "count" 	 					
			style(header) = [just=c] style(column) = [just=c vjust=b  	cellwidth=11% asis=on] ;
	 define drug_pct	    / "Percent" 	 			
			style(header) = [just=c] style(column) = [just=c vjust=b 	cellwidth=11% asis=on];
	 define dummy/computed ' ';
	 compute dummy/character length=1;
         dummy=' ';
	 endcomp;
run;
ods rtf close;

Ksharp_0-1683971239430.png

 

SASuserlot
Barite | Level 11

Thank you @Ksharp. You Rocks...........

SAS Innovate 2025: Register Now

Registration is now open for SAS Innovate 2025 , our biggest and most exciting global event of the year! Join us in Orlando, FL, May 6-9.
Sign up by Dec. 31 to get the 2024 rate of just $495.
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
  • 4 replies
  • 894 views
  • 1 like
  • 3 in conversation