BookmarkSubscribeRSS Feed
_Hopper
Obsidian | Level 7

I have the following report code and it runs fine, however, I would like the label over the left most column to be on the same level as the treatment name. With this type of report setup, can it be done?

_Hopper_1-1733276157965.png

 

proc report data = combine ;
column ("MRDQ Domain Pearson Correlation (P-value)" variable) trtan,eyeord,&variable dummy;
where avisitn = &visit and trtan in (&trtan);
define variable / '' group f = $domain. style(column) ={cellwidth = 1.55in };
define trtan / '' across order = internal f = trt. style={vjust = bottom};
define eyeord / '' across order = internal f= eyeord. style={vjust = bottom} ;;
define &variable / '' style(column) = {cellwidth = 1.25in just = c vjust = top asis = on} ;
define dummy / '' noprint;

compute before;
line "~S={font_size = 8pt}";
endcomp;
compute after variable;
line "~S={font_size = 4pt}";
endcomp;
run;

2 REPLIES 2
Ksharp
Super User

You 'd better post the sample data and the desired output. So we can test the code and know what you are looking for.

 

proc report data=sashelp.heart nowd;
column ("MRDQ Domain Pearson Correlation (P-value)"  ' ' ' '  bp_status ) status,sex,weight;
define bp_status/group '';
define status/across '';
define sex/across '';
define weight/analysis sum '';
run;

Ksharp_0-1733278861225.png

 

Cynthia_sas
Diamond | Level 26

Hi:

  I'm confused. I don't see Treatment Name on the report. Which column is the treatment name? You are using so many macro variables it's hard to figure out what your data looks like and which variable is which. My guess is that treatment may be TRTAN or it could be &VARIABLE or confusingly, it could be the column listed as VARIABLE? Just not sure and it looks like you've blanked out most of those column headers anyway.

  It appears that the leftmost column is just called "VARIABLE" and you've blanked out that header and are using "MRDQ Domain Pearson Correlation (P-value)" as the header over that variable:

Cynthia_sas_0-1733278845305.png

  Is "VARIABLE" the treatment name? If so, I don't understand what you mean when you say you want the label on the same level as treatment name.

  You're also using custom formats and while some of the custom formats help in figuring out whether variables are character or numeric, it's hard to dummy data without any idea of what the data looks like or what your macro variables and formats are doing.

  Can you post some dummy data and a version of the code either without macro variables or with macro variable values supplied and either with or without the code for the formats?

Cynthia

hackathon24-white-horiz.png

The 2025 SAS Hackathon Kicks Off on June 11!

Watch the live Hackathon Kickoff to get all the essential information about the SAS Hackathon—including how to join, how to participate, and expert tips for success.

YouTube LinkedIn

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