The SAS Output Delivery System and reporting techniques

Create a table with a double-spaced title, bold bottom border under column header with ODS RTF

Reply
Contributor
Posts: 66

Create a table with a double-spaced title, bold bottom border under column header with ODS RTF

[ Edited ]

hi,

 

I am having to change my existing table to a style that is required by a journal Genes, Brain and Behavior. This journal requires tables to be double-spaced, including the title and the report rows, and with a single bold ruling beneath the column headers. I generate all my tables with proc report and ODS RTF. I then save the table files as .docx in Microsoft Word. I haven't found out code relevant to a double-spaced title and bolded bottom border. Although it is not difficult to change line spacing and border thickness in MS Word, it would be great to be able to do so with SAS Base ODS RTF by changing my current SAS code. I am illustrating desired layouts with some screenshots in MS WORD

 

Double spaced titles:

My report titles and footnotes are edited and maintained in a MS Excel files. I read the text into SAS macro variables and use them in the title statement per individual table. An example of my title statement :

title4 J=L /*this is the table title*/
		font='Times New Roman' 
		h=10pt "&&NU_tableTitle&table_order."	
	;  

 

An example of my current table title:

 

table_title_singleSpaced.png

 

What I need is a double-spaced bold title:

 

table_title_doubleSpacedBold.png

 

 

 How do I change the title statement for this?

 

Bold bottom border under the column headers

 

I would like to bold the bottom border (the line beneath zygosity, NU1, NU2, NU3 and All waves) as the following printscreen

 

table_bottomBorderBold.png

 

Is there any possibility to do this in the column statement? I have had some "brdr" options in the column statement. But I haven't found out one that can change the border thickness. Can anyone provide a complete reference to all the brdr keywords/options? It is quite hard to find them online.

 

An example of my column statement:

column
	OBSNO 
	zygoNum2 
	gap01 /*insert a gap between columns with two-level headers*/

	("\brdrb\brdrdot\brdrw5\brdrcf1 SPHERE12" 
	twPN_SPHERE12_NU1 twPN_SPHERE12_NU2 twPN_SPHERE12_NU3	twPN_SPHERE12_NUall )
	gap02 /*insert a gap between columns with two-level headers*/
	("\brdrb\brdrdot\brdrw5\brdrcf1 Diagnoses" 
	twPN_Diagnoses_NU2 twPN_Diagnoses_NU3 twPN_Diagnoses_NUall )
	gap03
	("\brdrb\brdrdot\brdrw5\brdrcf1 Overlapped"
	twPN_SPHERE12_n_Diag_dummy)
	; /**/

Double-spaced report rows

 

To add this, I create a variable OBSNO=_N_ in the data step, following some web post, and use this variable in PROC REPORT's column statement, display statement and compute after. All these basically add a blank row between report rows. I don't know if adding a blank line means double-spaced, but it looks like the one that the Journal can accept. I've shown the part of my code relevant to the variable OBSNO: 

 

data tem._NU_manuscript01_table&table_order.	;
	set &tDat_twinPairs_twinN_SP_diag.	;	
	gap01='';	/*add gap01, gap02 for inserting blank in PROC REPORT*/
	gap02='';
	gap03='';
	OBSNO=_N_;
run;

proc report	data=tem._NU_manuscript01_table&table_order.
(options not shown due to length)

column
	OBSNO 
(options not shown due to length) ;

DEFINE OBSNO / ORDER NOPRINT;

/*Add blank lines to make double spacing under every report row*/
/*LINE statement here adds a blank row. If text in the quote, a format must be used after the quoted text*/
compute after OBSNO ;
    line "";	
endcomp;

run;


Thanks

 

 

 

 

Super User
Super User
Posts: 9,193

Re: Create a table with a double-spaced title, bold bottom border under column header with ODS RTF

It is possible yes, will I do it for you, no.  You can find plenty of examples on the web about using inline styles in SAS, whereby you can set border widths and all other styles.  For example:

http://support.sas.com/kb/46/022.html

 

As for the \bdr etc. this is RTF code, nothing to do with SAS.  It is a Microsoft technology from quite some time bakc, you can find reference documents on the web abou this:

http://www.biblioscape.com/rtf15_spec.htm

 

Ask a Question
Discussion stats
  • 1 reply
  • 247 views
  • 0 likes
  • 2 in conversation