The SAS Output Delivery System and reporting techniques

how can i change the background-color of html body

Reply
N/A
Posts: 0

how can i change the background-color of html body

hi:
I output a report with ods html with the style of sasweb,and the style of body is as following:
.Body
{
font-family: 'MS Hei', GothicBBB, Arial, Helvetica, sans-serif;
font-size: x-small;
font-weight: normal;
font-style: normal;
color: #003399;
background-color: #FFFFFF;
margin-left: 8px;
margin-right: 8px;
}
Now,I want to change the background-color,is it possible?
Thanks
Super Contributor
Super Contributor
Posts: 3,174

Re: how can i change the background-color of html body

Posted in reply to deleted_user
Have a look at the SAS support http://support.sas.com/ website and the SAS ODS documentation resources, particularly using PROC TEMPLATE. You will find product documentation and also supplemental technical papers on the topic.

Scott Barry
SBBWorks, Inc.
PROC Star
Posts: 1,759

Re: how can i change the background-color of html body

Rather than sending you back to the (awful) proc template doc, here is a method that always works.

1- List your style components.
proc template;
source styles.sasweb;
run;


2- Spot the line(s) you want to update.
Here, that would be
'docbg' = color_list('bgA');

3- Re-run the code that step one generated, after changing what you want, and create your new style:
3.1) The procedure call becomes
proc template;
define style Styles.Sasweb2;


3.2) The color list has a new color
style color_list
"Colors used in the default style" /
'fgD1' = cx666666
'fgC1' = cxCCCCCC
'fgB1' = cx000000
'bgA1' = cx6495ED
'fgA' = cx003399
'bgA' = cxffffff
'NEWBGCOL'=CXFF0000;


3.3)The color definition for document background becomes
'docbg' = color_list('NEWBGCOL');


Done! Call your custom style from now on.

I know there is a better way, where you call the parent's styles and just overwrite what you need, but the time needed to learn how to use proc template properly vs the very rare occasions when it is needed makes the investment not worth it (in my case at least). I would have thought there would be a code-generating GUI by now to design customs styles.
N/A
Posts: 0

Re: how can i change the background-color of html body

Posted in reply to deleted_user
Thanks for your reply!I have spent so mush time on the proc template doc,but it works now.It's horrible!
PROC Star
Posts: 1,759

Re: how can i change the background-color of html body

Posted in reply to deleted_user
Agreed. Smiley Happy Glad it works.
Ask a Question
Discussion stats
  • 4 replies
  • 333 views
  • 2 likes
  • 3 in conversation