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 2024

Innovate_SAS_Blue.png

Registration is open! SAS is returning to Vegas for an AI and analytics experience like no other! Whether you're an executive, manager, end user or SAS partner, SAS Innovate is designed for everyone on your team. Register for just $495 by 12/31/2023.

If you are interested in speaking, there is still time to submit a session idea. More details are posted on the website. 

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.

Get the $99 certification deal.jpg

 

 

Back in the Classroom!

Select SAS Training centers are offering in-person courses. View upcoming courses for:

View all other training opportunities.

Discussion stats
  • 4 replies
  • 247 views
  • 1 like
  • 3 in conversation