Data visualization with SAS programming

ODS RTF - Unwanted empty lines between graph and footnote

Reply
Occasional Contributor
Posts: 19

ODS RTF - Unwanted empty lines between graph and footnote

I am looking for a way to get rid of two empty lines that always come up after my SGRENDER graph and a footnote below it (nogfootnote bodytitle). Or in general, how can I stop ODS RTF adding empty lines?
Thanks,
Alain
SAS Super FREQ
Posts: 8,717

Re: ODS RTF - Unwanted empty lines between graph and footnote

Hi:
Depending on whether you're using SAS 9.2 or not... if you -are- using SAS 9.2 and measured RTF destination (TAGSETS.RTF), you might look at changing the PARSKIP style attribute -- which would allow you to alter the amount of space between tables. I think this would also apply to the space between tables and graphs.
http://support.sas.com/rnd/base/new92/92measuredrtf.html

But you might want to check with Tech Support to get the definitive answer on how PARSKIP would work with tables and graph output. Or to see whether there's a workaround if you're still using SAS 9.1.3.

cynthia
Occasional Contributor
Posts: 19

Re: ODS RTF - Unwanted empty lines between graph and footnote

Many thanks Cynthia!

ODS tagsets.RTF seems to do a better job indeed, but now I don't get a footnote for each SGRENDER, only after the last one on the page. Any clue?

Thanks,
Alain
SAS Super FREQ
Posts: 8,717

Re: ODS RTF - Unwanted empty lines between graph and footnote

Hi:
Not sure what's going on. Are you using a SAS FOOTNOTE statement or something within a Graph Template, since you're using SGRENDER????

When I run the code below, using TAGSETS.RTF and SGRENDER and some PROC REPORTS, I get TITLES and FOOTNOTES where I expect. If you are having issues with TAGSETS.RTF you might want to work with Tech Support.

cynthia
[pre]

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

proc template;
define statgraph graph.box_elip;
begingraph;
EntryTitle "Want to Use GTL" /;
EntryFootnote "EntryFootnote to Span Both Graphs";

layout lattice / columns=2 columngutter=10;
column2headers;
entry "Boxplot";
entry "Prediction Ellipse";
endcolumn2headers;

columnheaders;
entry "Graph 1";
entry "Graph 2";
endcolumnheaders;

layout overlay / yaxisopts=( Label="Age At Death" type=linear
linearopts=( tickvaluelist=( 40 60 80 100 )
viewmin=35 viewmax=100 ) );
BoxPlot X=chol_status Y=AgeAtDeath /
SortOrder=Data primary=true
LegendLabel="Age at Death" NAME="VBOX";
endlayout;

layout overlay / yaxisopts=( Label="Age At Death"
type=linear linearopts=( tickvaluelist=( 40 60 80 100 )
viewmin=35 viewmax=100 ) );
ScatterPlot X=Weight Y=AgeAtDeath /
primary=true Group=Chol_Status
LegendLabel="Age at Death" NAME="SCATTER";
Ellipse X=Weight Y=AgeAtDeath /
Type=Predicted LegendLabel="95% Prediction Ellipse"
NAME="ELLIPSE";
DiscreteLegend "SCATTER"/
Location=Outside halign=center
valign=bottom;
endlayout;
endlayout;
endgraph;
end;
run;

proc sort data=sashelp.heart out=heart;
by cholesterol chol_status;
run;

ods listing close;

ods tagsets.rtf file='testfootnote.rtf';

proc report data=heart nowd;
title 'Proc Report';
footnote "Test Footnote report";
column chol_status ageatdeath agechddiag;
define chol_status / group order=data;
define ageatdeath/mean "Avg Age At Death";
define agechddiag / mean "Avg Age CHD Diag";
run;

proc report data=heart(obs=75) nowd;
column sex ageatdeath status deathcause diastolic systolic;
title 'list some obs more than 1 pg';
footnote 'another footnote';
run;

proc sgrender data=heart
template=graph.box_elip;
where chol_status ne ' ';
title 'SGRENDER 1';
footnote "Test Footnote 1";
run;

proc report data=heart(obs=75) nowd;
column sex ageatdeath status deathcause diastolic systolic;
title 'list some obs more than 1 pg';
footnote 'another footnote';
run;

proc sgrender data=heart
template=graph.box_elip;
where chol_status ne ' ';
title 'SGRENDER 2';
footnote "Test Footnote 2";
run;

ods tagsets.rtf close;
[/pre]
Ask a Question
Discussion stats
  • 3 replies
  • 700 views
  • 0 likes
  • 2 in conversation