BookmarkSubscribeRSS Feed
☑ This topic is solved. Need further help from the community? Please sign in and ask a new question.
davehalltwp
Quartz | Level 8

I'm not sure actually if this is a SAS question, or a character set question, but with all the geniuses around here, I'll probably get an answer anyway.

 

I am trying to print a page header in proc report.  I would like a line below it, but without skipping a line (overprint?)  

 

ie

 

PAGE HEADER

_____________________________

 

Where the line prints without a line feed.

 

It's within a PROC REPORT COMPUTE BEFORE _PAGE_ block.

 

I wonder if it's a matter of embedding control characters such as "~line " (I can't remember the syntax) in the text string.  I haven't done much of that.

 

Right now I have:

 

compute before _PAGE_;

         line @1 subgtext $ 30. ;
          line @1 131 * '_';

endcomp;

that prints two separate lines, of course.

 

Thank you...

1 ACCEPTED SOLUTION

Accepted Solutions
Ksharp
Super User
proc sort data=sashelp.class out=class;
by sex;
run;

ods rtf file='c:\temp\temp.rtf';
options nobyline;
proc report data=class nowd;
by sex;
columns name age weight height;
compute before _PAGE_/style={textdecoration=underline};
subgtext='XXXXXXXXXXX';
line @1 subgtext $30. ;
endcomp;
run;
ods rtf close;

Ksharp_0-1682596123843.png

 

View solution in original post

3 REPLIES 3
ballardw
Super User

Best would be to include some example data in the form of data step code and the completer Proc Report code so we can test possible solutions.

 

Also, which ODS destination are you using. Some solutions may be destination dependent. For example, if you were using the ODS LISTING destination that either the UL or DUL options would apply. But these, derived from the days of line printers, only work in the LISTING destination. Also the ODS Style that is in effect.

Ksharp
Super User
proc sort data=sashelp.class out=class;
by sex;
run;

ods rtf file='c:\temp\temp.rtf';
options nobyline;
proc report data=class nowd;
by sex;
columns name age weight height;
compute before _PAGE_/style={textdecoration=underline};
subgtext='XXXXXXXXXXX';
line @1 subgtext $30. ;
endcomp;
run;
ods rtf close;

Ksharp_0-1682596123843.png

 

davehalltwp
Quartz | Level 8

Thank you, KSharp.  That worked perfectly!

sas-innovate-2024.png

Available on demand!

Missed SAS Innovate Las Vegas? Watch all the action for free! View the keynotes, general sessions and 22 breakouts on demand.

 

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
  • 3 replies
  • 413 views
  • 2 likes
  • 3 in conversation