BookmarkSubscribeRSS Feed
MrWillz
Fluorite | Level 6

I get this warning no matter how I create a new style.  It is the worst in EG, but it doen't work well in BASE either.  Has anyone seen this or have a solution?

It doesn't matter if I'm running proc sql or proc tabulate.

8 REPLIES 8
ballardw
Super User

Are you in a server environment or stand-alone SAS? If a server is involved it could be that it is not aware of your desired style.

MrWillz
Fluorite | Level 6

@

Cynthia_sas
SAS Super FREQ

Hi:

  There are only a few ways to create a new style template. By default, if you do not use an ODS PATH statement, SAS will try to write your changed style template to the SASUSER library. In some installations, the SASUSER library might go away after every session. This means that your template might get created and might go away. Or, you might not have write access to your SASUSER library or you might be using a server copy of SAS and you do not have write access to a location on the server to make the template permanent.
      

  Other reasons for having this problem are silly things like you create a style called: MYSTYLE, but when you go to use it, you specify STYLE=MSYTYLE (misspelled). The code below illustrates the misspelling possibility. Or, you could be using one of the SAS software components that has its own item store for style templates and you need to use an ODS PATH statement to get your item store in the list. Or, you are using Web Report Studio and you need to get your version of the style loaded into the XML that "runs" Web Report Studio. There are too many possibilities for how things can go wrong to list them all here.
      

  I'd recommend that you work with Tech Support if you have SAS on a server, you are using EG with SAS on a server or your SASUSER library is not write-able to you (or goes away after every session).

Cynthia

ods path work.tmp(update)

         sasuser.templat(update)

         sashelp.tmplmst(read);

 

proc template;

  define style styles.mystyle;

    parent=styles.sasweb;

    class header /

   color=pink

   backgroundcolor=purple;

  end;

run;

  

ods html file='c:\temp\usestyle_good.html' style=styles.mystyle;

proc print data=sashelp.class;

  title 'header should be purple';

run;

ods html close;

  

ods html file='c:\temp\usestyle_wrong.html' style=styles.msytyle;

proc print data=sashelp.class;

  title 'header will be default color because style name misspelled';

run;

ods html close;

MrWillz
Fluorite | Level 6

Thank you for your time.  I'm going to try the ods path code.  And I actually haven't tried proc template to resolve it so I will try that as well.  I'll let you know how it goes.

jakarman
Barite | Level 11

Working with user defined styles can get complicated as there are a lot of them, see also: https://communities.sas.com/thread/60329

---->-- ja karman --<-----
Cynthia_sas
SAS Super FREQ

And, if you do need to use your custom style with Web Report Studio and not with just EG, then you need to look at the documentation for how to work with Web Report Studio and change the style:

SAS(R) 9.3 Intelligence Platform: Web Application Administration Guide, Third Edition

cynthia

MrWillz
Fluorite | Level 6

My solution to this was to process the templates and ODS coding on the Local server instead of the grid.  I could not for the life of me find out how to change the default file location.... which is probably part of the problem in hindsight.  I suppose I could save the templates to my home folder on the grid.

Cynthia_sas
SAS Super FREQ

Hi:

  There's a difference between the style templates used by SAS and ODS, which are stored by default in SASHELP.TMPLMST and SASUSER.TEMPLAT -- 2 item stores that are always part of a SAS Session and the location of CSS files used by Enterprise Guide. Essentially, there is a CSS "version" of most style templates and EG uses this CSS version of the style template. The EG CSS files live on a user's local machine; while the ODS items stores for templates live on the SAS server. So depending on what you mean by "default" file location, you could mean the Style Template item store location (use ODS PATH) and the STYLE= option or the CSS location and the STYLESHEET= option or the CSSSTYLE= option -- the STYLESHEET= option and the CSSSTYLE= options can take a path name or a URL (if the CSS file is stored on the server). So without seeing the code you tried, it's nearly impossible to comment on your statement that you could not "find out how to change the default file location" because that would be dependent on the code technique you used.

cynthia

sas-innovate-2024.png

Join us for SAS Innovate April 16-19 at the Aria in Las Vegas. Bring the team and save big with our group pricing for a limited time only.

Pre-conference courses and tutorials are filling up fast and are always a sellout. Register today to reserve your seat.

 

Register now!

SAS Enterprise Guide vs. SAS Studio

What’s the difference between SAS Enterprise Guide and SAS Studio? How are they similar? Just ask SAS’ Danny Modlin.

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
  • 8 replies
  • 9170 views
  • 0 likes
  • 4 in conversation