SAS中文论坛

标题: ODS TIPS:如何在报告中根据值的不同填色 [打印本页]

作者: shiyiming    时间: 2003-11-12 19:26
标题: ODS TIPS:如何在报告中根据值的不同填色
data ddt;
  input x y;
cards;
1 25
2 30
3 40
4 50
5 55
7 60
6 90
;

/*Create format for the colors; */
proc format;
  value tlight low-40='Green'
              40-60='Yellow'
              60-high='Red';
run;

/*Create the report and direct it to html using ODS; */
filename new 'c:\cooltable.html';
ods listing close;

ods html body=new;
proc report data=ddt nowd headline;
  column X Y;
  define X / display 'x-label' style(column)=[foreground=black background=white];
  define Y / analysis 'y-label' style(column)=[foreground=white background=tlight.];
run;

ods html close;
ods listing;


上面的CODE实现了根据给定值的大小填色的目的,想请较,如果想对最大/小值填色如何实现,先用macro 去取值,然后在做FORMAT吗?
作者: shiyiming    时间: 2012-7-20 20:28
标题: Re: ODS TIPS:如何在报告中根据值的不同填色
Mark
作者: shiyiming    时间: 2012-7-22 13:54
标题: Re: ODS TIPS:如何在报告中根据值的不同填色
马克




欢迎光临 SAS中文论坛 (http://www.mysas.net/forum/) Powered by Discuz! X3.2