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.
Look at the BODYTITLE option for ODS RTF.
Use ODS TEXT= instead .
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.
Interesting. Could you please supply your complete code (as I could not replicate that behaviour).
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;
Look at the BODYTITLE option for ODS RTF.
Thanks.
Have a nice day!
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!
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.