| Date: | Tue, 9 Mar 2010 16:06:27 -0500 |
| Reply-To: | Ya Huang <ya.huang@AMYLIN.COM> |
| Sender: | "SAS(r) Discussion" <SAS-L@LISTSERV.UGA.EDU> |
| From: | Ya Huang <ya.huang@AMYLIN.COM> |
| Subject: | Re: Style for borderwidth that works in HTML, RTF and PDF |
|
I tried to change borderrightwidth:
style column from table /
borderrightwidth = 6
borderrightcolor = #AAC1D9
verticalalign = middle
textalign = center
;
It now widen the cell border for rtf destination. But it may also make
the border for html and pdf too wide.
Interesting is that, I can not use '6 px'. Somehow, the unit is not
recognized by rtf destination. Maybe a bug?
On Tue, 9 Mar 2010 15:29:18 -0500, KarlK <karlstudboy@HOTMAIL.COM> wrote:
>Plesae forgive my typo in my description of the table. Spec #1 should read:
>
>1) thick (3px) vertical rules between the columns and on the RIGHT of the
>table.
>
>Fingers fast, brain slow.
>Karl
>
>On Tue, 9 Mar 2010 15:10:35 -0500, KarlK <karlstudboy@HOTMAIL.COM> wrote:
>
>>I need to produce tables with a very specific set of attributes to keep
>>the brand people happy. The specs I'm having trouble with concern
>>thickness of rules, and are as follows:
>>
>>1) thick (3px) vertical rules between the columns and on the left of the
>>table
>>2) thick horizontal rules between column header and rest of table and on
>>the bottom of the table
>>3) thin (1px) horizontal rules between the rows
>>4) no horizontal rule on top of the table, and no vertical rule on the
>>left of the table
>>
>>I've made a style sheet with proc template that works fine for the HTML
>>destination (in IE8 and Firefox 3.x), but does not work for the PDF or RTF
>>destinations. Specifically, for RTF, all the rules are the same width
>>(looks to be 1px). For PDF, all rules are thick except the bottom
>>horizontal rule, which is thin, plus I've got a thick rule on the top and
>>the left which shouldn't be there at all.
>>
>>Are there any style gurus who might point me in the right direction to
>>produce a table that meets the specs in all 3 destination? I have included
>>a sample program which should run as is, in Sas Win (XP) 9.2 (TS2M0).
>>Thanks in advance.
>>
>>* * * * Sample program starts here * * * *;
>>proc template;
>> define style Styles.KKtest;
>> parent = styles.printer;
>> style table from output /
>> frame = below
>> bordercollapse = collapse
>> borderspacing = 0
>> borderwidth = 3px
>> bordercolor = #AAC1D9
>> ;
>> style column from table /
>> borderrightwidth = 3px
>> borderrightcolor = #AAC1D9
>> verticalalign = middle
>> textalign = center
>> ;
>> style header from column /
>> borderbottomwidth = 3px
>> backgroundcolor = #3399FF
>> fontweight = bold
>> ;
>> style data from column /
>> borderbottomwidth = 1px
>> ;
>> end;
>>quit;
>>
>>ods listing close;
>>ods noproctitle;
>>ods pdf file="c:\temp\kktest.pdf" style=kktest;
>>ods rtf file="c:\temp\kktest.rtf" style=kktest;
>>ods html file="c:\temp\kktest.html" style=kktest;
>>
>> title;
>>proc report data=sashelp.class(obs=5) nowd split="*";
>> column name sex age height weight;
>> define name / order style(header)={backgroundcolor=white} "Upper
>>Left*Header";
>>
>> compute name;
>> * highlight alternate rows;
>> n+1;
>> if mod(n,2) eq 1 then call define(_row_,'style','style=
>>{background=#FFFFCC}');
>> * left align data but keep header centered;
>> call define(_col_,'style',"style={textalign=left}");
>> endcomp;
>>run;
>>
>>title;
>>ods _all_ close;
>>ods listing;
|