🔒 This topic is solved and locked.
Need further help from the community? Please
sign in and ask a new question.
- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content
Posted 08-18-2021 01:10 AM
(1735 views)
I use PROC REPORT to output results from two datasets, say A and B, to a single page. How could I insert a subject line on top of each of the tables? The "title" statement does not do the job. The expected output would look like the following. Thanks in advance!
Results Part A
PID | Measure A | |
101 | 1.1 | |
102 | 1.2 |
Results Part B
PID | Measure B | |
101 | 2.1 | |
102 | 2.2 |
data A B;
do PID=101 to 102; A=PID/100; B=A+1; output; end;
run;
ods rtf file='output.rtf' startpage=NO;
title 'Results Part A';
proc report data=A;
column PID A;
define A /display "Measure A";
run;
title 'Results Part B';
proc report data=B;
column PID B;
define B /display "Measure B";
run;
ods rtf close;
1 ACCEPTED SOLUTION
Accepted Solutions
- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content
Have you looked at proc odstext and ods text ?
3 REPLIES 3
- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content
Have you looked at proc odstext and ods text ?
- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content
You can also use the BODYTITLE option of the ODS RTF statement.
See here for an example:
ods rtf file='c:\temp\output.rtf' startpage=NO bodytitle;
title 'Results Part A';
proc report data=A;
column PID A;
define A /display "Measure A";
run;
title 'Results Part B';
proc report data=B;
column PID B;
define B /display "Measure B";
run;
ods rtf close;
- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content
Both solutions are nice and working. It's not permitted, but I wish I could mark both as a solution. Thank you all!