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".
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.
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;
Are you ready for the spotlight? We're accepting content ideas for SAS Innovate 2025 to be held May 6-9 in Orlando, FL. The call is open until September 25. Read more here about why you should contribute and what is in it for you!
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.