The SAS Output Delivery System and reporting techniques

Use Proc Template to Modify styles.normal?

Accepted Solution Solved
Reply
Frequent Contributor
Posts: 84
Accepted Solution

Use Proc Template to Modify styles.normal?

Really just trying to do two changes to the normal style:

  • Change all border colors from blue to black
  • Border the entire box (top and left edges have no border now)

I'm using ODS Tagsets.ExcelXP and Proc Report\Tabulate for outputs.

Thanks!        


Accepted Solutions
Solution
‎06-26-2014 10:51 AM
Frequent Contributor
Posts: 84

Re: Use Proc Template to Modify styles.normal?

proc template;

  define style styles.lucy;

  parent=styles.normal;

  style Body from Body /

  Pagebreakhtml='<BR> <BR>';

  class header /

  borderleftwidth = 1px

  bordertopwidth = 1px

  borderleftcolor = #000000

  bordertopcolor = #000000

  borderrightcolor = #000000

  borderbottomcolor = #000000

;

  class data /

  borderleftcolor = #000000

  bordertopcolor = #000000

  borderrightcolor = #000000

  borderbottomcolor = #000000

;

  end;

run;

View solution in original post


All Replies
Esteemed Advisor
Esteemed Advisor
Posts: 6,726

Re: Use Proc Template to Modify styles.normal?

You would need to define a new one, inheriting from a base one, e.g.:
proc template;

     define style MyStyles.UpdatedStyle;

     parent = styles.normal;

     style Table /

          bordercolor = cxC1C1C1;

     end;

run;

For what items can be changed, goto the styles (right click on results, select templates, and look at style.default).

Frequent Contributor
Posts: 84

Re: Use Proc Template to Modify styles.normal?

I know it's something like this, but I used that and my output is still blue borders and has no top\left borders.

FWIW, I'm on EG5.1

Frequent Contributor
Posts: 84

Re: Use Proc Template to Modify styles.normal?

Attaching the output spreadsheet (minus data for security).

This is my template, but nothing seems to change the border color...

proc template;

     define style styles.Lucy;

     parent = styles.normal;

     replace Header from Header/

          bordercolor = red

   borderstyle = dotted;

     replace Table from Table/

          bordercolor = black;

     replace Data from Data/

          bordercolor = black;

     replace Default from Default/

          bordercolor = black

          frame = box;

     end;

run;

Solution
‎06-26-2014 10:51 AM
Frequent Contributor
Posts: 84

Re: Use Proc Template to Modify styles.normal?

proc template;

  define style styles.lucy;

  parent=styles.normal;

  style Body from Body /

  Pagebreakhtml='<BR> <BR>';

  class header /

  borderleftwidth = 1px

  bordertopwidth = 1px

  borderleftcolor = #000000

  bordertopcolor = #000000

  borderrightcolor = #000000

  borderbottomcolor = #000000

;

  class data /

  borderleftcolor = #000000

  bordertopcolor = #000000

  borderrightcolor = #000000

  borderbottomcolor = #000000

;

  end;

run;

Post a Question
Discussion Stats
  • 4 replies
  • 595 views
  • 3 likes
  • 2 in conversation