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
SAS Super FREQ

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-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
  • 2 replies
  • 729 views
  • 1 like
  • 3 in conversation