Hi i would like to generate report header like below
where i want analysis visit and summary statistic in second column which are which are column header for first two columns
Please post your source data for this report in usable form (as a data step with datalines, do not skip this!).
proc report data=final nowd headskip headline split='*'
style = {outputwidth=100% } spacing=1 wrap;
by order param;
column avisitn avisit newvar _1 _2 _3 _4;
define avisitn/ noprint;
define avisit/ group order=data 'Analysis * Visit' center;
define newvar/ display 'Summary * Statistics' center;
define _1/display "Placebo * (N=&n1)" center;
define _2/display "Tanezumab 5 * mg * (N=&n2)" center;
define _3/display "Tanezumab 10 * mg * (N=&n3)" center;
define _4/display "Naproxen 500 * mg BID * (N=&n4)" center;
compute after avisit;
line '';
endcomp;
run;
cant upload whole data as it is big dataset with more than 22000 obs
We just need a few lines of data step code so we get a clear picture of your dataset structure (variable types, lengths, formats), some representative values, and how the report from this should look.
Not a direct answer to your question, but you might want to try the %TABLEN macro, which produces reports like yours.
it looks like you would need to use split character. also the header N were most likely created with macro variables.
Registration is now open for SAS Innovate 2025 , our biggest and most exciting global event of the year! Join us in Orlando, FL, May 6-9.
Sign up by Dec. 31 to get the 2024 rate of just $495.
Register now!
SAS' Charu Shankar shares her PROC SQL expertise by showing you how to master the WHERE clause using real winter weather data.
Find more tutorials on the SAS Users YouTube channel.