Hi:
I agree with BallardW that you need a PARENT= statement and a few other changes. That's how I produced this output:
Note how the Continued text is cyan/turquoise and the Headers are red on gray. I wanted to show that my changed template was being used. In addition to adding COLOR to the definition for Continued and foreground color and background color to the HEADERS element, I also had to change the TEXT element to hold the actual string I wanted to use for the Continued text. Note that my text says "Continued on Next Page..." because I did this:
style text / 'Fatal Banner' = 'FATAL:' 'Error Banner' = 'ERROR:' 'Warn Banner' = 'WARNING:' 'Note Banner' = 'NOTE:' 'Content Title' = 'Table of Contents' 'Continued' = '(Continued on Next Page ...)' ;
because you had this pretext=text('Continued') in your original code, which is pointing to the Continued attribute in the TEXT style element and your code did not have a Continued attribute in the TEXT style element. So I'm in the habit of using CLASS instead of STYLE and FROM:
class Continued / font = fonts('Titlefont2') cellpadding = 0 borderwidth = 0 color=darkcyan borderspacing = 0 pretext = text('Continued') width = 100% textalign = left ;
I have to admit, I didn't bother checking the whole template to see what you had changed from styles.rtf -- I just put a PARENT statement at the top and tweaked a few things and then tried it with PROC PRINT. I didn't really want to bother coming up with a multi-page TABULATE.
Anyway, the full code I submitted is at the bottom of this post. It produced the file I used for the screenshot.
Cynthia
**The code;
ods path work.tmp(update) sasuser.templat(update) sashelp.tmplmst(read);
proc template;
define style Styles.c_style;
parent=styles.rtf;
style Body from Document
"Controls the Body file." /
marginbottom = 1in
margintop = 1in
marginright = 1in
marginleft = 1in;
style fonts /
'TitleFont2' = ('Arial, Helvetica, Helv',2,Bold)
'TitleFont' = ('Arial, Helvetica, Helv',2,Bold)
'StrongFont' = ('Arial, Helvetica, Helv',2)
'EmphasisFont' = ('Arial, Helvetica, Helv',2)
'FixedEmphasisFont' = (Courier,-1)
'FixedStrongFont' = (Courier,1,Bold)
'FixedHeadingFont' = (Courier,1)
'FixedFont' = (Courier,-1)
'headingEmphasisFont' = ('Arial, Helvetica, Helv',1)
'headingFont' = ('Arial, Helvetica, Helv',2) /*,Bold) */
'docFont' = ('Arial, Helvetica, Helv',2)
'contentFont' = ('Arial, Helvetica, Helv',1);
style color_list /
'fgA2' = cx000000
'fgA' = cx000000
'bgA' = cxFFFFFF;
style colors /
'headerfgemph' = color_list('fgA2')
'headerbgemph' = color_list('bgA')
'headerfgstrong' = color_list('fgA2')
'headerbgstrong' = color_list('bgA')
'headerfg' = color_list('fgA2')
'headerbg' = color_list('bgA')
'datafgemph' = color_list('fgA')
'databgemph' = color_list('bgA')
'datafgstrong' = color_list('fgA')
'databgstrong' = color_list('bgA')
'datafg' = color_list('fgA')
'databg' = color_list('bgA')
'batchbg' = color_list('bgA')
'batchfg' = color_list('fgA')
'tableborder' = color_list('fgA')
'tablebg' = color_list('bgA')
'notefg' = color_list('fgA2')
'notebg' = color_list('bgA')
'bylinefg' = color_list('fgA2')
'bylinebg' = color_list('bgA')
'captionfg' = color_list('fgA2')
'captionbg' = color_list('bgA')
'proctitlefg' = color_list('fgA2')
'proctitlebg' = color_list('bgA')
'titlefg' = color_list('fgA2')
'titlebg' = color_list('bgA')
'systitlefg' = color_list('fgA')
'systitlebg' = color_list('bgA')
'Conentryfg' = color_list('fgA')
'Confolderfg' = color_list('fgA')
'Contitlefg' = color_list('fgA2')
'contentfg' = color_list('fgA')
'contentbg' = color_list('bgA')
'docfg' = color_list('fgA')
'docbg' = color_list('bgA');
style html /
'expandAll' = '<SPAN onClick="if(msie4==1)expandAll()">'
'posthtml flyover line' = '</SPAN><HR size=3>'
'prehtml flyover line' = '<SPAN><HR size=3>'
'prehtml flyover bullet' = '<SPAN><b>·</b>'
'posthtml flyover' = '</SPAN>'
'prehtml flyover' = '<SPAN>'
'break' = '<br>'
'Line' = '<br>'
'fake bullet' = '<b>·</b>';
style text /
'Fatal Banner' = 'FATAL:'
'Error Banner' = 'ERROR:'
'Warn Banner' = 'WARNING:'
'Note Banner' = 'NOTE:'
'Content Title' = 'Table of Contents'
'Continued' = '(Continued on Next Page ...)'
;
style Container
'Abstract style for basic colors and font.' /
font = Fonts('DocFont')
foreground = colors('docfg')
background = colors('docbg');
style Index from Container
'Abstract style for Contents and pages.' /
foreground = colors('contentfg')
background = colors('contentbg')
font = fonts('Contentfont');
style Document from Container /
htmldoctype =
'<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2 Final//EN">'
htmlcontenttype = 'text/html'
protectspecialchars = auto;
style Body from Document /
leftmargin = 8
pagebreakhtml = html('Line');
style Frame from Document /
contentposition = L
bodyscrollbar = auto
bodysize = *
contentscrollbar = auto
contentsize = 20%
framespacing = 1
frameborderwidth = 4
frameborder = on;
style Contents from Document /
bullet = 'upper-roman'
pagebreakhtml = html('break')
foreground = colors('contentfg')
background = colors('contentbg')
font = fonts('contentfont')
leftmargin = 8;
style flyover /
bordercolor = colors('docfg')
foreground = colors('contentfg')
background = colors('contentbg');
style Date from Container /
outputwidth = 100%
background = colors('contentbg')
foreground = colors('contentfg');
style BodyDate from Date /
background = colors('docbg')
foreground = colors('docfg');
style ContentsDate from Date;
style PagesDate from Date;
style IndexItem from Container /
prehtml = html('fake bullet')
listentryanchor = on
bullet = 'NONE'
foreground = colors('conentryfg');
style ContentFolder from IndexItem /
posthtml = html('posthtml flyover')
prehtml = html('prehtml flyover bullet')
listentryanchor = off
foreground = colors('confolderfg');
style ContentItem from IndexItem;
style PagesItem from IndexItem;
style IndexProcName from Index /
listentryanchor = off
bullet = 'upper-roman'
posthtml = html('posthtml flyover')
prehtml = html('prehtml flyover')
foreground = colors('contitlefg')
pretext = "<!"
posttext = ">";
style ContentProcName from IndexProcName ;
style PagesProcName from IndexProcName;
style IndexAction from Index;
style FolderAction from IndexAction;
style ItemAction from IndexAction;
style ProcNameAction from IndexAction;
style TitleAction from IndexAction;
style IndexTitle from Index /
posthtml = html('posthtml flyover line')
prehtml = html('expandAll')
font = fonts('EmphasisFont')
foreground = colors('contitlefg');
style ContentTitle from IndexTitle /
pretext = text('content title')
font = fonts('Contentfont');
style PagesTitle from IndexTitle ;
style SysTitleAndFooterContainer from Container /
rules = NONE /* ALL NONE */
frame = VOID /* BOX VOID */
outputwidth = 100%
cellpadding = 1
cellspacing = 1
borderwidth = 0;
style TitleAndNoteContainer from Container /
rules = NONE
frame = VOID
outputwidth = 100%
cellpadding = 1
cellspacing = 1
borderwidth = 1;
style TitlesAndFooters from Container /
font = Fonts('TitleFont2')
background = colors('systitlebg')
foreground = colors('systitlefg');
style BylineContainer from Container /
background = colors('Docbg')
rules = NONE
frame = VOID
outputwidth = 100%
cellpadding = 1
cellspacing = 1
borderwidth = 1;
style SystemTitle from TitlesAndFooters /
font = Fonts('TitleFont');
style SystemFooter from TitlesAndFooters /
font = Fonts('TitleFont');
style Byline from TitlesAndFooters /
font = fonts('headingFont')
background = colors('bylinebg')
foreground = colors('bylinefg');
class Continued /
font = fonts('Titlefont2')
cellpadding = 0
borderwidth = 0
color=darkcyan
borderspacing = 0
pretext = text('Continued')
width = 100%
textalign = left ;
style ProcTitle from TitlesAndFooters /
background = colors('proctitlebg')
foreground = colors('proctitlefg');
style ProcTitleFixed from ProcTitle /
font = fonts('FixedStrongFont');
style Output from Container /
background = colors('tablebg')
rules = ALL
frame = BOX
cellpadding = 6
cellspacing = 0
tagattr = "Border=1";
style Table from Output
'Data Table style.';
style Batch from Output
'Batch (capture) Output style.' /
font = fonts('FixedFont')
foreground = colors('batchfg')
background = colors('batchbg');
style Graph from Output
'Graph style.' /
cellpadding = 0
cellspacing = 0
background = colors('docbg');
style Note from Container /
background = colors('notebg')
foreground = colors('notefg');
style NoteBanner from Note /
pretext = text('Note Banner');
style NoteContent from Note;
style NoteContentFixed from NoteContent /
font = fonts('FixedFont');
style WarnBanner from Note /
pretext = text('Warn Banner');
style WarnContent from Note;
style WarnContentFixed from Note /
font = fonts('FixedFont');
style ErrorBanner from Note /
pretext = text('Error Banner');
style ErrorContent from Note;
style ErrorContentFixed from Note /
font = fonts('FixedFont');
style FatalBanner from Note /
pretext = text('Fatal Banner');
style FatalContent from Note;
style FatalContentFixed from Note /
font = fonts('FixedFont');
style Cell from Container;
style Data from Cell /
foreground = colors('datafg')
background = colors('databg');
style DataFixed from Data /
font = fonts('FixedFont');
style DataEmpty from Data;
style DataEmphasis from Data /
foreground = colors('datafgemph')
background = colors('databgemph')
font = fonts('EmphasisFont');
style DataEmphasisFixed from DataEmphasis /
font = fonts('FixedEmphasisFont');
style DataStrong from Data /
foreground = colors('datafgstrong')
background = colors('databgstrong')
font = fonts('StrongFont');
style DataStrongFixed from DataStrong /
font = fonts('FixedStrongFont');
style HeadersAndFooters from Cell /
font = fonts('HeadingFont')
foreground = colors('headerfg')
background = colors('headerbg');
style Caption from HeadersAndFooters /
foreground = colors('captionfg')
background = colors('captionbg');
style BeforeCaption from Caption;
style AfterCaption from Caption;
class Header /
font = fonts('HeadingFont')
color=red
fontweight=bold
backgroundcolor=cxeeeeee;
style HeaderFixed from Header /
font = fonts('FixedStrongFont');
style HeaderEmpty from Header;
style HeaderEmphasis from Header /
foreground = colors('headerfgemph')
background = colors('headerbgemph')
font = fonts('EmphasisFont');
style HeaderEmphasisFixed from HeaderEmphasis /
font = fonts('FixedEmphasisFont');
style HeaderStrong from Header /
foreground = colors('headerfgstrong')
background = colors('headerbgstrong')
font = fonts('StrongFont');
style HeaderStrongFixed from HeaderStrong /
font = fonts('FixedStrongFont');
style RowHeader from Header;
style RowHeaderFixed from RowHeader /
font = fonts('FixedFont');
style RowHeaderEmpty from RowHeader;
style RowHeaderEmphasis from RowHeader /
font = fonts('EmphasisFont');
style RowHeaderEmphasisFixed from RowHeaderEmphasis /
font = fonts('FixedEmphasisFont');
style RowHeaderStrong from RowHeader /
font = fonts('StrongFont');
style RowHeaderStrongFixed from RowHeaderStrong /
font = fonts('FixedStrongFont');
style Footer from HeadersAndFooters;
style FooterFixed from Footer /
font = fonts('FixedFont');
style FooterEmpty from Footer;
style FooterEmphasis from Footer /
font = fonts('EmphasisFont');
style FooterEmphasisFixed from FooterEmphasis /
font = fonts('FixedEmphasisFont');
style FooterStrong from Footer /
font = fonts('StrongFont');
style FooterStrongFixed from FooterStrong /
font = fonts('FixedStrongFont');
style RowFooter from Footer;
style RowFooterFixed from RowFooter /
font = fonts('FixedFont');
style RowFooterEmpty from RowFooter;
style RowFooterEmphasis from RowFooter /
font = fonts('EmphasisFont');
style RowFooterEmphasisFixed from RowFooterEmphasis /
font = fonts('FixedEmphasisFont');
style RowFooterStrong from RowFooter /
font = fonts('StrongFont');
style RowFooterStrongFixed from RowFooterStrong /
font = fonts('FixedStrongFont');
style UserText from UserText /
foreground = black ;
end;
run;
ods tagsets.rtf file='c:\temp\see_continued.rtf' style=c_style
options(continue_tag='yes');
proc print data=sashelp.cars(obs=150) noobs;
var Make Model Type Origin DriveTrain MSRP Invoice EngineSize;
run;
ods tagsets.rtf close;
... View more