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

Hi everyone,

I'd like to figure out 

      1. why #m can't indent the variable value as expected. I can't see any problem with my code.

      2. #w doesn't support leading nonbreaking space in RTF, right?

 

Any thoughts would be appreciated! Thanks in advance!

code.jpgq1.jpgq2.jpg

ods escapechar='#';
/*1. why #m doesn't indent as expected. I can't see any problem with my code*/
data escape_m;
	input  var $50.;
	cards;
    Na#mme#-2nXiaoMing
    Co#mntact#-2n(010)-xxxx-xxxx 
	;
run;
ods rtf file='c:\users\xiaohua\desktop\escape_m.rtf';
proc report data=escape_m;
	column _all_;
run;
ods rtf close;

/*2. #_ doesn't support leading nonbreaking space, right?*/
data nb;
	input  var $40.;
	cards;
    Age
	#_#_#_#_N_Miss 
	Mean#_#_#_#_sd   
	;
run;
ods rtf file='c:\users\xiaohua\desktop\nb.rtf';
proc report data=nb;
	column _all_;
run;
ods rtf close;

 

1 ACCEPTED SOLUTION

Accepted Solutions
Cecillia_Mao
Obsidian | Level 7

After trying :

1. #m works in ODS PDF but not in HTML and RTF
2. Leading space for #_: works in HTML and PDF but not RTF 

View solution in original post

11 REPLIES 11
ChrisNZ
Tourmaline | Level 20

This creates a leading non-breaking space.

data NB;
  VAR='{\~\~Mean\~ssd}';   
run;

 

 

Cecillia_Mao
Obsidian | Level 7
Thanks, I'll try later. But I still don't understand why #m doesn't work~
Cecillia_Mao
Obsidian | Level 7

Edited by @ChrisNZ . Duplicate content removed.

Cecillia_Mao
Obsidian | Level 7
Thanks so much! I'll just post to the most related section next time. I just knew there are different section today~
ChrisNZ
Tourmaline | Level 20

See my syntax for the correct implementation of the effect you are seeking.

Cecillia_Mao
Obsidian | Level 7
Thanks so much! I didn't mead to post twice, I hadn't known there is an ods section before posting to SAS programming section.
Cecillia_Mao
Obsidian | Level 7

After trying :

1. #m works in ODS PDF but not in HTML and RTF
2. Leading space for #_: works in HTML and PDF but not RTF 

ChrisNZ
Tourmaline | Level 20
Maybe this inconsistency should be flagged as needing addressing. Do you want to ask tech support?
Cecillia_Mao
Obsidian | Level 7
Thanks for the point! That would be a nice try.

sas-innovate-2024.png

Available on demand!

Missed SAS Innovate Las Vegas? Watch all the action for free! View the keynotes, general sessions and 22 breakouts on demand.

 

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
  • 11 replies
  • 1544 views
  • 1 like
  • 3 in conversation