BookmarkSubscribeRSS Feed
raja777pharma
Fluorite | Level 6

Hi , 

 
I am trying to display the COL1 "Subject ID" Groupe variable value  in next page  starting to identify the rows related to Subject
My current code is :
options orientation=landscape nodate nonumber center nobyline ;
ods rtf file = "&apath\table 02.rtf" startpage-yes style=styles.outrtf device-sasemf;
proc report data= prodout.table  headline headskip missing center split='|' nowd
style (report) - (cellpadding=0.5pt cellspacing=1pt just=c FRAME-ABOVE  ASIS=ON RULES-GROUPS)
style (header) = (font=("courier new", 9pt, bold) vjust-middle  asis=on just=1}
style (column) - (font-("Courier New", 9pt, normal) asis=on /just=1/}
style (lines) = (font=("courier new", 9pt, normal) asis=on):

column coll pageord ord0 col2 col3 col col5;

define pageord /order = internal order noprint;
define ord0    /order = internal order noprint;


define coll / 'Subject ID' group width=15 flow style (header) - [just-left] style (column) - [cellwidth =15% asis=on] left id;
define COL2 / flow 'Reported Term/System| Organ Class/Preferred Term' width=39 flow style (header) = [just-style (column) - [cellwidth =39% asis-on]:
define col3 / flow 'Start date' width=15 flow style (header) = [just=left]   style (column) - [cellwidth -15% asis=on];
define col4 / flow 'Ongoing/End date' width=15 flow style (header) = [just=left] style (column) = [cellwidth -15% asis=on];
define col5 / flow 'Intensity' width=15 flow style (header) - [just=left] style (column) = [cellwidth -15% asis=on];

compute after ord0;
  line '     ';
  endcomp;
  
run;

ods rtf close;
ods listing;
 
I want to repeat the Subject ID on page 2 for first row .
Below is the output 
Page 1
raja777pharma_0-1737438879323.png
Page 2
raja777pharma_1-1737438903162.png

 

 
Thank you,
Rajasekhar.
3 REPLIES 3
Ksharp
Super User
data have;
 set sashelp.heart(obs=90);
 keep sex weight height bp_status;
run;
proc sort data=have;by sex;run;
option nodate nonumber;
title;
ods tagsets.rtf file='c:\temp\temp.rtf' style=journal startpage=no;
proc report data=have nowd spanrows;
column sex bp_status weight height ;
define sex/order;
define bp_status/display;
define weight/display;
run;
ods tagsets.rtf close;

Ksharp_0-1737441095937.png

 

raja777pharma
Fluorite | Level 6

Hi ,

 

I have updated below statement , but still getting same and not repeating the subject id

 

define coll / 'Subject ID' order width=15 flow style (header) - [just-left] style (column) - [cellwidth =15% asis=on] left id;

 

Thank you,

Rajasekhar.

 

 

Ksharp
Super User

So did you check where is difference between your code and mine ?

title;
ods tagsets.rtf file='c:\temp\temp.rtf' style=journal startpage=no;
proc report data=have nowd spanrows;
column sex bp_status weight height ;
define sex/order;
define bp_status/display;
define weight/display;
run;
ods tagsets.rtf close;

hackathon24-white-horiz.png

The 2025 SAS Hackathon has begun!

It's finally time to hack! Remember to visit the SAS Hacker's Hub regularly for news and updates.

Latest Updates

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.

SAS Training: Just a Click Away

 Ready to level-up your skills? Choose your own adventure.

Browse our catalog!

Discussion stats
  • 3 replies
  • 1124 views
  • 0 likes
  • 2 in conversation