From: Arthur Tabachneck on 8 Sep 2009 20:34 Paul, Wouldn't using a monospace font, like courier, do what you want? E.g., data test; passfail = '^S={font_face=courier}Pass ^S={font_face=wingdings}o'|| '^S={font_face=courier}^-2n'||'Fail ^S={font_face=wingdings}o'; run; ods escapechar = '^'; ods listing close; ods msoffice2k file='K:\art\test.doc' style=minimal; proc report data=test nowindows split='|' style(report)={font_size=10pt}; column passfail; define passfail / display 'Pass/Fail' style(header) = [just=center] style(column) = [just=center cellwidth=1in]; run; ods msoffice2k close; ods listing; HTH, Art -------- On Tue, 8 Sep 2009 16:05:11 -0700, Paul Miller <pjmiller_57(a)YAHOO.COM> wrote: >Hello Everyone, >� >I want to create a table column using Proc Report that will have a�pair of check boxes on 2 separate lines within each row. The code below produces a check box�for 'Pass' and a check box for 'Fail' in a single test row. The only thing is that I can't figure out how to get the 2 text boxes to align. Ideally, I'd like to get the 'P' in 'Pass' and the 'F' in 'Fail' to align as well.� >� >Does anyone know of a way I can do that? >� >Thanks, >� >Paul >� >data test; >passfail = 'Pass ^S={font_face=wingdings}o'||'^S={font_face=normal}^- 2n'||'Fail ^S={font_face=wingdings}o'; >run; >� >ods escapechar = '^'; >ods listing close; >ods msoffice2k file='test.doc' style=minimal; >� >proc report data=test nowindows split='|' style(report)={font_size=10pt}; >column passfail; >define passfail / display 'Pass/Fail' style(header) = [just=center] style(column) = [just=center cellwidth=1in]; >run; >� >ods msoffice2k close; >ods listing; __________________________________________________________________ Looking for the perfect gift? Give the gift of Flickr! http://www.flickr.com/gift/
From: Paul Miller on 9 Sep 2009 11:23 Hi Art and others, =A0 The monospace font approach isn't a bad idea. The only trouble is that the = text font in=A0my passfail column won't match the rest of my table, and, id= eally, I'd prefer not to change the font for the entire table to courier (b= ecuase it won't match other tables I'm doing now and other tables that I've= done previously). =A0 Got the idea of putting the check boxes first using the code below. Everyth= ing aligns when I run this code and I don't have to change the font. Not su= re if it looks right with the check boxes first though and wondered what ot= hers might think.=20 =A0 Would also be interested in seeing a way of putting the check boxes after '= Pass' and 'Fail' and getting everything to align without changing the font = if anybody knows of one. =A0 =A0 Thanks, =A0 Paul =A0 data test; othervar =3D 'test string'; passfail =3D '^_^_^_^_ ^S=3D{font_face=3Dwingdings}o ^S=3D{}Pass'||'^-2n'||= '^_^_^_^_ ^S=3D{font_face=3Dwingdings}o ^S=3D{}Fail'; run; ods escapechar =3D '^'; ods listing close; ods msoffice2k file=3D'test.doc' style=3Dminimal; =A0 proc report data=3Dtest nowindows split=3D'|' style(report)=3D{font_size=3D= 10pt}; column othervar passfail; define othervar / display 'Othervar' style(header) =3D [just=3Dcenter] styl= e(column) =3D [just=3Dcenter cellwidth=3D1in]; define passfail / display 'Pass/Fail' style(header) =3D [just=3Dcenter] sty= le(column) =3D [just=3Dl cellwidth=3D1in]; run; =A0 ods msoffice2k close; ods listing; =A0 =A0=0A=0A=0A _________________________________________________________= _________=0AThe new Internet Explorer=AE 8 - Faster, safer, easier. Optimi= zed for Yahoo! Get it Now for Free! at http://downloads.yahoo.com/ca/inter= netexplorer/
|
Pages: 1 Prev: How to write code to cancel all submitted code Next: SAS Oracle Update with work library |