The SAS Output Delivery System and reporting techniques

Spanning underline in RTF table (not using Rules=Groups)?

Reply
N/A
Posts: 0

Spanning underline in RTF table (not using Rules=Groups)?

Is there a simple way to create a spanning underline in a report that would allow me to still take advantage of a headskip effect? I tried using Rules = Groups in the proc template but the RTF method I used to simulate headskip was placing the headskip line above the spanning underline.

To better illustrate, the traditional code would be:

proc report data=x headskip nowd split='^';
column ('^__' name age weight);
define ....

Currently I am doing this to replicate in RTF:

%let uline=\brdrb\brdrs\brdrw10;

proc report data=final nowindows center missing
style(header)=[cellheight=0.47in vjust=top];
columns name age weight;

define name / display "Name &uline" style={outputwidth=20 % just=c};
define age / display "Age &uline" style={outputwidth=10 % just=c};
define weight / display "Weight &uline" style={outputwidth=10 % just=c};


Is there a way to not have to use RTF underlining commands in every column of the table to achieve a spanning underline? BTW, I'm using version 9.1.3.

Thanks,

Ryan
SAS Super FREQ
Posts: 8,743

Re: Spanning underline in RTF table (not using Rules=Groups)?

Hi:
Do you mean the kind of spanning bottom border that you get from STYLE=JOURNAL????
[pre]
ods rtf file='underline.rtf' style=journal;

proc report data=sashelp.class nowd;
run;

ods rtf close;
[/pre]

Word will still show Word grid lines, but if you go into Print Preview, the gridlines will go away....and all you see are the line above the table and line under the column headers.

cynthia
N/A
Posts: 0

Re: Spanning underline in RTF table (not using Rules=Groups)?

Hi Cynthia,

Thanks for the reply. Journal does create the spanning underline in the column heading but it's still not allowing the RTF headskip effect ( "style(header)=[cellheight=0.5in vjust=top]")
to work underneath the underline. The headskip line is occuring above the spanning underline with journal.

Basically the effect I'm trying to achieve in traditional code is:

proc report data=x nowd headskip split='^';
columns ('^__' name age weight);
define . . .

So far the journal style nor setting Rules=Groups does not do this.
SAS Super FREQ
Posts: 8,743

Re: Spanning underline in RTF table (not using Rules=Groups)?

Hi:
RULES=GROUPS only has to do with the type of interior table lines you see. It has nothing to do with space between the column header area and the first report row.

HEADSKIP (and HEADLINE) were designed for the LISTING or OUTPUT window and are only valid for use in that LISTING destination. RTF, in concept, has NOTHING like HEADSKIP. You could investigate a COMPUTE BEFORE _PAGE_ or a COMPUTE BEFORE <grpvar> in order to write a blank line using the LINE statement -- but short of using either CELLHEIGHT or HEIGHT or WRITING a blank line with a LINE statement or using some kind of native (raw) RTF control string, you don't have many other choices. HEADSKIP is just ignored by RTF. The underlying framework of RTF files is completely different from the type of ASCII text file written for the LISTING destination.

You might work with Tech Support on this question, but your choices are limited to what you can do with RTF output. If HEIGHT or CELLHEIGHT is not working as you expect, this too is something that you should pursue with Tech Support.

cynthia

You can also look at Example 1 in this paper for an idea of how COMPUTE BEFORE _PAGE_ might work:
http://www2.sas.com/proceedings/forum2008/173-2008.pdf
N/A
Posts: 0

Re: Spanning underline in RTF table (not using Rules=Groups)?

Thanks Cynthia for your help.
Ask a Question
Discussion stats
  • 4 replies
  • 540 views
  • 0 likes
  • 2 in conversation