This sample includes a downloadable custom add-in task that can be used in SAS Enterprise Guide 4.2. You can use the task to create reports with conditional highlighting, also known as trafficlighting. Click the Output tab to see an example report.
For more information about using SAS Enterprise Guide, see the SAS Enterprise Guide documentation page.
To report any questions or problems regarding this sample, contact SAS Technical Support.
These sample files and code examples are provided by SAS Institute Inc. "as is" without warranty of any kind, either express or implied, including but not limited to the implied warranties of merchantability and fitness for a particular purpose. Recipients acknowledge and agree that SAS Institute shall not be liable for any damages whatsoever arising out of their use of this material. In addition, SAS Institute will provide no support for the materials contained herein.
The following shows sample code that was generated by the Conditional Highlighting custom add-in task.
This code will run "as is" on a machine with SAS 9.2 that includes the SASHELP library.
options nobyline;
title1 f= 'Times New Roman/B' h= 16 PT c= cx0000ff 'Highlight based on Age';
title2 f= 'Times New Roman/B' h= 16 PT c= cx0000ff '#byvar(Sex) = #byval(Sex)';
proc sort data=SASHELP.CLASS out=sorted;
by descending Sex descending Height ;
run;
proc report nowd data=sorted;
column Name Sex Age Height Weight ;
define Age / display;
compute Age;
if Age < 13 then call define (_col_,'style','style=[background=cxD06959 foreground=cx0000ff]');
if Age = 13 then call define (_col_,'style','style=[background=cxF1DC63 foreground=cx0000ff]');
if Age > 13 then call define (_col_,'style','style=[background=cx84AF5B foreground=cx0000ff]');
endcomp;
by descending Sex ;
run;
These sample files and code examples are provided by SAS Institute Inc. "as is" without warranty of any kind, either express or implied, including but not limited to the implied warranties of merchantability and fitness for a particular purpose. Recipients acknowledge and agree that SAS Institute shall not be liable for any damages whatsoever arising out of their use of this material. In addition, SAS Institute will provide no support for the materials contained herein.
Here is a sample report generated by the Conditional Highlighting custom add-in task.
To install and use the custom add-in task in SAS Enterprise Guide 4.2, follow these steps:
If column_name = some_value
.This display shows the Conditional Highlighting task interface.
Type: | Sample |
Date Modified: | 2011-01-05 14:58:23 |
Date Created: | 2010-12-22 16:37:59 |
Product Family | Product | Host | Product Release | SAS Release | ||
Starting | Ending | Starting | Ending | |||
SAS System | SAS Enterprise Guide | Windows 7 Professional 32 bit | 4.2 | 9.2 TS2M2 | ||
Windows 7 Professional x64 | 4.2 | 9.2 TS2M2 | ||||
Windows 7 Home Premium x64 | 4.2 | 9.2 TS2M2 | ||||
Windows 7 Home Premium 32 bit | 4.2 | 9.2 TS2M2 | ||||
Windows 7 Enterprise x64 | 4.2 | 9.2 TS2M2 | ||||
Windows 7 Enterprise 32 bit | 4.2 | 9.2 TS2M2 | ||||
Microsoft Windows XP Professional | 4.2 | 9.2 TS2M2 | ||||
Microsoft Windows Server 2008 | 4.2 | 9.2 TS2M2 | ||||
Microsoft Windows Server 2008 for x64 | 4.2 | 9.2 TS2M2 | ||||
Microsoft Windows Server 2003 for x64 | 4.2 | 9.2 TS2M2 | ||||
Microsoft Windows Server 2003 Standard Edition | 4.2 | 9.2 TS2M2 | ||||
Microsoft Windows Server 2003 Enterprise Edition | 4.2 | 9.2 TS2M2 | ||||
Microsoft Windows Server 2003 Datacenter Edition | 4.2 | 9.2 TS2M2 | ||||
Microsoft® Windows® for x64 | 4.2 | 9.2 TS2M2 | ||||
Windows 7 Ultimate 32 bit | 4.2 | 9.2 TS2M2 | ||||
Windows 7 Ultimate x64 | 4.2 | 9.2 TS2M2 | ||||
Windows Vista | 4.2 | 9.2 TS2M2 | ||||
Windows Vista for x64 | 4.2 | 9.2 TS2M2 |