BookmarkSubscribeRSS Feed
🔒 This topic is solved and locked. Need further help from the community? Please sign in and ask a new question.
Doug____
Pyrite | Level 9

How do I modify the following template to get a double-underline at the end of each table?

proc template;
define style Styles.xxx;
parent = styles.rtf;
style Body from Body /
leftmargin = 0.3in rightmargin = 0.3in topmargin = 0.3in
bottommargin = 0.3in rules=none frame=void;
style Table from Output /
frame = void rules = none cellspacing = 0 cellpadding = 0pt;
replace fonts from Fonts /
'TitleFont2' = ("Courier New",8pt)
'TitleFont' = ("Courier New",8pt)
'StrongFont' = ("Courier New",8pt,bold)
'EmphasisFont' = ("Courier New",8pt,italic)
'FixedEmphasisFont' = ("Courier New",8pt,italic)
'FixedStrongFont' = ("Courier New",8pt,bold)
'FixedHeadingFont' = ("Courier New",8pt,bold)
'BatchFixedFont' = ("Courier New",8pt)
'FixedFont' = ("Courier New",8pt)
'HeadingEmphasisFont' = ("Courier New",8pt,italic)
'HeadingFont' = ("Courier New",8pt)
'DocFont' = ("Courier New",8pt)
'FooterFont' = ("Courier New",6pt);
replace TitlesAndFooters from TitlesAndFooters/
font=Fonts('TitleFont2')
vjust=T just=L cellspacing=0 cellpadding=1pt;
style SystemTitle from TitlesAndFooters / protectspecialchars=off;
style SystemFooter from TitlesAndFooters / protectspecialchars=on;
replace Cell from Cell / font=Fonts('DocFont') protectspecialchars=off;
replace HeadersAndFooters from HeadersAndFooters /
font=Fonts('HeadingFont') protectspecialchars=off background=white;
style RowHeader from HeadersAndFooters;
style ColumnHeader from HeadersAndFooters;
style Data from Cell;
style table from table/
rules=groups /* INTERNAL BORDERS: SET TO BOTTOM BORDER ON ROW HEADERS */
frame=above /* EXTERNAL BORDERS: SET TO TOP LINE OF TABLE ONLY */
borderwidth = 1px

borderbottomwidth = 1px;

end;
run;

1 ACCEPTED SOLUTION

Accepted Solutions
Cynthia_sas
SAS Super FREQ
Hi:
Just a comment on the PROC TEMPLATE code in general. The REPLACE statement was changed in SAS 9.2. So it is not recommended that you use the REPLACE statement any longer. Before you start to fiddle with TEMPLATE code, remember that PROC TEMPLATE for a style template doesn't really care about your DATA -- it doesn't know where the last row of your table is, really. The style template works on general style elements and attributes. There is no "conditional" logic in style template to only do something on the first row or the last row of a table. You can change the HEADER characteristics, but what if you use a procedure like UNIVARIATE, that produces multiple output objects and report tables? The style template will format all the report objects the same.
Cynthia

View solution in original post

2 REPLIES 2
ballardw
Super User

Are you using multiple procedures to generate your tables or only one, such as Proc Report?

 

If this is for a single procedure, such as Proc Report you might consider showing that procedure code as it may be easier to modify then dealing with styles that can affect a lot of different output tables.

 

 

Cynthia_sas
SAS Super FREQ
Hi:
Just a comment on the PROC TEMPLATE code in general. The REPLACE statement was changed in SAS 9.2. So it is not recommended that you use the REPLACE statement any longer. Before you start to fiddle with TEMPLATE code, remember that PROC TEMPLATE for a style template doesn't really care about your DATA -- it doesn't know where the last row of your table is, really. The style template works on general style elements and attributes. There is no "conditional" logic in style template to only do something on the first row or the last row of a table. You can change the HEADER characteristics, but what if you use a procedure like UNIVARIATE, that produces multiple output objects and report tables? The style template will format all the report objects the same.
Cynthia

Ready to join fellow brilliant minds for the SAS Hackathon?

Build your skills. Make connections. Enjoy creative freedom. Maybe change the world. Registration is now open through August 30th. Visit the SAS Hackathon homepage.

Register today!
What is Bayesian Analysis?

Learn the difference between classical and Bayesian statistical approaches and see a few PROC examples to perform Bayesian analysis in this video.

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
  • 494 views
  • 0 likes
  • 3 in conversation