BookmarkSubscribeRSS Feed
🔒 This topic is solved and locked. Need further help from the community? Please sign in and ask a new question.
svh
Lapis Lazuli | Level 10 svh
Lapis Lazuli | Level 10

I'm having trouble understanding how SAS Enterprise Guide determines where to send HTML output. In the windowing environment, I could define a style and run code such as the program below  and obtain my output in the results window.

 

proc template;
  define style mystyle;
  parent=styles.default;
    class graphbackground /
          color=white;
    style GraphData1 from GraphData1 /
          contrastcolor=red linestyle=1 ;
    style GraphData2 from GraphData2 /
          contrastcolor=blue linestyle=1 ;
	     style GraphFonts from GraphFonts /
	  'GraphDataFont' = ("Arial", 12pt)
	  'GraphLabelFont' = ("Palatino", 12pt)
	  'GraphValueFont' = ("Arial Bold", 11pt)
	  'GraphAnnoFont' = ("Palatino", 11pt)
	  'GraphTitleFont' = ("Arial", 14pt);
  end;
run;

ods html style=mystyle;
 proc sgplot data=have ;
   vbar total/ datalabel stat=percent );
   label total = "Course Completions";
   run;

 

However, in SAS Enterprise Guide 8.2, when I run this code, I receive an error message:

 

ERROR: Insufficient authorization to access C:\WINDOWS\system32\sashtml24.htm.
ERROR: No body file. HTML output will not be created.

 

Can I have it the old way when my styled output just appeared in the results window? 

1 ACCEPTED SOLUTION

Accepted Solutions
ChrisHemedinger
Community Manager

EG generates some of this ODS wrapper for you, and you can tap into that with your custom style options.  Try this:

 

/* HTML5 is default in EG 8.2 */
ods html5(id=eghtml) style=mystyle;
 proc sgplot data=have ;
   vbar total/ datalabel stat=percent );
   label total = "Course Completions";
  run;
SAS For Dummies 3rd Edition! Check out the new edition, covering SAS 9.4, SAS Viya, and all of the modern ways to use SAS!

View solution in original post

3 REPLIES 3
ChrisHemedinger
Community Manager

EG generates some of this ODS wrapper for you, and you can tap into that with your custom style options.  Try this:

 

/* HTML5 is default in EG 8.2 */
ods html5(id=eghtml) style=mystyle;
 proc sgplot data=have ;
   vbar total/ datalabel stat=percent );
   label total = "Course Completions";
  run;
SAS For Dummies 3rd Edition! Check out the new edition, covering SAS 9.4, SAS Viya, and all of the modern ways to use SAS!
svh
Lapis Lazuli | Level 10 svh
Lapis Lazuli | Level 10

Thank you! I did try to look in the online documentation for a fix, but was unsuccessful. Is there a section of the SAS site that addresses these "wrapper" issues that people face when they transition from the windowing environment?

ChrisHemedinger
Community Manager

I'm not sure this is covered in the reference doc, but we have made some other practitioner info available in articles like this one.

 

There are many considerations when you run code in EG that can make it different when running in batch, traditional SAS, SAS Studio, etc.  When you have code that needs to run in multiple places, the onus is on the programmer to examine the "environment" interactions (file interactions, for example) that need to be generalized or set up in conditions.

SAS For Dummies 3rd Edition! Check out the new edition, covering SAS 9.4, SAS Viya, and all of the modern ways to use SAS!

hackathon24-white-horiz.png

The 2025 SAS Hackathon has begun!

It's finally time to hack! Remember to visit the SAS Hacker's Hub regularly for news and updates.

Latest Updates

Creating Custom Steps in SAS Studio

Check out this tutorial series to learn how to build your own steps in SAS Studio.

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
  • 3 replies
  • 2736 views
  • 0 likes
  • 2 in conversation