BookmarkSubscribeRSS Feed
Lost_Gary
Quartz | Level 8

I send a number of emails directly from SAS with charts or attached reports as a time saver - it is a wonderful tool.  I am attempting to include a graph and i am getting an error.  Below is my code and my error message.  

 

filename fileref email ("myemail@myemail.com")
From="myemail@myemail.com"
Subject="Language Preference"
type ="text/html";

ods html body= fileref ;
proc gchart data=test;
vbar languagePref/
sumvar=count
sum
inside=freq
outside=percent
percent
descending;

run;

ods html close;
filename fileref clear;

 

Log States:

ERROR: Insufficient authorization to access C:\WINDOWS\system32\gchart5.svg.

 

I only get the error when i try to embed this in an email otherwise the graph produces just fine (which puzzles me).  I am running EG 8.3 Update 5.  Thanks for the help.  

 

5 REPLIES 5
Reeza
Super User
Out of curiosity, what happens if you use HTML5 instead of HTML?

HTML doesn't embed a picture, it links it, HTML5 embeds images in the file directly.
Lost_Gary
Quartz | Level 8

it produces an email, but the details are in a string.  

 

Bar chart of Language Preference .18% .09% count sum 0 1000 2000   

 

Not the graph that I am looking for.  

Reeza
Super User
Interesting - you can specify the GPATH location on your ODS statement, set it to somewhere you do have write access and see if that attaches it correctly.
Lost_Gary
Quartz | Level 8

I can attach the graph as an HTML - but if i try to embed it  (which is what i want - open email see graph) it give me the same error.  

SAS Innovate 2025: Register Now

Registration is now open for SAS Innovate 2025 , our biggest and most exciting global event of the year! Join us in Orlando, FL, May 6-9.
Sign up by Dec. 31 to get the 2024 rate of just $495.
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.

SAS Training: Just a Click Away

 Ready to level-up your skills? Choose your own adventure.

Browse our catalog!

Discussion stats
  • 5 replies
  • 1274 views
  • 0 likes
  • 2 in conversation