BookmarkSubscribeRSS Feed
Peter_Y
Calcite | Level 5

Hi:

  I wonder if there is an easy way to underline last row of each page in proc report? The code below print horizontal lines for the whole table

ods rtf file='test.rtf';
title 'Air travel';
footnote 'my footnote'; proc report data=test nowd style(report)=[rules=none frame=hsides] style(header)=[background=white borderbottomcolor=black borderbottomwidth=2]; column date air; define date/order; run; ods rtf close;

How can I (automatically) underline last row of each page as below?

Peter_Y_0-1686176915529.png

Thanks,

 

2 REPLIES 2
Cynthia_sas
Diamond | Level 26

Hi: If you want a line that goes from margin to margin just above the footnote, then you need to do that in the FOOTNOTE statement. Style overrides in PROC REPORT on the style(report) location only impact the TABLE, so the line will be from one side of the table to the other -- not from margin to margin.

 

  Here's how I put a line above the footnote:

Original ODS ESCAPECHAR method with RTF control strings:

Cynthia_sas_1-1686183912972.png

 

New ODS ESCAPECHAR method with style attribute overrides:

Cynthia_sas_0-1686183885920.png

 

  I prefer to test with STYLE=JOURNAL if I want the interior tables lines to be suppressed and to have a white background to the headers. Maybe one of these methods will work for you.

Cynthia

 

Ksharp
Super User
/*You want this?*/
data have;
 set sashelp.shoes ;
 if mod(_n_,30)=1 then page+1;  /*each page have 20 rows*/
run;

ods rtf file='c:\temp\test.rtf' style=journal;
title 'Air travel';
footnote 'my footnote';
proc report data=have nowd ;
define page/group noprint;
break after page/page;
run;
ods rtf close;

Ksharp_0-1686224567078.png

 

sas-innovate-2026-white.png



April 27 – 30 | Gaylord Texan | Grapevine, Texas

Registration is open

Walk in ready to learn. Walk out ready to deliver. This is the data and AI conference you can't afford to miss.
Register now and lock in 2025 pricing—just $495!

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.

SAS Training: Just a Click Away

 Ready to level-up your skills? Choose your own adventure.

Browse our catalog!

Discussion stats
  • 2 replies
  • 1866 views
  • 1 like
  • 3 in conversation