BookmarkSubscribeRSS Feed
Niugg2010
Obsidian | Level 7

Below is my code. The  last page of rtf output has a blank table row title. How Can I remove that title? Thanks

 

title;
ods rtf file="C:\Users\XXXX\Desktop\111.rtf";
ods escapechar="^";
proc report data=sashelp.cars (obs=426);
column Make Model;
run;
ods rtf text="^S={leftmargin=1in}Dollar ^nsexcept
as ^naaano^ntedas ^nno^ntedas ^nno^ntedas ^nno^ntedas ^nno^ntedas ^nno^nte";
ods rtf close;

 


aaa.jpg
3 REPLIES 3
RW9
Diamond | Level 26 RW9
Diamond | Level 26

The reason you have the extra page is because you output an rtf text statement after your procedure.  What are you triying to do with that text field?  Why not just put it in a footnote?

Niugg2010
Obsidian | Level 7

The shell requires that.  

BrunoMueller
SAS Super FREQ

Hi

 

As an alternate method you could make use of the "COMPUTE AFTER" block. Using this method the text is written as part of the table, and is therefor part of the table measuring, see sample code below

 

title;
ods rtf file="C:\temp\rtf111.rtf";
ods escapechar="^";
proc report data=sashelp.cars (obs=36) nocenter;
column rowid Make Model;
define rowid / computed;
compute rowid;
  _rowId + 1;
  rowId = _rowId;
endcomp;

compute after / style={just=left};
  length msgline $ 1024;
  msgline = "line1 ^n line2 ^n line3  ^n line 4 ^n line 5 ^n line 6";
  l = length(msgline);
  line msgLine $varying1024. l;
endcomp;
run;
/*ods text="^S={leftmargin=1in}line1 ^n line2 ^n line3  ^n line 4 ^n line 5 ^n line 6";*/
ods rtf close;

Bruno

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
  • 3 replies
  • 818 views
  • 0 likes
  • 3 in conversation