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 (October 2009, week 2)Back to main SAS-L pageJoin or leave SAS-L (or change settings)ReplyPost a new messageSearchProportional fontNon-proportional font
Date:         Wed, 14 Oct 2009 08:04:08 -0700
Reply-To:     jfh@stanfordalumni.org
Sender:       "SAS(r) Discussion" <SAS-L@LISTSERV.UGA.EDU>
From:         Jack Hamilton <jfh@STANFORDALUMNI.ORG>
Subject:      Re: How to sofisticate ODS reports by using colors for rows and
              columns
Comments: To: Anaconda <rune@FASTLANE.NO>
In-Reply-To:  <437bad0e-75cc-4dd4-9ee9-793fd2f2e883@m11g2000yqf.googlegroups.com>
Content-Type: text/plain; charset="ISO-8859-1"

No, this is not something you would do with a macro.

The easiest way to do this is probably to use PROC REPORT insteaqd of PROC PRINT, and use CALL DEFINE in a compute block to reset the color of particular cells.

If you want to make a particular column yellow in all cases, you could use a Style, and that would work in either proc report or proc print.

You could also do any of this in a custom template, but I don't think that's the easiest solution.

On Tue, 13 Oct 2009 22:49:09 -0700, "Anaconda" <rune@FASTLANE.NO> said: > /* > Below is an example code of wrting a simple > report using ODS. > > How can I make the program so that I can mark the > records (both columns) with colour (yellow, for instance) > in those two cases where Col_02 = "wrong"? > > And how can I make SAS colour the column Col_02 > if I wanted? > > Could this be a suitable task to be handled by a macro? > Does anyone know about the existence of a such one? > > - Anaconda > */ > > > data test; > attrib > Col_01 length = $15 > Col_02 length = $5 > ; > infile datalines truncover; > input > @01 Col_01 $15. > @20 Col_02 $5. > ; > datalines; > record # 1 right > record # 2 wrong > record # 3 right > record # 4 right > record # 5 right > record # 6 wrong > record # 7 right > ; > run; > > %macro print; > ods listing close; > ods escapechar = '^'; > ods rtf file = "d:\temp\test.doc"; > proc print data = test noobs; > run; > ods rtf close; > %mend; > %print;

-- Jack Hamilton Sacramento, California jfh@alumni.stanford.org <== Use this, not jfh @ stanfordalumni.org

Tots units fem força!


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