BookmarkSubscribeRSS Feed
putteringpluie
Obsidian | Level 7

I'm using the code given in this example to create drill down charts: https://v8doc.sas.com/sashtml/gref/z1025699.htm.

 

I'm using the path to my home folder in the linux server to output all the html files, i.e., the first line for me is 

filename odsout '/home/username/';

 When I click on the 'Company Sales' graph for the central region, I just get the error "Unable to locate the hyperlink. central.html". I was expecting it to open the central.html file that is sitting on my home folder. 

 

 I see that all the html files are getting generated in my home folder on the SAS Linux server. EG is running on a Citrix machine. How do I make EG find the html files? 

 

SAS EG Version: 7.1

7 REPLIES 7
Reeza
Super User
That's a really, really old reference (2 decades maybe).

Try changing HTML to HTML5 and see if you get the desired behaviour.

The issue here is HTML isn't a single file, its a text file that has links and references to other files and images. So when you have that file, you need to know where the other items are. You can control that on the ODS statement using the PATH option.

Alternatively HTML5 embeds all the images and references into a single file which makes it easier to share.

I think this is a newer version of what you're trying to do:
https://documentation.sas.com/?docsetId=graphref&docsetTarget=p047mq2iwpwvnun1d4fh57wdcpzp.htm&docse...
putteringpluie
Obsidian | Level 7

Thank you the reply. Changing to ods html5 did not change the result. 

 

The example code in the newer link is also giving me trouble. For example, I only see a blank page in the results tab in EG and the regsales.html and salesreport.html files are not showing up at all in the 'Results - HTML' tab in EG. Any ideas?

Reeza
Super User
Show the full code you ran and the log please.
putteringpluie
Obsidian | Level 7

Please find attached the sas log and the screenshot of the results. I don't see any error in the logs. 

Reeza
Super User
I can't test your code if you don't post it.
putteringpluie
Obsidian | Level 7

Sorry, its the same code that was given in your link. I just changed the filename gout to point to my home folder in linux.  

 

filename gout "/home/username/";
data regsales(drop=drillurl imgurl);
   length Region State $8 drillurl imgurl $50 htmlstr $256;
   format Sales dollar8.;
   input Region State Sales drillurl imgurl;

   /* Create and add the HTML variable for each observation. */
   htmlstr="href="||quote(trim(drillurl))||
      " title="||quote(trim(Region)||" Region") ||
      " ONMOUSEOVER=ShowImage("||quote(trim(imgurl))||
      ",400,25,200,200); changeOpacity(.5)";

datalines;
Central IL 18038 ./regsales.html#rpt  ./sales.png
Central IN 13611 ./regsales.html#rpt  ./sales.png
Central OH 11084 ./regsales.html#rpt  ./sales.png
Central MI 19660 ./regsales.html#rpt  ./sales.png
South   FL 14541 ./regsales.html#rpt1 ./sales1.png
South   GA 19022 ./regsales.html#rpt1 ./sales1.png
West    CA 13636 ./regsales.html#rpt2 ./sales2.png
West    OR 18988 ./regsales.html#rpt2 ./sales2.png
West    WA 14523 ./regsales.html#rpt2 ./sales2.png
;
goptions reset=all border device=svg xpixels=600 ypixels=450;
ods _all_ close;
ods html body="salesreport.html" path=gout style=listing
    parameters=("drilldownmode"="html");
title1 "Company Sales";
footnote1 j=c "Click bar to view an enlarged region graph.";
proc gchart data=regsales;
   vbar region / sumvar=sales width=8
   patternid=midpoint
   html=htmlstr; /* Set the HTML variable to htmlstr. */
run;
quit;
ods html close;
proc greplay nofs igout=work.gseg;
   delete _all_;
run;
quit;
goptions reset=all border device=pngt;
options nobyline;
ods html body="regsales.html" path=gout anchor="rpt"
   style=listing;
title "#byval(region) Region Sales";
proc gchart data=regsales;
   vbar state / sumvar=sales width=10 name="sales" patternid=midpoint;
   by region;
run;
quit;
ods html close; 

 

Reeza
Super User
Doesn't look like you've changed it to HTML5....

sas-innovate-2024.png

Available on demand!

Missed SAS Innovate Las Vegas? Watch all the action for free! View the keynotes, general sessions and 22 breakouts on demand.

 

Register now!

How to Concatenate Values

Learn how use the CAT functions in SAS to join values from multiple variables into a single value.

Find more tutorials on the SAS Users YouTube channel.

Click image to register for webinarClick image to register for webinar

Classroom Training Available!

Select SAS Training centers are offering in-person courses. View upcoming courses for:

View all other training opportunities.

Discussion stats
  • 7 replies
  • 975 views
  • 0 likes
  • 2 in conversation