BookmarkSubscribeRSS Feed
Dhoomketu
Calcite | Level 5

Hi,

I am facing inconsistent results in titles and footnotes from different SG procedures while using ODS RTF destination. Please see below, when I run the code below, title1 and footnote3 did not appear in the resulting RTF file. If use the similar wrapping of ODS statements and title & footnote statements but use Proc SGRENDER then the resultant RTF file shows title1 and footnote3 as well. Also, with SGRENDER, titles and footnotes comes outside the plot area but they were part of the plot area with Proc SGPANEL. I want them outside of the plot area like they are coming with SGRENDER. Any help is appreciated. Thanks in advance. 

ods escapechar="@";
ods listing close;
options orientation=landscape ps=160 ls=80;
ods graphics /reset noborder imagefmt=jpg noscale;
ods graphics on / height=5.4in width=9in;

title1 j=l "(*ESC*)R/RTF'\trowd\trkeep\trql\b \cellx6000 \cellx12900 \pard\plain\intbl\sb0\sa0\ql\f1\fs18\cf1{\ql Protocol: AIS-D01 \cell}" "\pard\plain\intbl\sb0\sa0\qr\f1\fs18\cf1{{Final Analysis} \cell}{\row}";
title2 j=c "Figure 5 XYZ";
title3 j=c "Population XYZ";
footnote1 j=l "ABC";
footnote2 j=l "ABC";
footnote3 "(*ESC*)R/RTF'\trowd\trkeep\trql \cellx6000 \cellx12900 \pard\plain\intbl\sb0\sa0\ql\f1\fs18\cf1{\ql Source: figure5.sas (17FEB2023, 16:57:39) \cell}"
"\pard\plain\intbl\sb0\sa0\qr\f1\fs18\cf1{{Page} {\field{\*\fldinst { PAGE}}}\~{of}\~{\field {\*\fldinst { DOCPROPERTY PAGES }}} \cell}{\row}";

ods rtf file="path\figure5.rtf"  bodytitle headery=1080 footery=1080;

proc sgpanel data=final dattrmap=attrmap;
panelby trt01an / onepanel  novarname noheaderborder ;
series x=day y=logaval/ markers group=subjid attrid=subcolmap name='series';
keylegend 'series'/noborder position=right;
format trt01an bygrp.;
run;

ods _all_ close;
ods listing;

 
4 REPLIES 4
Ksharp
Super User
Tyr nogtitle nogfootnote options:

ods rtf file="c:\temp\figure5.rtf" nogtitle nogfootnote ;
Dhoomketu
Calcite | Level 5

Thank you for your response. Now the page number in the footnote is not coming up like it was before. Can you check the last footnote statement and suggest something to fix page number issue with these options. Also, can you tell me the reasoning behind using these options as SGRENDER work perfectly fine without these options, problem arises when I start using SGPANEL.

Cynthia_sas
SAS Super FREQ
Hi: You have several complicating factors that I think warrant working with Tech Support on this question. Here are the things I note:
1) you are using RTF control strings to insert the page X of Y. I'm not sure how this will work with either BODYTITLE or the HEADERY/FOOTERY options or IF it will work.
2) also not sure about any interaction between BODYTITLE and HEADERY/FOOTERY and whether they have an interaction
3) I always use ODS ESCAPECHAR with ODS RTF to get Page X of Y page numbering, but there may be an interaction between this and using BODYTITLE and graphic images.
These are all things that I think you would be better served by working with Tech Support. They will need some data to test your code and answer your other question about SGRENDER vs SGPANEL. The main difference as far as I know is that SGRENDER is working with graph templates that need to be rendered; while SGPANEL does not allow quite as much control as the graph template language.
Cynthia

SAS Innovate 2025: Call for Content

Are you ready for the spotlight? We're accepting content ideas for SAS Innovate 2025 to be held May 6-9 in Orlando, FL. The call is open until September 25. Read more here about why you should contribute and what is in it for you!

Submit your idea!

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