BookmarkSubscribeRSS Feed
kmel56
Calcite | Level 5

Hi everybody,

I used to use a sas programme containing a proc template to define my reporting style on SAS 9.3, ans now I'm working on SAS EG, and I want to do the same thing in a CSS style.

the question is: how to transform my proc template programm in a css style wich i can use permanently.

Thanks

1 REPLY 1
Cynthia_sas
SAS Super FREQ

Hi:

  To create a CSS file from an ODS style template (such as the SASWEB style), is very simple. Basically, you use ODS HTML and the STYLESHEET= option and run it 1 time to get the CSS version of the template created. Like this:

ods html path='c:\temp' (url=none)

         file='makecss.html'

         style=sasweb

         stylesheet='sasweb.css';

         

proc print data=sashelp.class(obs=1);

run;

ods html close;

Now, open c:\temp\sasweb.css with Notepad or a text editor and you have the SAS style template "translated" to CSS form. The style you specify in the STYLE= option is the one that will be "translated" and written to the STYLESHEET= file.

 

If you have made your own style template that you want to convert to CSS form, then you may need an ODS PATH statement to point to your template store, but it will basically be the same thing.

Or, you can use the style wizard in EG to just edit an CSS file directly in order to make a new CSS file.

Also, after you create the CSS file, you may need to deploy it on the server either using EG or copying it. To reference a CSS, you may or may not use code, depending on how you intend to use it. STYLESHEET=(URL=) is the ODS HTML way to reference a CSS file; or CSSSTYLE can be used to reference a CSS file. For EG and SASREPORT you would need to use the STYLESHEET=(URL=) method. Or, if you have put the CSS into a location where EG knows to look, you can just define it using the pulldown menus under Tools --> Options --> Results and EG will put it into the code for you.

For some other examples and more explanation, see this paper:

http://www.wuss.org/proceedings09/09WUSSProceedings/papers/dpr/DPR-Zender1.pdf

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
  • 1 reply
  • 1531 views
  • 1 like
  • 2 in conversation