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