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-2024.png

Don't miss out on SAS Innovate - Register now for the FREE Livestream!

Can't make it to Vegas? No problem! Watch our general sessions LIVE or on-demand starting April 17th. Hear from SAS execs, best-selling author Adam Grant, Hot Ones host Sean Evans, top tech journalist Kara Swisher, AI expert Cassie Kozyrkov, and the mind-blowing dance crew iLuminate! Plus, get access to over 20 breakout sessions.

 

Register now!

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.

Click image to register for webinarClick image to register for webinar

Classroom Training Available!

Select SAS Training centers are offering in-person courses. View upcoming courses for:

View all other training opportunities.

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