BookmarkSubscribeRSS Feed
deleted_user
Not applicable
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
4 REPLIES 4
Cynthia_sas
SAS Super FREQ
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
deleted_user
Not applicable
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.
Cynthia_sas
SAS Super FREQ
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
deleted_user
Not applicable
Thanks Cynthia for your help.

sas-innovate-2024.png

Don't miss out on SAS Innovate - Register now for the FREE Livestream!

Can't make it to Vegas? No problem! Watch our general sessions LIVE or on-demand starting April 17th. Hear from SAS execs, best-selling author Adam Grant, Hot Ones host Sean Evans, top tech journalist Kara Swisher, AI expert Cassie Kozyrkov, and the mind-blowing dance crew iLuminate! Plus, get access to over 20 breakout sessions.

 

Register now!

How to Concatenate Values

Learn how use the CAT functions in SAS to join values from multiple variables into a single value.

Find more tutorials on the SAS Users YouTube channel.

Click image to register for webinarClick image to register for webinar

Classroom Training Available!

Select SAS Training centers are offering in-person courses. View upcoming courses for:

View all other training opportunities.

Discussion stats
  • 4 replies
  • 3323 views
  • 0 likes
  • 2 in conversation