LISTSERV at the University of Georgia
Menubar Imagemap
Home Browse Manage Request Manuals Register
Previous (more recent) messageNext (less recent) messagePrevious (more recent) in topicNext (less recent) in topicPrevious (more recent) by same authorNext (less recent) by same authorPrevious page (April 2006, week 2)Back to main SAS-L pageJoin or leave SAS-L (or change settings)ReplyPost a new messageSearchProportional fontNon-proportional font
Date:         Tue, 11 Apr 2006 16:10:56 -0500
Reply-To:     Deborah Wentworth <debby@CCBR.UMN.EDU>
Sender:       "SAS(r) Discussion" <SAS-L@LISTSERV.UGA.EDU>
From:         Deborah Wentworth <debby@CCBR.UMN.EDU>
Subject:      Re: formatting titles when using bodytitle
Comments: To: Ya Huang <ya.huang@amylin.com>
In-Reply-To:  <200604112101.k3BJ5DEJ011826@mailgw.cc.uga.edu>
Content-Type: TEXT/PLAIN; charset=US-ASCII

On Tue, 11 Apr 2006, Ya Huang wrote:

Ya, thanks again. I think maybe you're right. I've been using proc print, and I don't know proc report very well, but with your snippet of code I may be able to figure out how to do it in proc report. What I need is to create a line that spans column headers and is centered about them - that looks like what you're demonstrating for me.

Thanks very much for the help! I'll give this a try.

Deb

> Date: Tue, 11 Apr 2006 17:01:24 -0400 > From: Ya Huang <ya.huang@amylin.com> > To: SAS-L@listserv.uga.edu, Deb Wentworth <debby@CCBR.UMN.EDU> > Cc: Ya Huang <ya.huang@amylin.com> > Subject: Re: formatting titles when using bodytitle > > Deb, > > >From what you said here, this could be what you are looking for: > > ods rtf file="c:\temp\junk.rtf"; > > proc report data=sashelp.class nowd; > column name age sex weight height; > define name / display; > compute before _page_ / style=[backgroup=red]; > line "This is the your tile"; > endcomp; > title; > run; > > ods rtf close; > > Ya > > On Tue, 11 Apr 2006 15:50:10 -0500, Deborah Wentworth <debby@CCBR.UMN.EDU> > wrote: > > >On Tue, 11 Apr 2006, Terjeson, Mark (IM&R) wrote: > > > >Mark and Ya - > > > >Thanks for your comments. I can't replicate your example, Ya - I don't > >know why. I thought bobytitle had been introduced with version 9. When I > >use bc in my title statement, I don't get an error but I also don't get > >any background color! > > > >Mark for sharing this elegant code! However, it's well beyond what I'm > >capable of doing now with this new (to me) RTF stuff. > > > >After reading & experimenting some more, I don't think I can do what I > >wanted to do. I was assuming that the option bodytitle created a new > >table row above the column headers and spanned these headers. Now I see > >that isn't exactly what is going on. So now I think that even if I could > >get the background to match that of the column headers, it would look > >weird, since the row width would be different for the title & the column > >headers. If that made sense.... > > > >Thanks for trying to help me. Guess I'm back to the drawing board with > >this. > > > >Deb > > > >> Date: Tue, 11 Apr 2006 13:20:14 -0700 > >> From: "Terjeson, Mark (IM&R)" <Mterjeson@russell.com> > >> To: Deborah Wentworth <debby@CCBR.UMN.EDU>, SAS-L@listserv.uga.edu > >> Subject: RE: formatting titles when using bodytitle > >> > >> Hi Deb, > >> > >> When creating an RTF and needing special > >> font handling in different locales such > >> as titles or footnotes or even in cell > >> values or other text strings around the > >> page, the inline style escape character > >> coupled with RTF syntax can provide some > >> custom tweaking midstream in text strings. > >> Here are some samples: > >> > >> > >> > >> %let quote=%str(%');*'; > >> %let amp=%nrstr(&); > >> > >> > >> * set all or part of a text string to bold ; > >> data mydata; > >> merge aaa (in=a) > >> bbb (in=b); > >> by blah; > >> > >> if blahblah then > >> pass='^S={font_weight=bold}No^S={}'; > >> else > >> pass='Yes'; > >> end; > >> run; > >> > >> > >> * set all or part of a text string to a blue URL link ; > >> data xxxxx; > >> set wwwww; > >> if blah then > >> reqtext='^S={font_weight=bold}'||trim(some_text)||'^S={}'; > >> else > >> reqtext='^S={URL="http://blah.blah.com/cgi-bin/broker'|| > >> > >> '?_program=blah.blah.blah.scl&amp.yourvar=Y&amp.myvar=BLAH'|| > >> '&amp.test_date=&test_date" asis=yes foreground=blue} > >> ^R/RTF"\ul "'||trim(name_text)||'^S={}'; > >> run; > >> > >> > >> ods rtf(1) file='./myresult.rtf' style=mystyle; > >> ods proclabel "Aaaaaa Bbbbbbb Ccccccc"; > >> > >> > >> * set part of title or footnote to different font and weight ; > >> * insert RTF recognized blank lines into footer area (\par) ; > >> proc report data=mydata headline headskip missing split='\' > >> contents="blahblah"; > >> title1 J=L "My Title 111"; > >> title2 j=l "My Title 222"; > >> title3 j=l "My Title 333"; > >> footnote1 j=l 'Action Taken/Comments: ^S={font_size=8pt > >> font_face=Arial font_weight=light font_style=roman}(double-click to edit > >> comments section)'; > >> footnote2 j=l '{\par\par\par\par}'; > >> footnote3 j=l 'My Footnote 333'; > >> col var1 var2 pass; > >> define var1 /group noprint; > >> define var2 /display "My Heading"; > >> define pass /display 'blah blah blah' > >> style={just=center}; > >> compute before var2; > >> line ' '; > >> endcomp; > >> run; > >> > >> ods rtf close; > >> > >> > >> > >> > >> > >> > >> Hope this is helpful. > >> > >> > >> Mark Terjeson > >> Senior Programmer Analyst, IM&R > >> Russell Investment Group > >> > >> > >> Russell > >> Global Leaders in Multi-Manager Investing > >> > >> > >> > >> > >> > >> -----Original Message----- > >> From: SAS(r) Discussion [mailto:SAS-L@LISTSERV.UGA.EDU] On Behalf Of > >> Deborah Wentworth > >> Sent: Tuesday, April 11, 2006 12:20 PM > >> To: SAS-L@LISTSERV.UGA.EDU > >> Subject: formatting titles when using bodytitle > >> > >> > >> Greetings SAS experts - > >> > >> I have a question that I'm not sure I can adequately verbalize. > >> > >> I've been following Lauren Haworth's very handy paper on making a > >> template for RTF output for my first tentative stabs at creating a > >> template. I'm also using the bodytitle option to put the title into the > >> body of my table (a table resulting from proc print). > >> > >> Here's my question. The title is now in some nameless area above the > >> column headers but within the table. I would like to format that area > >> so the title has the same background color as the column headers. > >> > >> I haven't been able to figure out how to do that, either within proc > >> template or within the title statement in the proc print. The procedure > >> seems to ignore my attempts at setting BCOLOR in the title statement. > >> > >> Could someone provide some guidance as to how to do this? > >> > >> Many thanks in advance - > >> > >> Deb > >> > >> >|<>|<>|<>|<>|<>|<>|<>|<>|<>|<>|<>|<>|<>|<>|<>|<>|<>|< > >> > < > >> > Deborah Wentworth < > >> > Coordinating Centers for Biometric Research < > >> > Division of Biostatistics, University of Minnesota < > >> > 612.626.9005 < > >> > < > >> >|<>|<>|<>|<>|<>|<>|<>|<>|<>|<>|<>|<>|<>|<>|<>|<>|<>|< > >> > > > >>|<>|<>|<>|<>|<>|<>|<>|<>|<>|<>|<>|<>|<>|<>|<>|<>|<>|< > >> < > >> Deborah Wentworth < > >> Coordinating Centers for Biometric Research < > >> Division of Biostatistics, University of Minnesota < > >> 612.626.9005 < > >> < > >>|<>|<>|<>|<>|<>|<>|<>|<>|<>|<>|<>|<>|<>|<>|<>|<>|<>|< >

>|<>|<>|<>|<>|<>|<>|<>|<>|<>|<>|<>|<>|<>|<>|<>|<>|<>|< > < > Deborah Wentworth < > Coordinating Centers for Biometric Research < > Division of Biostatistics, University of Minnesota < > 612.626.9005 < > < >|<>|<>|<>|<>|<>|<>|<>|<>|<>|<>|<>|<>|<>|<>|<>|<>|<>|<


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