BookmarkSubscribeRSS Feed
Dreamer
Obsidian | Level 7

Hi,

Assume my data set structure is:

MonthZoneEmp. IDProd A SaleProd B Sale
Jan-14East1234100200
Jan-14East123550300
Jan-14East123675150
Feb-14East1234200100
Feb-14East123510050
Feb-14East1236100200

How can we create a report in following template?

Report i-

3 REPLIES 3
Reeza
Super User

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.

Ksharp
Super User

You'd better post it at ODS and Base Reporting . it is an ODS problem.

Dreamer
Obsidian | Level 7

Thanks and l!!

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: Save the Date

 SAS Innovate 2025 is scheduled for May 6-9 in Orlando, FL. Sign up to be first to learn about the agenda and registration!

Save the date!

What is Bayesian Analysis?

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.

SAS Training: Just a Click Away

 Ready to level-up your skills? Choose your own adventure.

Browse our catalog!

Discussion stats
  • 3 replies
  • 925 views
  • 0 likes
  • 3 in conversation