The SAS Output Delivery System and reporting techniques

Multiple titles on the same page

Accepted Solution Solved
Reply
Contributor
Posts: 29
Accepted Solution

Multiple titles on the same page

Hello,

I would like to display more than one report on the same sheet. But only the title of the first proc print is shown on the sheet and never the others. How can I solve that?

For example:

Proc print data=normal noobs;
Title2 'HH Short Term  control  CC ST-MT';
where lcccthh = 'NO' and (NB13 ne . and NB14 ne .);
var d_report c_bic NB13 NB14 lcccthh ;
run;

Proc print data=normal noobs;
Title2 'HH Short Term  control  CC ST-LT';
where lccct2hh = 'NO' and (NB13 ne . and NB15 ne .);
var d_report c_bic NB13 NB15 lccct2hh ;
run;

Thanks.


Accepted Solutions
Solution
‎06-15-2015 09:40 AM
Esteemed Advisor
Posts: 6,698

Re: Multiple titles on the same page

Look at the BODYTITLE option for ODS RTF.

---------------------------------------------------------------------------------------------
Maxims of Maximally Efficient SAS Programmers

View solution in original post


All Replies
Grand Advisor
Posts: 9,593

Re: Multiple titles on the same page

Use    ODS TEXT=   instead .

Contributor
Posts: 29

Re: Multiple titles on the same page

The problem is that the text is always displayed. By using title in a proc print, if there are no data, the title is not displayed.

Esteemed Advisor
Posts: 6,698

Re: Multiple titles on the same page

Interesting. Could you please supply your complete code (as I could not replicate that behaviour).

---------------------------------------------------------------------------------------------
Maxims of Maximally Efficient SAS Programmers
Contributor
Posts: 29

Re: Multiple titles on the same page


This more simple code below has the same idea.

DATA Salary;
Input Id Salary Name $;
datalines;
101 55000 Jack
102 75000 Edward
103 85000 Arthur
;
RUN;

ods rtf;

ods rtf startpage=now;
Proc print data=Salary noobs;
Title 'Salary under 60000';
where Salary < 60000;
var Salary Name;
run;

ods rtf startpage=no;

Proc print data=Salary noobs;
Title 'Salary from 60000 to 70000';
where (Salary < 70000 and Salary > 60000);
var Salary Name;
run;

Proc print data=Salary noobs;
Title 'Salary from 70000 to 80000';
where (Salary < 80000 and Salary > 70000);
var Salary Name;
run;

Proc print data=Salary noobs;
Title 'Salary over 80000';
where Salary > 80000;
var Salary Name;
run;

ods rtf close;

Solution
‎06-15-2015 09:40 AM
Esteemed Advisor
Posts: 6,698

Re: Multiple titles on the same page

Look at the BODYTITLE option for ODS RTF.

---------------------------------------------------------------------------------------------
Maxims of Maximally Efficient SAS Programmers
Contributor
Posts: 29

Re: Multiple titles on the same page

Thanks.

Have a nice day!

☑ This topic is SOLVED.

Need further help from the community? Please ask a new question.

Discussion stats
  • 6 replies
  • 955 views
  • 0 likes
  • 3 in conversation