BookmarkSubscribeRSS Feed
fengyuwuzu
Pyrite | Level 9

if I want to have several proc to print on the same page, can I have a different title for each proc?

 

I tried and the titles in the 2nd and 3rd proc did not appear at all.

9 REPLIES 9
fengyuwuzu
Pyrite | Level 9
I confirm this is because the startpage=no option

without it, no problem. with it, the titles from the second proc is suppressed .
RW9
Diamond | Level 26 RW9
Diamond | Level 26

Please post the code you have tried as this works fine for me:

ods rtf file="s:\temp\rob\temp.rtf";
title "This is first one";
proc print data=sashelp.class;
run;
title "Another one";
proc print data=sashelp.cars;
run;
ods rtf close;
fengyuwuzu
Pyrite | Level 9
when I add "startpage=no" then it does not work
RW9
Diamond | Level 26 RW9
Diamond | Level 26

Yes, that is an example of using ods text="..."; to output some text at the point.  It is not titles/footnotes though.  If that works for you all well and good (just doesn't match your topic title 🐵

fengyuwuzu
Pyrite | Level 9
yes, it works. when I wanted to center the text with:
ods escapechar='^';
ods text= "^S={width=100% just=c }test1 ";
I got the following warning:
416 ods text= "^S={width=100% just=c }test2 "
-
49
416! ;
NOTE 49-169: The meaning of an identifier after a quoted string might change in a future SAS release.
Inserting white space between a quoted string and the succeeding identifier is recommended

ballardw
Super User

With ODS RTF the BODYTITLE option is used to specify that the titles and footnotes go into the body of the document not the header or footer of the page. That will work with startpage=no to provide titles for each proc on a page.

 

the Note is just that, a note that sometime in the future the appearance of your output might chage because your code contains something like "quoted text here"variablename instead of "quoted text here" variablename. If you don't like the note put a space after the quoted string.

This note has been around since 9.0 at least.

RW9
Diamond | Level 26 RW9
Diamond | Level 26

Yes, well there is the problem.  Startpage=no means there is no page break.  Titles and footnotes by their very nature can only apply to the page, i.e. they are the title of that page.  Because there is only one page you only get one page.  What does the output need to look like, you could try ods text="..."; to get a subheading, or use by groups, hard to say without an example.

sas-innovate-2024.png

Join us for SAS Innovate April 16-19 at the Aria in Las Vegas. Bring the team and save big with our group pricing for a limited time only.

Pre-conference courses and tutorials are filling up fast and are always a sellout. Register today to reserve your seat.

 

Register now!

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