BookmarkSubscribeRSS Feed
emera86
Quartz | Level 8

Dear all,

 

I have a list of adverse event characteristics by patient ID and I have defined the patient ID variable as a order variable (its value only appears at the first line of the group of registers belonging to that patient). As the information for each patient can go through several pages I would like to facilitate the listing review by including again the patient ID at the same column at beginning of each page (not as an external thing to the table).

 

I have tried defining the variable as group, id, including the spanrows option in the procedure, a break before the variable and a by variable after the column statement and nothing is working. I'm sure it has to be something to get this.

 

Let me show you my basic code:

 

ods rtf style=customtemplate path=&outputs
file="Listing 16.3.1 TEAEs (Safety Population) (&sysdate).doc";
title3 "Listing 16.3.1 TEAEs (Safety Population)";

proc report data=teaes nowd headline headskip spacing=2 split='|' style(report)={width=100% cellpadding=0.05} missing span; column ('Subject ID' subjidchar) ('Site' site) ('AE term/SOC/PT' aeterm2report) ('Grd' aetoxgr) ('Ser?' aeser) ('AE Dates' astdt aendt) ('Related?' relgr1n relgr2n) ('Action Taken' aeacn aeacnp) ('Outcome' aeoutrep); define subjidchar / display order order=data flow left '' style(column)={width=5%}; define site / display flow left '' order style(column)={width=7%}; define aeterm2report / display left flow '' style(column)={width=21%}; define aetoxgr / display center flow '' style(column)={width=3%}; define aeser / display center flow '' style(column)={width=3%}; define astdt / display center flow 'Start' style(column)={width=6%}; define aendt / display center flow 'End' style(column)={width=6%}; define relgr1n / f=yn. display center flow 'Drug 1' style(column)={width=4%}; define relgr2n / f=yn. display center flow 'Drug 2' style(column)={width=4%}; define aeacn / display center flow 'Drug 1' style(column)={width=7%}; define aeacnp / display center flow 'Drug 2' style(column)={width=7%}; define aeoutrep / display center flow '' style(column)={width=7%}; run;

ods rtf close;

I hope this screenshot helps understand what I would like to achieve (I have highlighted in yellow the new features I need):

emera86_0-1653410333144.png

 

Thank you in advance for any tips you may have on this topic!

3 REPLIES 3
ballardw
Super User

First, example data would help. I realize this may be sensitive so replace sensitive values with dummy things like XXX and YYY for different levels so that we don't see any of the sensitive values.

 

You should include your ODS destination code as well. I say this because HTML, the default has no real concept of "page" and would not have any such break to deal with. So you must have something that uses "page". Each destination that has pages may have different requirements to accomplish what you state.

 

It might help to draw a table, such as in a word processing program to demonstrate exactly what you expect the result to look like.

 

I am not sure

emera86
Quartz | Level 8
Thank you for your quick answer! I'll see what I can do to provide an example of what I have and what I need.
ballardw
Super User

I think that you may have missed this part of the SPANROWS documentation:

The SPANROWS option also allows GROUP and ORDER variables values to repeat when the values break across pages. Only the PDF, PS, and TAGSETS.RTF destinations support this part of the feature.

 

So try your SPANROWS attempt but use use ODS TAGSETS.RTF instead of ODS RTF. You don't appear to be using any of the options that RTF does differently than TAGSETS.RTF would.

sas-innovate-2024.png

Available on demand!

Missed SAS Innovate Las Vegas? Watch all the action for free! View the keynotes, general sessions and 22 breakouts on demand.

 

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