LISTSERV at the University of Georgia
Menubar Imagemap
Home Browse Manage Request Manuals Register
Previous messageNext messagePrevious in topicNext in topicPrevious by same authorNext by same authorPrevious page (April 2004, week 1)Back to main SAS-L pageJoin or leave SAS-L (or change settings)ReplyPost a new messageSearchProportional fontNon-proportional font
Date:         Thu, 1 Apr 2004 22:15:36 +1200
Reply-To:     don_stanley@paradise.net.nz
Sender:       "SAS(r) Discussion" <SAS-L@LISTSERV.UGA.EDU>
From:         Don & Susann <don_stanley@PARADISE.NET.NZ>
Subject:      Using "Justify" in ODS RTF Output (rather than left/right/center
              justify)
Content-type: text/plain; format=flowed; charset=us-ascii

I was posed the question off list about how to write data to an ODS RTF destination "justified". Justify is the option you get in word that spreads text across the full width of a line and proportionally spaces it out, as oppoed to left/right and center justify.

There doesn't seem to be an ODS style attribute for it, at least not documented in V8.2. But you can do it quite easily by embedding a raw RTF code (\qj) as follows (I've done all of the justification codes for comparison). One question arises .. what would you use the "distribution" justification for?

data test ; length mytext $ 200 ; mytext = '^S={protectspecialchars=off}\qj this is a long piece of text that I would like to have displayed fully justified so that it spreads across the line and proportionally spaces in between each word';output ; mytext = '^S={protectspecialchars=off}\ql this is a long piece of text that I would like to have displayed left justified';output ; mytext = '^S={protectspecialchars=off}\qr this is a long piece of text that I would like to have displayed right justified';output ; mytext = '^S={protectspecialchars=off}\qc this is a long piece of text that I would like to have displayed center justified';output ; mytext = '^S={protectspecialchars=off}\qd this is a long piece of text that I would like to have displayed distributed justified whatever that may mean';output ; run ;

ods rtf file='c:\temp\thisfile.rtf' ;

ods escapechar="^" ;

proc report data=test nowd ; column _all_ ; run ;

ods rtf close ; -- Don Stanley, B.SC, Dip O.R.S, MNZCS Author:: Beyond the obvious with SAS Screen Control Language. Author:: Solutions for your GUI Applications Development Using SAS/AF FRAME Technology http://www.syswaregroup.com , http://homepages.rootsweb.com/~ashluke


Back to: Top of message | Previous page | Main SAS-L page