The SAS Output Delivery System and reporting techniques

"BorderWidth=0" and "Rules=NONE" doesn't work (?)

Reply
N/A
Posts: 0

"BorderWidth=0" and "Rules=NONE" doesn't work (?)

Hi all,

I'm currently trying to produce tables in a RTF format (without any line/border in the table). Thus, I use the following proc template using the option "BorderWidth=0" and "Rules=NONE", but this doesn't work:

Proc Template;
Define Style Style_GLD;
Style Table / BorderColor=black BorderWidth=0 font_face=TIMES Rules=NONE;
Style Body / protectspecialchars = off font_face=TIMES;
Style Systemtitle / protectspecialchars = off font_face=TIMES;
Style Systemfooter / protectspecialchars = off font_face=TIMES;
Style SysTitleAndFooterContainer / protectspecialchars = off font_face=TIMES;
Style NoteContent / protectspecialchars = off font_face=TIMES;
Style Header / protectspecialchars = off font_face=TIMES;
Style Data / protectspecialchars = off font_face=TIMES;
End;
Run;

Do you understand what is my problem??

Many thanks,

Violaine
SAS Super FREQ
Posts: 8,868

Re: "BorderWidth=0" and "Rules=NONE" doesn't work (?)

Posted in reply to deleted_user
Hi Violaine:

When you open your RTF file with Word, you may still see faint gray gridlines -- which is affected by the Show/Hide Gridlines on the Word pull-down menu -- there is no RTF way to touch the Word menus as described in this Tech Support Note:
http://support.sas.com/faq/040/FAQ04024.html

If I try your code in SAS 9.1.3 and open the resulting document with Word, if I have Show Gridlines toggled on, then I still see faint gray gridlines (although they are NOT there when I print). If I have Hide Gridlines toggled on, then I do not see any gridlines for your output.
[pre]
ods path work.tmp(update)
sashelp.tmplmst(read);

Proc Template;
Define Style Style_GLD;
Style Table / BorderColor=black BorderWidth=0 font_face=TIMES Rules=none;
Style Body / protectspecialchars = off font_face=TIMES;
Style Systemtitle / protectspecialchars = off font_face=TIMES;
Style Systemfooter / protectspecialchars = off font_face=TIMES;
Style SysTitleAndFooterContainer / protectspecialchars = off font_face=TIMES;
Style NoteContent / protectspecialchars = off font_face=TIMES;
Style Header / protectspecialchars = off font_face=TIMES;
Style Data / protectspecialchars = off font_face=TIMES;
End;
Run;

ods rtf file='c:\temp\trystyle.rtf' style=style_GLD;
proc print data=sashelp.class;
title 'trying style_GLD';
run;
ods rtf close;

[/pre]

There are a LOT of SAS Tech Support FAQ on removing gridlines -- since there are different ways to do it. And, different destinations can interact with the same style attributes differently. Generally, there is an interaction between cellspacing and table background color -- if cellspacing is greater than 0, then the table background color can show through the cellspacing value. One way to make sure this doesn't happen is to set cellspacing to 0 and the other way to make sure this doesn't happen is to _UNDEF_ (undefine or remove) the table background color.

These are a bunch of reading on the subject:
http://support.sas.com/ctx/samples/index.jsp?sid=286
http://support.sas.com/faq/042/FAQ04218.html
http://support.sas.com/faq/039/FAQ03995.html
http://support.sas.com/faq/039/FAQ03996.html
http://support.sas.com/faq/039/FAQ03997.html
http://support.sas.com/faq/039/FAQ03998.html
http://support.sas.com/faq/032/FAQ03224.html

There are a few things I don't understand about your code -- since you have borderwidth of 0, why even bother to set bordercolor to black? Do you want a black border around the whole table?

For more help with style templates, you might consider contacting Tech Support.

cynthia
N/A
Posts: 1

Re: "BorderWidth=0" and "Rules=NONE" doesn't work (?)

Posted in reply to Cynthia_sas
Hi,

I newbie to using SAS and having a few problems relating to ODS reporting.

Any idea why my reports look different under ODS RTF FILE =, ODS PDF FILE =, and ODS HTML FILE =. Content wise the reports look similar, but no formatting for the PDF reports are showing and I cannot make the borders on the RFT output darker or wider.

I am using style = {} etc. Is there a chance I don't have the proper utilities installed on my machine?

Thanks.
SAS Super FREQ
Posts: 8,868

Re: "BorderWidth=0" and "Rules=NONE" doesn't work (?)

Hi:
Generally you also need to set CELLSPACING=0 when you are setting RULES=NONE. As I said above, there is an interaction between many of the style attributes allowed for tables and different destinations may interpret those attributes differently.

No single style template will work for HTML, RTF and PDF. I find that I generally need to have separate templates for each of the destinations -- although I can usually get by with just 2 -- one for HTML and a second for RTF and PDF.

I don't understand what you mean by "no formatting for PDF reports are showing"...when I execute this code, I get a thick red border around the table.

If you are having trouble with style attributes and understanding how the attributes all work together, your best bet might be to contact Tech Support.

cynthia

[pre]
ods html file='c:\temp\wideborder.html' style=sasweb;
ods rtf file='c:\temp\wideborder.rtf';
ods pdf file='c:\temp\wideborder.pdf';

proc print data=sashelp.class
style(table)={rules=none cellspacing=0
frame=box borderwidth=10
bordercolor=red};
title 'SASHELP.CLASS';
run;

ods _all_ close;
[/pre]
Ask a Question
Discussion stats
  • 3 replies
  • 402 views
  • 0 likes
  • 3 in conversation