Hi,
Assume my data set structure is:
Month | Zone | Emp. ID | Prod A Sale | Prod B Sale |
Jan-14 | East | 1234 | 100 | 200 |
Jan-14 | East | 1235 | 50 | 300 |
Jan-14 | East | 1236 | 75 | 150 |
Feb-14 | East | 1234 | 200 | 100 |
Feb-14 | East | 1235 | 100 | 50 |
Feb-14 | East | 1236 | 100 | 200 |
How can we create a report in following template?
Report i-
Proc tabulate with BY processing will generate the table formats.
Are you looking to replicate the style - colours, lines as well? If so you may want to look into proc template.
I'd start with getting the numbers in the correct format and then work on the style.
You'd better post it at ODS and Base Reporting . it is an ODS problem.
Following code worked for me:
ods escapechar="'";
options device=ACTXIMG;
ods excel
file="\\<<Output location>>\MEDICAL_CLAIM_DETAIL.xlsx"
options(sheet_interval='none' sheet_name='Sales Report' sheet_label=' ' suppress_bylines='yes'
orientation='landscape' fittopage='yes' embedded_titles='yes' autofit_height='yes' center_horizontal='yes'
embedded_footnotes='yes')
style=minimal ;
title j=left font=Calibri h=3 "Month(#byval1)";
title2 j=left font=Calibri h=3 "Zone : #byval2";
proc report data=claim
style(report)=[borderstyle=solid bordercolor=black BACKGROUND=TRANSPARENT]
style(header)=[background=CX1F497D color=white fontfamily=calibri fontsize=3 textalign=c verticalalign=T borderstyle=solid bordercolor=black]
style(column)=[fontfamily=calibri fontsize=2.8 textalign=c borderstyle=solid bordercolor=black ];
by date_month Zone;
column EmpID,ProdA, ProdB,;
define date_month / order noprint;
define EmpID / display '' style=[bordercolor=white background=white];
define ProdA / analysis 'Product A Sale';
define ProdB / analysis 'Product B Sale';
rbreak after / page summarize;
compute after ;
emp='Total';
endcomp;
run;
SAS Innovate 2025 is scheduled for May 6-9 in Orlando, FL. Sign up to be first to learn about the agenda and registration!
Learn the difference between classical and Bayesian statistical approaches and see a few PROC examples to perform Bayesian analysis in this video.
Find more tutorials on the SAS Users YouTube channel.
Ready to level-up your skills? Choose your own adventure.