BookmarkSubscribeRSS Feed
RW9
Diamond | Level 26 RW9
Diamond | Level 26

Hi,

We have only had 9.4 for a few weeks now and noted that there was a change in the way that templates work.  I was wondering if anyone had any thoughts on this.  We have a template which has been running fine for some years on 9.x, and its pretty basic, just changing a couple of fonts from RTF style (which in turn inherits from Default).  One section is this:

proc template;

   define style Styles.MyGraph / store = WORK.TEMPLAT;                       

      parent = Styles.rtf;                                                   

        style GraphFonts /                                                     

          'GraphDataFont' = ("Arial",9pt)                               

          'GraphValueFont' = ("Arial",9pt)                             

          'GraphLabelFont' = ("Arial",9pt)                        

          'GraphFootnoteFont' = ("Arial",9pt)                     

          'GraphTitleFont' = ("Arial",9pt);

    style GraphWalls from GraphWalls /

      frameborder = off ;

  end;

run;

This has worked fine, but in 9.4 using the "style" option now throws an error:

WARNING: Could not locate style reference

Online documentation indicates that this has now changed to use the keyword class, which compiles fine, and produces the correct output in all cases except when creating a graph.  So producing table output has the correct fonts etc.  but the graph seems to default back to Times New Roman.  Using:

...

      class GraphFonts /                                                     

         'GraphTitleFont' = ("Arial",12pt,bold)                                    

         'GraphFootnoteFont' = ("Arial",8pt)                                 

         'GraphLabelFont' = ("Arial",9pt)                                    

         'GraphValueFont' = ("Arial",9pt)                                    

         'GraphDataFont' = ("Arial",9pt)                                   

         'GraphUnicodeFont' = ("Arial",9pt)

         'GraphLabel2Font' = ("Arial",9pt)

         'GraphTitle1Font' = ("Arial",12pt)

         'GraphAnnoFont' = ("Arial",9pt);

...

A bit annoyed at this moving target in terms of templates, has anyone come across this?

2 REPLIES 2
ballardw
Super User

I Had this happen when upgrading to 9.2 where the base template definitions changed and my customization failed because of how fonts in the base were defined. So my existing code to make the change didn't work as the parent wasn't as expected. That led to another learning curve that I am not looking forward to if it's going to happen when I upgrade to 9.4 (which better be soon!).

At this time I have generated the source for all of my current styles and so could re-create (hopefully) the needed style using the old definitions.

RW9
Diamond | Level 26 RW9
Diamond | Level 26

Yes, in this instance it seems it was a scaling issue on some graph labels, so Y axis would look fine in arial, and z axis looked all off and in Times.  As the labels are part of the image you can't check the font.  We will need to do some fidling around, but it seems to be ok template wise.  As for the move from 9.2, was it the "padding" changing to "cellpadding" (or vice versa), that was a fun one.

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
  • 845 views
  • 0 likes
  • 2 in conversation