Hi, Sorry if i was not clear enough .Actually i am able to make some headway in the problem but not able to get the final o/p.basically not able to get the spanning headers correctly. i have used this programme proc report data=WORK.TEST nowindows missing headline headskip; column SOC_NAME PT_NAME sp_i_s, SUM=sp_i_s_SUM sp_c_s , SUM=sp_c_s_SUM sp_i_ns, SUM=sp_i_ns_SUM sp_c_ns, SUM=sp_c_ns_SUM sp_c_all, SUM=sp_c_all_SUM ni_i_s, SUM=ni_i_s_SUM ni_c_s, SUM=ni_c_s_SUM; define SOC_NAME / group 'SOC' missing; compute SOC_NAME; if SOC_NAME ne ' ' then hold1=SOC_NAME; if SOC_NAME eq ' ' and _break_ eq ' ' then SOC_NAME=''; if PT_NAME ne ' ' then SOC_NAME=''; if upcase(_break_)="SOC_NAME" then do; call define("SOC_NAME", 'style', 'style=[pretext=""]'); end; if _break_='_RBREAK_' then do; call define("SOC_NAME", 'style', 'style=[pretext="Grand Total"]'); end; endcomp; define PT_NAME / group 'PT_NAME' missing; compute PT_NAME; if _break_ eq ' ' then do; if PT_NAME ne ' ' then hold2=PT_NAME; if PT_NAME ne ' ' then SOC_NAME=''; end; endcomp; define sp_i_s / analysis SUM 'Serious' format=BEST12. missing; define sp_i_s_SUM / 'Interval' format=BEST12. center; define sp_c_s / analysis SUM 'Serious' format=BEST12. missing; define sp_c_s_SUM / 'Cumulative' format=BEST12. center; define sp_i_ns / analysis SUM 'sp_i_ns' format=BEST12. missing; define sp_i_ns_SUM / 'Interval' format=BEST12.; define sp_c_ns / analysis SUM 'sp_c_ns' format=BEST12. missing; define sp_c_ns_SUM / 'Cumulative' format=BEST12. center; define sp_c_all / analysis SUM 'sp_c_all' format=BEST12. missing; define sp_c_all_SUM / 'Cumulative all' format=BEST12. center; define ni_i_s / analysis SUM 'ni_i_s' format=BEST12. missing; define ni_i_s_SUM / 'Interval' format=BEST12. center; define ni_c_s / analysis SUM 'ni_c_s' format=BEST12. missing; define ni_c_s_SUM / 'Cumulative' format=BEST12. center; break before SOC_NAME / summarize; rbreak after / summarize; run;
... View more