08-01-2016 11:38 AM
I have created a CSS file that is compatible with SAS EG and would like for everyone in our environment to use it for their reports. I have tested the CSS file using my install of SAS EG and it makes the formatting changes to reports. My team and I want to make this file available at the server level. I've tried making the CSS file available out on our server and putting the path of it in the Style Manager in SAS EG. That didn't work and it kept crashing my Style Manager. The option that I was given was to manually send out my CSS file and hope everyone who wants to use it makes the necessary changes to their SAS EG. Since a lot of our users do not have administrator rights to their machine, they won't be able to save the CSS file to their C drive in the Style folder under SAS EG and then make the necessary changes within SAS EG. Is there a way the I can put the file out on a server and then users will be able to link the CSS file to their SAS EG using Style Manager?
08-01-2016 04:46 PM
In Style Manager, click Add... to create a new style. Select Add new external style and give it a name, then specify a URL where you placed it on your intranet.
You then would need to set your default style to this new style name.
Yes, each user would need to complete this step.
As an alternative, you can use PROC TEMPLATE in SAS to read in a CSS file and create a new ODS template style. Then the steps to use are a little different.
The advantage of this approach (while it seems like more work) is that the new style can also work for PDF and RTF (and ODS EXCEL and POWERPOINT in 9.4).
08-08-2016 12:54 PM
Does the version of SAS EG matter when doing these steps? I am running SAS EG 7.1 but the user is running SAS EG 5.1. I have a user who is helping me out and I told him to save the CSS file to C:\Users\<userID>\AppData\Roaming\SAS\SharedSettings\Styles and then add a new Style in the Style Manager. Then we he executes his report and attempts to change the format, it gives him the error saying Style Not found; Default style will be used instead.
But when I perform these steps with EG 7.1, it allows me to preview the style after I made the changes to the Style Manager and successfully changes the format of my reports.
08-08-2016 01:26 PM
I think that he might be seeing the warning about the style not being found because SAS can't find the ODS template style with that name. Even though the CSS reference is probably coming through, you still need the STYLE= value to refer to a style that SAS can find in templates...or else SAS issues the warning.
To solve, you can have him create a "shim" style with that name ("mystyle" in this example):
proc template; define style mystyle; parent=minimal; end; run;