The SAS Output Delivery System and reporting techniques

17 Underscore after a Title Using PRETEXT. Why?

Accepted Solution Solved
Reply
Regular Contributor
Posts: 223
Accepted Solution

17 Underscore after a Title Using PRETEXT. Why?

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;

?>


Accepted Solutions
Solution
‎04-15-2013 02:24 PM
Regular Contributor
Posts: 223

Re: 17 Underscore after a Title Using PRETEXT. Why?

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


All Replies
Respected Advisor
Posts: 3,782

Re: 17 Underscore after a Title Using PRETEXT. Why?

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 .

SAS Super FREQ
Posts: 8,814

Re: 17 Underscore after a Title Using PRETEXT. Why?

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

Solution
‎04-15-2013 02:24 PM
Regular Contributor
Posts: 223

Re: 17 Underscore after a Title Using PRETEXT. Why?

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; 

🔒 This topic is solved and locked.

Need further help from the community? Please ask a new question.

Discussion stats
  • 3 replies
  • 430 views
  • 4 likes
  • 3 in conversation