BookmarkSubscribeRSS Feed
🔒 This topic is solved and locked. Need further help from the community? Please sign in and ask a new question.
fatemeh
Quartz | Level 8

Hello, I am using sas 9.4 and I appreciate you all to help me solve these issues:

1) The rtf file is not opening in word file by default. I want the rtf file opens in word file by default.

2) only first title is printed in rtf file, the second title is not printed

 

ods rtf on ;
ods html close;
ods graphics on;
ods rtf file="myfilelocation\filename.rtf "style=sasweb startpage=no bodytitle;
title1'title1 ';
proc print data=data1;run;
title2'title2';
proc print data=data2;run;
title'';
ods startpage=yes;
ods rtf close;
ods html ;

 

1 ACCEPTED SOLUTION

Accepted Solutions
jimbarbour
Meteorite | Level 14
If the rtf file is not opening in Word, that's a Windows issue, not a SAS issue. You need to set the Windows default.

Re the titles, the code you posted doesn't have any titles other than blank ones. Is this the right code? Is there more code? Can you post a screen shot of the output?

Jim

View solution in original post

3 REPLIES 3
jimbarbour
Meteorite | Level 14
If the rtf file is not opening in Word, that's a Windows issue, not a SAS issue. You need to set the Windows default.

Re the titles, the code you posted doesn't have any titles other than blank ones. Is this the right code? Is there more code? Can you post a screen shot of the output?

Jim
fatemeh
Quartz | Level 8

Thank you so much for your valuable reply

Cynthia_sas
SAS Super FREQ

Hi:

  I am wondering what version of SAS you're running? When I run a slightly modified version of your code using ODS RTF, in SAS 9.4 M7, to use SASHELP data, I DO see the titles inside the body of the document. Since SAS titles are global, TITLE1 appears above the first report; TITLE1 and TITLE2 appear above the second report; and all 3 titles appear above the third report, as shown below:

Cynthia_sas_0-1628952770017.png

Earlier versions of SAS and ODS did not always put titles in the middle of a page with STARTPAGE=YES, , but 9.4 M7 seems to work as you intend.

Cynthia

sas-innovate-2024.png

Available on demand!

Missed SAS Innovate Las Vegas? Watch all the action for free! View the keynotes, general sessions and 22 breakouts on demand.

 

Register now!

What is ANOVA?

ANOVA, or Analysis Of Variance, is used to compare the averages or means of two or more populations to better understand how they differ. Watch this tutorial for more.

Find more tutorials on the SAS Users YouTube channel.

Discussion stats
  • 3 replies
  • 611 views
  • 3 likes
  • 3 in conversation