BookmarkSubscribeRSS Feed
blueskyxyz
Lapis Lazuli | Level 10
proc template;                                                                
   define style global.table;                
      parent = styles.journal;                                                
      style fonts from fonts /                                                
         'TitleFont' = ("Times New Roman")                             
         'headingFont' = ("Times New Roman")                           
         'docFont' = ("Times New Roman")                               
         'FootFont' = ("Times New Roman")
         ;                             
      style SystemTitle from SystemTitle /                                 
         backgroundcolor = none
         fontsize= 10 pt
         fontweight=bold
         ;                                              
      style SystemFooter from SystemFooter /                                
         backgroundcolor = none
         fontsize= 9 pt
         fontweight=medium
		 fontstyle=italic
         ;                                                  
      style Header from Header /                                           
         backgroundcolor = none
         fontsize= 10 pt
         fontweight=medium
		 cellspacing=0
         vjust=b
          pretext = "~R/RTF'\sb0\sa0\ "
         ;  
      style RowHeader from RowHeader /                                        
         backgroundcolor = none
         ;                                              
      style Data from Data /                                                 
         backgroundcolor = none
         font = ("Times New Roman", 9 pt, medium)
         fontweight=medium
          pretext = "~R/RTF'\sb0\sa0\ "
         ;                                             
      style Table from Table / 
         font = ("Times New Roman", 9 pt, medium)
         backgroundcolor = none
         frame = void
         rules = none
         ;
      style Body from Body /                                             
         bottommargin = 1.0 in
         topmargin = 1.0 in
         rightmargin = 1.0 in
         leftmargin  = 1.0 in
         ;   
 
   end;                                                                       
run;

~R'\fi-86\li86 'Race, n (%)

~R'\fi-86\li266 'White

捕获.JPG

8 REPLIES 8
blueskyxyz
Lapis Lazuli | Level 10

Sorry, Kurt, I cannot share my code here, if I delete the option keepn, the result is different with symbol on title and footnote line:

捕获.JPG

Cynthia_sas
SAS Super FREQ
Hi:
Just seeing your style template isn't enough. You also have to ensure that you have the SAME character defined as the ODS ESCAPECHAR or else use the "universal" ESCAPECHAR so that your inline formatting is recognized. This looks like a standard demographic report. You do NOT need to use RTF control strings to do your indents and formatting. Please take a look at both of the #1 examples in this paper, https://support.sas.com/resources/papers/proceedings/pdfs/sgf2008/173-2008.pdf starting on page 9 -- everything was done with PROC REPORT and JOURNAL style -- no raw text insertion was needed. There have been previous forum postings of the paper and zip file of programs. They are both on support.sas.com under the 2008 papers.
Cynthia
blueskyxyz
Lapis Lazuli | Level 10
Thanks Cynthia for sharing your paper, I use the regular ESCAPECHAR like ^ ~, I'm confused with my issue.
blueskyxyz
Lapis Lazuli | Level 10
the code is ok in UNIX system, while the rtf ouput shows some symbols in WIN10, there are some options need to update.
Cynthia_sas
SAS Super FREQ

It looks to me in the screen shot that I can see the carriage returns at the end of each line. I am wondering whether Show/Hide characters on the Word ribbon is toggled on. Otherwise, if that doesn't work, I'd recommend opening a track with Tech Support.

Cynthia

blueskyxyz
Lapis Lazuli | Level 10

Thanks @Cynthia_sas , update the word display option , this kind of symbol can be hided.捕获.JPG

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
  • 8 replies
  • 1398 views
  • 0 likes
  • 3 in conversation