Creating Drill-Down Graphs in HTML |
Creating the Secondary Charts and
Tables |
Ordering the PROC Steps
Notice the difference between the BODY= and ANCHOR= options in the ODS HTML statement:
So the order of your PROC steps is important. Make sure the GCHART step that sets links to the anchors precedes the four TABULATE steps that specify each anchor. Each GCHART step creates a new page, which ensures that the tables will appear on the page that contains the related chart. |
ods html body='sales95.html'; title 'Sales for 1995 by Quarter'; proc gchart data=work.saletrnd; vbar quarter / sumvar=actual subgroup=product discrete html=secdrill; where year=1995; run; ods html anchor='salesq1'; title '1st Quarter 1995 Sales by Country'; proc tabulate data=work.saletrnd format=dollar10.0; class country product; var actual; table (country all)*(product all), sum*actual; where year=1995 and quarter=1; run; ods html anchor='salesq2'; title '2nd Quarter 1995 Sales by Country'; proc tabulate data=work.saletrnd format=dollar10.0; class country product; var actual; table (country all)*(product all), sum*actual; where year=1995 and quarter=2; run; ods html anchor='salesq3'; title '3rd Quarter 1995 Sales by Country'; proc tabulate data=work.saletrnd format=dollar10.0; class country product; var actual; table (country all)*(product all), sum*actual; where year=1995 and quarter=3; run; ods html anchor='salesq4'; title '4th Quarter 1995 Sales by Country'; proc tabulate data=work.saletrnd format=dollar10.0; class country product; var actual; table (country all)*(product all), sum*actual; where year=1995 and quarter=4; run; |
Copyright © 2002 SAS Institute Inc.,
Cary, NC, USA. All rights reserved.