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...
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;
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.
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;
Thank you, KSharp. That worked perfectly!
Registration is now open for SAS Innovate 2025 , our biggest and most exciting global event of the year! Join us in Orlando, FL, May 6-9.
Sign up by Dec. 31 to get the 2024 rate of just $495.
Register now!
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.
Ready to level-up your skills? Choose your own adventure.