I only have subheaders for select columns. For the columns that there are no subheaders, I would prefer there to be one singular cell.
Current Output:
Study Daya |
Treatment Groups |
||
|
Group A |
Group B |
Total |
Want:
Study Daya |
Treatment Groups |
||
Group A |
Group B |
Total |
Note: Study Day spans two columns which are defined by day (e.g. Day 1, Day 2, etc) and the milestone (e.g. Blood Draw 1). Treatment groups are each one column and contain counts.
%let title= %str(Study Status: Number of Subjects Completing Study Milestones);
%report(2C_milestone);
proc report data= _milestone nowd split= '|' %reportstyle;
columns ("Study Day^{super a}" milestone milestone2) ("Treatment Groups" a b /*c d e*/ f);
define milestone / "" order= internal format= dy. style(column)= [just= left vjust= t];
define milestone2 / "" order= internal format= mil. style(column)= [just= left vjust= t];
define a / "Group A" center;
define b / "Group B" center;
/*define c / "Group C" center;*/
/*define d / "Group D" center;*/
/*define e / "Group E" center;*/
define f / "Total" center;
compute after / style= [just= l];
line "Note: Percentages reflective of ongoing status of the trial.";
line "^{super a} The study schedule for Group C differs from Groups A, B, D, and E.
When Study Day differs between treatment groups, the Study Day is listed for Groups A, B, D, and E followed by the Study Day for Group C.";
endcomp;
run;
ods word close;
%report defines options, layout, and ods word file.
ods word file= "&file.\&filename..docx" style= cword startpage= no options(cant_split= 'on' keep_next= 'off' keep_lines= 'on');
%reportstyle defines font style and size.
%macro reportstyle;
style(report)=[cellspacing=0 width=100%]
style(header)=[just=center vjust=b font_size=9pt fontfamily="Times New Roman"]
style(column)=[just=center vjust=b font_size=9pt fontfamily="Times New Roman"]
style(lines)=[bordercolor=black];
%mend;
I'm looking for this too, haven´t had any success.
I have this header,
And I want this header,
@yascm wrote:
I'm looking for this too, haven´t had any success.
I have this header,
And I want this header,
Start your own question, provide some example data in the form of a data step and your code. Since it appears that you may be playing with ODS Style options include your entire ODS destination code as well.
Hint: displaying something where every single value is Text doesn't give much clue as to what is going on.
Join us for SAS Innovate 2025, our biggest and most exciting global event of the year, in Orlando, FL, from May 6-9.
Lock in the best rate now before the price increases on April 1.
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.
Ready to level-up your skills? Choose your own adventure.