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

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; 

sas-innovate-2024.png

Join us for SAS Innovate April 16-19 at the Aria in Las Vegas. Bring the team and save big with our group pricing for a limited time only.

Pre-conference courses and tutorials are filling up fast and are always a sellout. Register today to reserve your seat.

 

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