Hi guys, I have a question about how to keep the name of headers on the same line in Proc report?
I am making a table in proc report statement and my code is :
proc report data=table12 nowindows headline headskip spacing = 10;
columns AVISITN_1 Trt01a count mean_se;
define AVISITN_1/group order=data center width =20 " Test Day " style(column)={just=c};
define Trt01a /display center width=10 "Treatment" ;
define count / display center width =14 "N";
define mean_se /display center width = 40" Adjusted Mean(SE)";
title1 bold "Table11";
title2 bold "Summary od Blood Glucose Level over time";
title3 bold "ITT Subjects";
compute after AVISITN_1;
line " ";
endcomp;
run;
ods pdf close;
And my output is:
My question is that i didn't use the split statement to divide the header and I want to keep "Test Day" and "Adjusted mean(SE)"headers in the same line.
Thanks!
Using Style:
style(header)={nobreakspace=on}
ods pdf file='c:\temp\temp.pdf';
proc report data=sashelp.class nowindows headline headskip spacing = 10 style(header)={nobreakspace=on} ;
columns sex name age weight;
define sex/group order=data center width =20 " Test Day " style(column)={just=c} ;
define name /display center width=10 "Treatment" ;
define age / display center width =14 "N";
define weight /display center width = 40" Adjusted Mean(SE)";
title1 bold "Table11";
title2 bold "Summary od Blood Glucose Level over time";
title3 bold "ITT Subjects";
compute after sex;
line " ";
endcomp;
run;
ods pdf close;
Using Style:
style(header)={nobreakspace=on}
ods pdf file='c:\temp\temp.pdf';
proc report data=sashelp.class nowindows headline headskip spacing = 10 style(header)={nobreakspace=on} ;
columns sex name age weight;
define sex/group order=data center width =20 " Test Day " style(column)={just=c} ;
define name /display center width=10 "Treatment" ;
define age / display center width =14 "N";
define weight /display center width = 40" Adjusted Mean(SE)";
title1 bold "Table11";
title2 bold "Summary od Blood Glucose Level over time";
title3 bold "ITT Subjects";
compute after sex;
line " ";
endcomp;
run;
ods pdf close;
what will the nobreakspace option do? Can anyone help me to understand?
Thank you @Ksharp. Understood now.
April 27 – 30 | Gaylord Texan | Grapevine, Texas
Walk in ready to learn. Walk out ready to deliver. This is the data and AI conference you can't afford to miss.
Register now and lock in 2025 pricing—just $495!
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.