The SAS Output Delivery System and reporting techniques

How to display 2 tables from one SAS dataset per subject for ECG data.

Accepted Solution Solved
Reply
Regular Learner
Posts: 1
Accepted Solution

How to display 2 tables from one SAS dataset per subject for ECG data.

Hi, 

 

Please can you help in below:

 

I have a SAS dataset with Suject information like subjectid, race, age, and ecg data (visit, visit date, pr, hr, qrs). Please refer to attached file for the required final output. 

 

I want to display data per subject per page. 

 

The top table should have information like subjectid, race, age, and the below table should have information like visit, visit date, pr, hr, qrs. 

 

 

I tried with below code: but this is not giving me per subject records per page:


options orientation=landscape;
title;
footnote;
ods escapechar='^'; 
ods listing close;
ods rtf file="\\tsclient\D\Assignment\output2.rtf" STARTPAGE= NO keepn style= US_Landscape_10pt bodytitle; 
proc report data =adeg1 missing headline headskip nowd split='\' spacing=0;
columns usubjid trta sex age race;
by usubjid trta sex age race;

define usubjid / order width=8 center 'Subject' ;
define trta / order width=8 center 'Treatment' ;
define sex / order width=8 center 'Sex' ;
define age / order width=8 center 'Age' ;
define race / order width=8 center 'Race' ;

break after usubjid / page; 
run;

proc report data =adeg1 missing headline headskip nowd split='\' spacing=0;
columns usubjid adt ady avisit hr qrs qt pr ;
by usubjid trta age sex race;

define usubjid / order=internal noprint ;
define adt / order width=8 center 'A date' ;
define ady / order width=8 center 'Day' ;
define avisit / order width=8 center 'Visit' ;
define hr / order width=8 center 'HR' ;
define qrs / order width=8 center 'QRS' ;
define qt / order width=8 center 'QT' ;
define pr / order width=8 center 'PR' ;

run;


ods rtf close;
ods listing;

 

 

Thanks,

Amit

 


Accepted Solutions
Solution
‎06-22-2018 01:34 AM
Super User
Super User
Posts: 9,799

Re: How to display 2 tables from one SAS dataset per subject for ECG data.

Posted in reply to amitsas16

Try the startpage= option:
http://support.sas.com/kb/44/269.html

Set it to none before the first and then set it to now, after the second.

 

You may need to block out the code for each by group.  I.e for each by group, create a proc report with fixed startpage= option, yu can programmatically create this with macro or call execute.

View solution in original post


All Replies
Solution
‎06-22-2018 01:34 AM
Super User
Super User
Posts: 9,799

Re: How to display 2 tables from one SAS dataset per subject for ECG data.

Posted in reply to amitsas16

Try the startpage= option:
http://support.sas.com/kb/44/269.html

Set it to none before the first and then set it to now, after the second.

 

You may need to block out the code for each by group.  I.e for each by group, create a proc report with fixed startpage= option, yu can programmatically create this with macro or call execute.

☑ This topic is solved.

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

Discussion stats
  • 1 reply
  • 119 views
  • 0 likes
  • 2 in conversation