The SAS Output Delivery System and reporting techniques

Why is the wrong title showing up when ODS TEXT statement is used in conjunction?

Reply
Occasional Contributor
Posts: 15

Why is the wrong title showing up when ODS TEXT statement is used in conjunction?

For some reason, the wrong title shows up on my Results page when I use the ODS TEXT command. My code is set-up like this:

 

ODS TEXT = 'Calculate summary statistics of USA residents';
TITLE "USA Residents";
PROC PRINT DATA=USASummary; RUN;

ODS TEXT = 'Calculate summary statistics of France residents';
TITLE  "France Residents";
PROC PRINT DATA=FranceSummary; RUN;

ODS TEXT = 'Calculate summary statistics of German residents';
TITLE  "German Residents";
PROC PRINT DATA=GermanSummary; RUN;

The France and Germany summary tables have the correct titles, but the USA table has the title "France Residents". If I remove the ODS TEXT command, the correct title shows up. Does anyone know why this might be happening? My main goal is to generate a final report with some descriptive text that explains the analysis, not sure if there are other commands I could use other than ODS TEXT?

 

Thank you

Respected Advisor
Posts: 4,930

Re: Why is the wrong title showing up when ODS TEXT statement is used in conjunction?

You don't say what your ODS destination is, but I get the expected layout in RTF with:

 


ods rtf file="&sasforum\Reports\testTEXT.rtf";

TITLE "USA Residents";
ODS TEXT = 'Calculate summary statistics of USA residents';
PROC PRINT DATA=USASummary; RUN;

ods rtf startpage=now;
TITLE  "France Residents";
ODS TEXT = 'Calculate summary statistics of France residents';
PROC PRINT DATA=FranceSummary; RUN;

ods rtf startpage=now;
TITLE  "German Residents";
ODS TEXT = 'Calculate summary statistics of German residents';
PROC PRINT DATA=GermanSummary; RUN;
ods rtf close;
PG
Super User
Super User
Posts: 7,979

Re: Why is the wrong title showing up when ODS TEXT statement is used in conjunction?

Why do you want to use ods text in this way.  Why not just put another title line in (which is what you are doing);

title "USA Residents";

title2 "Calculate...";

...

 

You can manipulate font and position of the title to look like a subheader.

Ask a Question
Discussion stats
  • 2 replies
  • 232 views
  • 0 likes
  • 3 in conversation