SAS OnlineTutor HomeFAQ PageSuggested Learning PathsContents+Searchback||next

Creating Drill-Down Graphs in HTML
Setting ODS HTML Options


As the next step, before creating linked graphs and HTML pages, you must direct SAS software to use HTML output.

specifying HTML output
In the lesson Producing HTML Output, you learned that the ODS HTML statement writes program output to HTML files. Close ODS listing output to conserve system resources, and then open ODS HTML output.
     ods listing close;
     ods html;


The ODS HTML Statement for Drill-Down Graphs

For drill-down graphs, add two options to the ODS HTML statement:

  1. First, use the PATH= option to specify a location for storing GIF and HTML files. The directory specified by PATH= must exist on your system; ODS will not create it for you.
     ods html path='c:\data\sales\reports';
Tip: You can add the GPATH= option to specify a separate location for graphics output. For details, see SAS/GRAPH Software: Reference.
  1. Next, use the BODY= option to name the HTML file that will hold the drill-down chart. This file will be created in the location specified by the PATH= option.
     ods html path='c:\data\sales\reports'
         body='totsales.html';

Example

In this example in the Windows operating environment, both SAS/GRAPH GIF files and HTML output will be stored in C:\Data\Sales\Reports. The file totsales.html will display your program's SAS/GRAPH output when viewed using a Web browser.

     data work.saletrnd;
        set finance.prdsal2;
        format actual dollar10.0;
        length PriDrill $ 40;
        if year=1995 then pridrill='HREF="sales95.html"';
        if year=1996 then pridrill='HREF="sales96.html"';
        if year=1997 then pridrill='HREF="sales97.html"';
        if year=1998 then pridrill='HREF="sales98.html"';
     run;
     ods listing close;
     ods html path='c:\data\sales\reports'
         body='totsales.html';
     run;

  back||next


Copyright © 2002 SAS Institute Inc., Cary, NC, USA. All rights reserved.

Terms of Use & Legal Information | Privacy Statement