Date: Wed, 14 Oct 2009 08:04:08 -0700
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
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
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;
> Col_01 length = $15
> Col_02 length = $5
> infile datalines truncover;
> @01 Col_01 $15.
> @20 Col_02 $5.
> record # 1 right
> record # 2 wrong
> record # 3 right
> record # 4 right
> record # 5 right
> record # 6 wrong
> record # 7 right
> %macro print;
> ods listing close;
> ods escapechar = '^';
> ods rtf file = "d:\temp\test.doc";
> proc print data = test noobs;
> ods rtf close;
firstname.lastname@example.org <== Use this, not jfh @ stanfordalumni.org
Tots units fem força!