Hello,
I need to save analysis results in a RTF file including a navigation pane. Therefore, I used PROC ODSTEXT for section and table headings and PROC REPORT for the tables. However, there is too much space between the table heading and the tables. Is there a possibility to delete the spaces to have the table right below the table heading? I was able to delete section and page breaks, however spaces were not deleted.
I highlighted spaces that should be removed in yellow:
Thank you.
Best wishes,
Tanja
@ed_sas_member This is the Code:
ODS RTF
BODYTITLE_AUX
NOTOC_DATA
WORDSTYLE='(\h1 Title \s1 Heading 1 \s2 Heading 2 \s3 Heading 3 \s4 Heading 4 \s5 Heading 5 \s6 Heading 6 \date Standard)'
FILE="\\fs01\\04_BMT\SAS\RTF_Output\testOutput.rtf"
STYLE=Journal
STARTPAGE=YES;
PROC ODSTEXT;
p "{\pard\s1\b\fs24 {&Section2.} \par}" / style=[outputwidth=17.5cm fontfamily=Arial] ;
p "{\pard\s2\b\fs22 {&Section2_1.} \par}" / style=[outputwidth=17.5cm fontfamily=Arial];
p "{\pard\fs18 {Since no information available for non-enrolled women, tables will not be displayed by country.} \par}" / style=[outputwidth=17.5cm fontfamily=Arial];
p "{\pard\s3\b\fs20 {Section 2.1.1. Analysis Set: REC} \par}" / style=[outputwidth=17.5cm fontfamily=Arial] ;
p "{\pard\s4\b\fs18 {Subgroup: a-1 All Patients} \par}" / style=[outputwidth=17.5cm fontfamily=Arial] ;
%T02_01(AS=REC, STRATA=, SUBGROUP=, WHERE=, TOClevel=s5, TOC1=%STR({\b Table 2.1.1-1} &Table2_1.));
Macro %T02_01 creates the table as follows:
%macro T02_01(AS, STRATA, SUBGROUP, WHERE, TOClevel, TOC1);
* Global settings and formats;
proc datasets library=work kill nolist nodetails;quit;
title;footnote;
PROC ODSTEXT;
p "{\pard\&TOClevel.\fs18 {&TOC1.} \par}" / style=[outputwidth=17.5cm fontfamily=Arial] ; run;
* Data-Selection;
data ANALYSE;
set ADAM.ADSL;
&WHERE.
%SelectCohorts(AS=&AS., STRATA=&STRATA., SUBGROUP=&SUBGROUP.);
run;
*Creation of Table-data;
%OneWay(VAR=ENRFLN, NAME=ENRf., FORMAT=ENRf., LEVEL=%STR(-2,1,99999), WHERE=);
*Output: PROC REPORT ;
ods select all;
ods rtf startpage = NO;
proc report data=TAB_OUT nowindows split='*' missing
style={cellpadding = 3 cellspacing = 3};
column holder flag ("^S={textalign=l fontsize=8pt}&Tablecat." category) DUMMY;
define flag / order order=data noprint;
define category / '' order style(column)={cellwidth=11cm fontsize=8pt};
define STAT / '' missing style(column)={vjust=b textalign=r cellwidth=4cm fontsize=8pt};
define DUMMY / noprint;
define holder / group noprint;
break before holder / page contents="";
compute after _page_ ;
endcomp;
run;
ods rtf startpage = YES;
%mend T02_01;
@ChrisNZthanks for the suggestion. However, when I replace it the spaces are still there and a page break is included (see below)
I tested. I don't get the page break but still have the paragraphs.
Sorry no more ideas 😞
April 27 – 30 | Gaylord Texan | Grapevine, Texas
Walk in ready to learn. Walk out ready to deliver. This is the data and AI conference you can't afford to miss.
Register now and lock in 2025 pricing—just $495!
Still thinking about your presentation idea? The submission deadline has been extended to Friday, Nov. 14, at 11:59 p.m. ET.
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.
Ready to level-up your skills? Choose your own adventure.