Updates to template in 9.4

Reply
Esteemed Advisor
Esteemed Advisor
Posts: 7,188

Updates to template in 9.4

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?

Grand Advisor
Posts: 10,192

Re: Updates to template in 9.4

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.

Esteemed Advisor
Esteemed Advisor
Posts: 7,188

Re: Updates to template in 9.4

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.

Ask a Question
Discussion stats
  • 2 replies
  • 280 views
  • 0 likes
  • 2 in conversation