Sample 25246: Produce an HTML file with drill down capabilities.
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.
/*********************************************************/
/* */
/* This program uses ODS to generate a drill-down graph. */
/* Click on an individual bar on the chart to view PROC */
/* PRINT output which corresponds to that bar. */
/* */
/*********************************************************/
/* This is the only line you have to change to run */
/* the program. Specify a location in your file */
/* system. */
filename odsout 'path-to-Web-server';
/* Close the listing destination. */
ods listing close;
/* Set general graphics options. */
goptions reset=all gunit=pct
htitle=6 htext=4
ftitle=zapfb ftext=swiss;
/* Create data set REGSALES. */
data regsales;
length Region State $ 8;
format Sales dollar8.;
input Region State Sales;
/* The HTML variable. */
length rpt $40.;
/* Assign values to HTML variables. */
if Region = 'Central' then
rpt = 'href="central.htm"';
else if Region = 'South' then
rpt = 'href="south.htm"';
else if Region = 'West' then
rpt = 'href="west.htm"';
datalines;
West CA 13636
West OR 18988
West WA 14523
Central IL 18038
Central IN 13611
Central OH 11084
Central MI 19660
South FL 14541
South GA 19022
;
/* Assign graphics options for ODS output. */
goptions device=gif transparency noborder
xpixels=450 ypixels=400;
/* Open the HTML destination for ODS output. */
ods html body = 'sales.htm'
path = odsout;
/* Create a chart that uses the HTML variable. */
title1 'Company Sales';
proc gchart data=regsales;
vbar3d region / sumvar = sales
patternid = midpoint
html = rpt;
run;
quit;
/* Open a body file for report on Central sales. */
ods html body = 'central.htm'
path = odsout;
title1 'Central Sales';
proc print data=regsales noobs;
var state sales;
where region='Central';
run;
/* Open a body file for report on Southern sales. */
ods html body = 'south.htm'
path = odsout;
title1 'Southern Sales';
proc print data=regsales noobs;
var state sales;
where region='South';
run;
/* Open a body file for report on Western sales. */
ods html body = 'west.htm'
path = odsout;
title1 'Western Sales';
proc print data=regsales noobs;
var state sales;
where region='West';
run;
quit;
/* Close the HTML destination. */
ods html close;
/* Open the listing destination. */
ods listing;
goptions reset=all;
filename odsout clear;
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.
This code produces an HTML file with a Table of Contents (TOC).
Click here to see the frameset:
See the frameset
This sample produces an HTML File with drill down capabilities with the GIF device driver.
Type: | Sample |
Topic: | Third Party ==> Output ==> Device Drivers ==> GIF, JPEG, PNG SAS Reference ==> ODS (Output Delivery System)
|
Date Modified: | 2005-09-01 03:03:08 |
Date Created: | 2005-03-04 12:45:36 |
Operating System and Release Information
SAS System | SAS/GRAPH | All | n/a | n/a |