BookmarkSubscribeRSS Feed
🔒 This topic is solved and locked. Need further help from the community? Please sign in and ask a new question.
djbateman
Lapis Lazuli | Level 10

To conform to my companies output layout, I have been putting titles on my tables using the PRETEXT= option in the PROC REPORT statement instead of a TITLE statement.  I have noticed, however, that whenever I use this option, my titles always have exactly 17 underscores after it.  Can anyone see in my code below why that would be the case and/or how I can get rid of it?

options formchar="|____|+|___+=|_/\<>*" pageno=1 nonumber nodate orientation=portrait center;

ods listing close;

ods rtf file="D:\ Laboratory Changes - 8APR2013.rtf" style=journal;

ods escapechar='~';

%let user=%sysfunc(upcase(&sysuserid.));

%let proddt=%sysfunc(date(),worddate.);

title1 j=left font='Arial' 'Endocyte, Inc.' j=right "Page ~{pageof}";

title2 j=left font='Arial' "Protocol: EC20";

footnote1 j=left font='Arial' "Program: Merge_EC20_Labs.sas by &user." j=right "Date Produced: &proddt.";

proc report data=changes nowindows split='^' style(column)={asis=on}

            style(report)={font=('Arial',9.5pt,bold italic) pretext="Number (%) of Patients with a Laboratory Changes from Baseline Exceeding Defined Limits of Change"};

      column labtest limit patcnt percent;

      define labtest / display left 'Assay' style=[CellWidth=25%];

      define limit / display center 'Defined Limit of Change (from baseline)' style=[CellWidth=20%];

      define patcnt / display center 'Patient Count' style=[CellWidth=8%];

      define percent / display center 'Patients Meeting Criteria' style=[CellWidth=10%];

run;

ods rtf close;

ods listing;

title; footnote;

?>

1 ACCEPTED SOLUTION

Accepted Solutions
djbateman
Lapis Lazuli | Level 10

Tech support was able to help me out.  Here is their solution:

ods path(prepend) work.templat(update);

proc template;

   define style Styles.test;

      parent = styles.Journal;

   style table from table/

      prehtml='';

   end;

run;

ods rtf file='test.rtf' style=test;

proc report data=sashelp.class nowd style(report)=[pretext='this is some text'];

run;

  ods rtf close; 

View solution in original post

3 REPLIES 3
data_null__
Jade | Level 19

If you open the RTF in an editor you will see the underscores are actually hex nulls '00'x.  I don't know why they are there.  If you change ODS style to unspecified.  So it seems to be associated with  style=journal .

Cynthia_sas
Diamond | Level 26

Hi:

  This might also be a question for Tech Support. When I use ODS TEXT= instead of the PRETEXT style attribute, there aren't any characters appended to the end of the string. So it's a puzzle.

cynthia

djbateman
Lapis Lazuli | Level 10

Tech support was able to help me out.  Here is their solution:

ods path(prepend) work.templat(update);

proc template;

   define style Styles.test;

      parent = styles.Journal;

   style table from table/

      prehtml='';

   end;

run;

ods rtf file='test.rtf' style=test;

proc report data=sashelp.class nowd style(report)=[pretext='this is some text'];

run;

  ods rtf close; 

hackathon24-white-horiz.png

The 2025 SAS Hackathon has begun!

It's finally time to hack! Remember to visit the SAS Hacker's Hub regularly for news and updates.

Latest Updates

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
  • 3 replies
  • 2476 views
  • 4 likes
  • 3 in conversation