Hi Experts, I copied the below example from SAS/GRAPG 9.3 reference. Why “Click a bar for details” does not work in file ‘salesrpt_single_page.pdf’ (not through SAS) ? Thank you! /* Example: Writing a Drill-Down Graph to a PDF File */ /* Define the PDF output filename. */ filename outp "salesrpt_single_page.pdf"; /* Define the ODS output path. */ filename odsout "."; /* Define the base URL for the links. */ %let baseurl=.; /* Create the data set REGSALES. */ data regsales; length Region State $ 8 Location $ 15; format Sales dollar8.; input State Region Location Sales; datalines; IL Central EVANSTON 18038 IL Central CHICAGO 14322 IL Central AURORA 10768 OH Central COLUMBUS 13611 OH Central DAYTON 11084 OH Central CINCINNATI 19534 FL South MIAMI 14541 FL South TAMPA 16733 NC South RALEIGH 19022 NC South WILMINGTON 12876 NC South CHARLOTTE 13498 CA West SANTA-CRUZ 13636 CA West LONG-BEACH 15687 WA West SEATTLE 18988 WA West TACOMA 14523 ; /* Add the link information to the data. */ data regsales; set regsales; length RPTR $ 80; if (Region="Central") then RPTR="&baseurl./Central.htm"; else if (Region="South") then RPTR="&baseurl./South.htm"; else if (Region="West") then RPTR="&baseurl./West.htm"; else RPTR=.; run; /* Close the HTML destination and set the graphics options. */ ods html close; goptions reset=all device=png border xpixels=520 ypixels=450; /* Clear titles and footnotes */ title; footnote; /* Create a macro to use for generating the region charts. */ %macro do_region(region); /* Open ODS HTML destination. Use the region name as the filename */ ods html file="®ion..htm" path=odsout style=listing; /* Set the axis label and title */ axis1 label=("Total Sales"); title1 "Total Sales in ®ion Region"; /* Create the chart */ proc gchart data=regsales; vbar3d state / sumvar=sales outside=sum name="region" raxis=axis1 patternid=midpoint description="Total sales for ®ion region" shape=cylinder width=15; where region="®ion"; run; quit; /* Close the ODS HTML destination */ ods html close; %mend do_region; /* Call the %DO_REGION macro for Central, South, and West. */ %do_region(Central); %do_region(South); %do_region(West); /* Open the PDF destination and set the style. */ ods pdf style=statistical; /* Set the graphics options. You must use the PDF or PDFA device. */ goptions reset=all gsfname=outp device=pdf border vorigin=2.5in horigin=0.6in vsize=550pt hsize=520pt; /* Generate the Company Sales report PDF document. */ title1 "Company Sales Report"; title2 "Sales by Region"; footnote1 "(Click a bar for details.)"; axis1 label=("Total Sales") reflabel=(j=r "Target "); proc gchart data=regsales; vbar3d region / cref=red lref=3 ref=62000 /* Draw a reference line at the */ /* sales target. */ sumvar=sales outside=sum raxis=axis1 shape=cylinder width=15 patternid=midpoint description="Company sales report" url=RPTR; /* Specify RPT as the URL variable in the data. */ run; quit; /* Close the PDF destination and open HTML */ ods pdf close; ods html; /* Reset graphics options, titles, and footnotes */ goptions reset=all; title; footnote;
... View more