BookmarkSubscribeRSS Feed
michael90
Calcite | Level 5

How to remove this line before the title (I am using PROC REPORT)? I am using TAGSETS.RTF, but as far as I can remember the same blank appears in the margin when using normal ODS RTF (BODYTITLE probably off). I read something about PARSKIP, but removing this manually might be laborious because of there is no consistency for the amount of lines on a page (first page one less then so it overflows to the second messing up the layout, in subsequent pages it does not happen, probably because of the section/page breaks specified by BREAK AFTER pageno). I also read to make PARKSIP smaller by adapting it's STYLE.


blank.jpg
8 REPLIES 8
Jagadishkatam
Amethyst | Level 16

Hi Michael,

to resolve the issue i believe you can follow the below syntax

title1 "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx";

proc report data=dataset_name headline headskip missing ls=133 and ps=47;

where ls=line size and ps =page size.

you can change them depending on your requirement.

Hope this will solve your problem.

Thanks,

Jag

Thanks,
Jag
michael90
Calcite | Level 5

thanks for your suggestion, but varying those options does not have any effect in the RTF file (OUTPUT listing it does).

Jagadishkatam
Amethyst | Level 16

Hi Michael,

Alternatively you can do this way to solve the problem

proc report data=dataset_name headline headskip missing ls=133 and ps=47;

     column name of variables;

    

     compute before _page_;

     line @1 "title";

     endcomp;

run;

you can change the column position by changing the number, this way i hope you can position the title where you want.

Thanks,

Jag

Thanks,
Jag
michael90
Calcite | Level 5

when i use the compute before statement, title gets in the header of the table, the space / blank before the title still exists.

Jagadishkatam
Amethyst | Level 16

Hi Michael,

Sorry but i am a bit confused. even the jpg image you attached is not clear. So could you please take the screen shot once again and send it. Also give us an example to help you.

Thank you for your post.

Thanks,

Jag

Thanks,
Jag
michael90
Calcite | Level 5

data temp;

do i = 1 to 10;

text='xxx';

pagenr=1;

output;

end;

run;

ods tagsets.rtf file="temp.rtf";  

title 'listing - why empty line/parksip before this title?';

proc report NOWD DATA=temp HEADSKIP HEADLINE MISSING SPLIT='~';

COLUMN (pagenr i text);   

    DEFINE pagenr    / ORDER ORDER=INTERNAL NOPRINT;

    DEFINE i    / ORDER 'number';

    DEFINE text  / ORDER   CENTER WIDTH=7  'text';    

    BREAK AFTER pagenr / PAGE;

run;    

ods tagsets.rtf close;

Cynthia_sas
SAS Super FREQ

Hi:

  I see the line feed/carriage return you are referring to. I do not believe the style template will "touch" that line feed before the title. When I change the PARSKIP element in a style template, the space between the TABLES changes, but not the line before the title. I have turned on paragraph marks in Word for the attached screenshot so you could see the difference when setting PARSKIP to 1 pt. See the difference between #1 (with PARSKIP set to 1 pt) and #2 with the default value for PARSKIP.

  This is probably a question for Tech Support, because either 1) you can't get rid of the line feed before the title or 2) the way to change it may be a template change, but it would mean changing the TAGSET template for TAGSETS.RTF (not the style template), which means you would have to know what event at the SAS end was causing the line feed or carriage return before the title.

  Here's the snippet of RTF that ODS is writing for the #1 title. My guess is that whatever piece of code writes this section is putting an extra line feed into the RTF output file:

{\*\bkmkstart IDX}{\*\bkmkend IDX}

{\pard\par}

\trowd\trkeep\trqc\trgaph0

\pard\plain\intbl\sb10\sa10\sl-299\fs26\cf1\qc\i\f1\b{1) listing - why empty line before this title?\cell}

But I don't know enough about RTF control strings or how the template logic works to suggest a change.

cynthia


ods path work.tmp(update) sasuser.templat(update)
         sashelp.tmplmst(read);

proc template;
     define style test2;
     parent=styles.rtf;
        style parskip / fontsize = 1pt;
     end;
  run;


ods listing close;
options nodate nonumber;
ods tagsets.rtf file="c:\temp\line.rtf" style=test2
    startpage=no options(doc='Help');  
title '1) listing - why empty line before this title?';
proc report data=sashelp.class(obs=3) nowd;
run;

proc report data=sashelp.shoes(obs=2) nowd;
run;

ods tagsets.rtf close;


ods listing close;
options nodate nonumber;
ods tagsets.rtf file="c:\temp\default.rtf" style=rtf
    startpage=no options(doc='Help') ;  
title '2) Default Skip';
proc report data=sashelp.class(obs=3) nowd;
run;

proc report data=sashelp.shoes(obs=2) nowd;
run;

ods tagsets.rtf close;


  


use_parskip_style_element.png
data_null__
Jade | Level 19

I think you will need to include example code that produces the problem. 

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
  • 8 replies
  • 5285 views
  • 0 likes
  • 4 in conversation