The SAS Output Delivery System and reporting techniques

SystemTitle in HTML

Reply
Frequent Contributor
Posts: 115

SystemTitle in HTML

I am using the below script to stream to HTML. The title is limegreen and has 2 lines. Problem is a gray line is between the 2 titles. Is there a way to control this? I am using the below proc template and chart code:

proc template;
define style mystyle2;
parent=styles.STATISTICAL;
class body/
backgroundcolor=white
color=black
fontfamily="Verdana, Arial"
borderstyle=none;
class systemtitle/
fontfamily="Verdana, Arial"
fontweight=bold
fontsize=8pt
backgroundcolor=cxA6D96A
background=cxA6D96A
borderstyle=none
bordercolor=cxA6D96A
BORDERBOTTOMCOLOR=cxA6D96A
BORDERTOPCOLOR=cxA6D96A
foreground=black;
class table/
backgroundcolor=white
bordercolor=black
borderstyle=solid
borderwidth=1pt ;
class header, footer/
backgroundcolor=cxA6D96A
color=black
fontfamily="Verdana, Arial"
/*fontweight=bold */
fontsize=8pt
bordercolor=cx525252;
class data/
fontfamily="Verdana, Arial"
fontsize=8pt
bordercolor=black;
style graphcolors from graphcolors /
'gcdata1'=cxA6D96A
'gcdata2'=cxD9EF8B
'gcdata3'=cxFEE08B
'gdata1'=cxA6D96A
'gdata3'=cxFEE08B
'gdata4'=black
'gdata2'=cxD9EF8B;
style GraphBackground
"Graph backgroundcolor attributes" /
backgroundcolor = white
textalign = L
verticalalign = B;
end;
run;

title1 'Open Cases Pipeline' ;
title2 '(PEs)' ;

proc sgplot data=report.PipeLine (where=(Week_Ending_On vline Week_Ending_On/ response=PipeLine markers lineattrs=(color=cxA6D96A thickness=4)
markerattrs=(symbol=circlefilled color=cxA6D96A size=12);
yaxis display=(nolabel);
xaxis display=(nolabel);
keylegend /location =inside position=bottomright noborder ;
format Week_Ending_On mmddyy5.;
run;
SAS Super FREQ
Posts: 8,868

Re: SystemTitle in HTML

Well, according to ColorPicker II, available here:
http://www.pagetutor.com/colorpicker/picker2/index.html

your color CXA6D96A is a sort of lime-ish green...and I see that you use that color for the BACKGROUND attribute of your system title (In fact, it looks like that color is being use a lot in the style attribute settings for SystemTitle):
[pre]
class systemtitle/
fontfamily="Verdana, Arial"
fontweight=bold
fontsize=8pt
backgroundcolor=cxA6D96A <---- here
background=cxA6D96A <---- here
borderstyle=none
bordercolor=cxA6D96A <----here
BORDERBOTTOMCOLOR=cxA6D96A <----here
BORDERTOPCOLOR=cxA6D96A <----here
[/pre]

I would suggest that if you do NOT want the lime green background color, that you change your style template accordingly. I do not believe that HTML will use your BORDERBOTTOMCOLOR or your BORDERTOPCOLOR settings without some further changes.

The reason you are getting the gray lines around your titles is that the SAS TITLE statement is "contained" by a style element called the SysTitleAndFooterContainer and the default gray background color for the container outlines the container for every title line. So if you WANT the title lines to be green, then in order to "disappear" the gray line, you need to change the SysTitleAndFooterContainer element. Changing borderspacing to 0 will make the background color go away.

Some test code is shown below. Note that your Header and Footer and Data elements will only be used for TABULAR output. Just in case, if you are planning on running a stored process to return results to the Info Delivery Portal or to Web Report Studio, you will need to follow the steps in the Platform documentation for altering the CSS definitions in the XML files that drive the Portal and WRS.

cynthia
[pre]

ods path work.tmp(update)
sasuser.templat(update)
sashelp.tmplmst(read);

proc template;
define style styles.mystyle2;
parent=styles.STATISTICAL;
class body/
backgroundcolor=white
color=black
fontfamily="Verdana, Arial"
borderstyle=none;
class SysTitleAndFooterContainer /
rules = NONE
frame = VOID
width = 100%
padding = 1
borderspacing = 0;
class systemtitle/
fontfamily="Verdana, Arial"
fontweight=bold
fontsize=8pt
backgroundcolor=cxA6D96A
foreground=black;
class table/
backgroundcolor=white
bordercolor=black
borderstyle=solid
borderwidth=1pt ;
class header, footer/
backgroundcolor=cxA6D96A
color=black
fontfamily="Verdana, Arial"
/*fontweight=bold */
fontsize=8pt
bordercolor=cx525252;
class data/
fontfamily="Verdana, Arial"
fontsize=8pt
bordercolor=black;
class notecontent /
backgroundcolor=cxA6D96A
color=black
fontfamily="Verdana, Arial"
fontsize=8pt;
style graphcolors from graphcolors /
'gcdata1'=cxA6D96A
'gcdata2'=cxD9EF8B
'gcdata3'=cxFEE08B
'gdata1'=cxA6D96A
'gdata3'=cxFEE08B
'gdata4'=black
'gdata2'=cxD9EF8B;
style GraphBackground
"Graph backgroundcolor attributes" /
backgroundcolor = white
textalign = L
verticalalign = B;
end;
run;

title1 'Open Cases Pipeline' ;
title2 '(PEs)' ;
ods html path='c:\temp' (url=none)
file='cktitle.html' style=styles.mystyle2 nogtitle;
proc report data=sashelp.class(obs=3) nowd;
column ('This is a spanning header' name sex age height weight);
compute after;
line 'This is a LINE output controlled by NOTECONTENT element';
endcomp;
run;

proc sgplot data=sashelp.class;
scatter x=age y=height;
run;
ods html close;

[/pre]
Ask a Question
Discussion stats
  • 1 reply
  • 177 views
  • 0 likes
  • 2 in conversation