Help using Base SAS procedures

Report in a pre-difined template!!

Reply
Frequent Contributor
Posts: 89

Report in a pre-difined template!!

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-

Super User
Posts: 17,959

Re: Report in a pre-difined template!!

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.

Super User
Posts: 9,691

Re: Report in a pre-difined template!!

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

Frequent Contributor
Posts: 89

Re: Report in a pre-difined template!!

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;

Ask a Question
Discussion stats
  • 3 replies
  • 184 views
  • 0 likes
  • 3 in conversation