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

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.

1 ACCEPTED SOLUTION
6 REPLIES 6
Ksharp
Super User

Use    ODS TEXT=   instead .

problems99
Calcite | Level 5

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.

problems99
Calcite | Level 5


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;

problems99
Calcite | Level 5

Thanks.

Have a nice day!

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
  • 6 replies
  • 4476 views
  • 0 likes
  • 3 in conversation