Sample 41942: Conditional highlighting using a custom add-in task in SAS® Enterprise Guide® 4.2
Overview
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.
Additional Documentation
For more information about using SAS Enterprise Guide, see the SAS Enterprise Guide documentation page.
Problems or questions
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:
- Click the link and save the zip file to your SAS Enterprise Guide machine:
ConditionalHighlighting
- Unzip the file to extract the ConditionalHighlighting.dll file.
- Open SAS Enterprise Guide 4.2.
- Select Tools ► Add-In ► Add-In Manager ► Browse.
- Select and open the ConditionalHighlighting.dll file, and then click OK to close the Add-In Manager tool.
- Open the Conditional Highlighting task by selecting
Tools ► Add-In ► SAS Custom Examples ► Conditional Highlighting
- You will be prompted to open some data if there is none in the Process Flow.
- Assign one or more columns to Columns to list.
- Assign a column to Column 1 to highlight.
- Build a simple condition. For example, the condition might be
If column_name = some_value
.
- Click Run to generate the report.
This display shows the Conditional Highlighting task interface.
This sample includes a downloadable custom add-in task that can be used in SAS Enterprise Guide 4.2 only. You can use the task to create reports with conditional highlighting, also known as trafficlighting.
Date Modified: | 2011-01-05 14:58:23 |
Date Created: | 2010-12-22 16:37:59 |
Operating System and Release Information
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 | |