BookmarkSubscribeRSS Feed
NickR
Quartz | Level 8

Hello,

I am using Proc Report with ODS RTF to generate an output. I am getting a blank line between title and column header and between bottom horizontal line and footer. I have highlighted the blank lines in yellow. Is there a way I can remove these blank lines? Any help is greatly appreciated. Thanks!

ods rtf file="&path.\one.rtf" style=custom bodytitle;

proc report data = test nowd split='#' missing style = [outputwidth = 9in]  style(header)=[asis=on just=left protectspecialchars=off]

          style(column)=[asis=on protectspecialchars=off];

title1 j=c "Chemistry Data";

footnote1 j=l "Reference Range used is local laboratory Reference Range";

footnote2 j=l " H= high";

footnote3 j=l " L= low";

footnote4 j=l " A= abnormal";

footnote5 j=l  '   ';

footnote6 j=l  '   ';

footnote7 j=l  "Status of Program: ";

footnote8 j=l  "Program Location:";

footnote9 j=l  "Date/Time Report Produced: ";

one.JPG

5 REPLIES 5
Cynthia_sas
SAS Super FREQ

Hi:

  In the TAGSETS.RTF destination (the "new" RTF destination), that space is controlled by the PARSKIP style element. In the original RTF destination, such as you are using, the PARSKIP style element does not impact the output. There is a certain amount of white space under titles and before footnotes that you cannot get rid of or change in the original RTF destination output without editing the document in Word, after it has been created.

  You can read about using PARSKIP here: http://support.sas.com/rnd/base/new92/92measuredrtf.html#para

                           

  And the code below illustrates a simple example using SASHELP.CLASS. Compare the results from the TAGSETS.RTF destination file with the original RTF destination file, you should see the impact the PARSKIP element has. Since you are using a custom style template, you would have to incorporate the style change for PARSKIP into your custom template code.

cynthia

options orientation=landscape

        topmargin=.5in bottommargin=.5in

        leftmargin=.5in rightmargin=.5in

        nodate nonumber;

              

ods path work.tmp(update)

         sasuser.templat(update)

         sashelp.tmplmst(read);

             

  proc template;

     define style styles.myjour;

     parent=styles.journal;

        style parskip / fontsize = 1pt;

     end;

  run;

             

ods tagsets.rtf file="c:\temp\tag_parskip.rtf" style=styles.myjour;

ods rtf file="c:\temp\orig_parskip.rtf" style=styles.myjour bodytitle;

           

proc report data = sashelp.class(obs=5) nowd split='#' missing

     style(report) = [outputwidth = 9in] 

     style(header)=[asis=on just=left protectspecialchars=off]

     style(column)=[asis=on protectspecialchars=off];

                     

title1 j=c "Chemistry Data";

footnote1 j=l "Reference Range used is local laboratory Reference Range";

footnote2 j=l " H= high";

footnote3 j=l " L= low";

footnote4 j=l " A= abnormal";

footnote5 j=l  '   ';

footnote6 j=l  '   ';

footnote7 j=l  "Status of Program: ";

footnote8 j=l  "Program Location:";

footnote9 j=l  "Date/Time Report Produced: ";

                            

column name sex age height weight;

run;

ods _all_ close;

title; footnote;

NickR
Quartz | Level 8

Hi Cynthia,

Thanks a lot for the reply. Forgot to mention that I have SAS 9.1.3 in my machine, I am sorry about that. Is there a way to achieve this in SAS 9.1.3?

Thanks!

Cynthia_sas
SAS Super FREQ

Hi:

  You'd have to check with Tech Support. There might have been an experimental version of TAGSETS.RTF available with SAS 9.1.3. Otherwise, you might have to use regular TAGSETS.RTF and then delete the extra space manuallly from the document when you open it with Word.

cynthia

NickR
Quartz | Level 8

Thank you. Will check with Tech support.

zhaosi
Fluorite | Level 6

Hi:

    Pretext and posttext can do this. For example:

ods rtf file="&path.\one.rtf" style=custom bodytitle;

proc report data = test nowd split='#' missing style = [outputwidth = 9in]  style(header)=[asis=on just=left protectspecialchars=off]

          style(column)=[asis=on protectspecialchars=off]

         style(report)=[pretext='Chemistry Data'  posttext='Reference Range used is local laboratory Reference Range{\par}H= high{\par}L= low{\par}A= abnormal'  just=left font_weight=light font_size=12pt];

ods rft close;

SAS Innovate 2025: Save the Date

 SAS Innovate 2025 is scheduled for May 6-9 in Orlando, FL. Sign up to be first to learn about the agenda and registration!

Save the date!

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
  • 5 replies
  • 9577 views
  • 5 likes
  • 3 in conversation