BookmarkSubscribeRSS Feed
JGS
Calcite | Level 5 JGS
Calcite | Level 5

Hello;

I am trying to use a custom style template and when I apply it, the default seems to be used.

I have looked in the template style folder and I can see the template.

I have not found anything in the knowledge base that was of any help.

Using 9.3 (TS1M0) on a X64_7PRO  platform (Windows).

Thanks in advance.

JGS

Program statements:

ods path sasuser.templat(update) sashelp.tmplmst (read) ;

ods pdf file = 'c:\filename.pdf' style=Styles.Custom;

Log output

3677       ods path sasuser.templat(update) sashelp.tmplmst (read) ;

3678       ods pdf file = 'c:\filename.pdf' style=Styles.Custom;

NOTE: Writing ODS PDF output to DISK destination "c:\sriprojects\rib-x-fda\define_output\adeg1.pdf", printer "PDF".

2 REPLIES 2
ballardw
Super User

I don't know if this applies to you but when I upgraded to SAS 9.2.3 I had an issue with a custom style not working and rebuilding based on a SAS supplied style did not help.

I had to get to the source of the style to find out that the SAS supplied version had changed how it was addressing color and fonts in the base style and my existing code wasn't compatible. I had to to modify the code to align with with the new base definition method.

Cynthia_sas
SAS Super FREQ

Or, perhaps SASUSER is on a server and locked down.

  This code worked for me using SAS 9.3. I rarely save my templates in SASUSER because I frequently have to reinstall SAS and sometimes SASUSER contents go away during a reinstall. I generally store my changed templates in a separate directory under my control. In the code below, however, I just use the WORK location.

  If you continue to have issues, you might work with Tech Support on this problem.

cynthia

ods path work.tmp(update)

         sasuser.templat(update)

         sashelp.tmplmst (read) ;

  

proc template;

  define style styles.custom;

  parent=styles.printer;

  class Header /

    background=pink;

  end;

run;

  

ods listing close;

title; footnote;

  

ods pdf file = 'c:\temp\usepink.pdf'

    style=Styles.custom startpage=no;

  

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

  run;

  

  proc freq data=sashelp.class;

    tables age;

  run;

  

ods pdf close;

sas-innovate-2024.png

Don't miss out on SAS Innovate - Register now for the FREE Livestream!

Can't make it to Vegas? No problem! Watch our general sessions LIVE or on-demand starting April 17th. Hear from SAS execs, best-selling author Adam Grant, Hot Ones host Sean Evans, top tech journalist Kara Swisher, AI expert Cassie Kozyrkov, and the mind-blowing dance crew iLuminate! Plus, get access to over 20 breakout sessions.

 

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.

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