The SAS Output Delivery System and reporting techniques

Style Precedence on row with Proc tabulate

Reply
Senior User
Posts: 1

Style Precedence on row with Proc tabulate

I am trying to create Excel reports with ODS tagsests and Proc Tabulate.

 

The following is my sas code for proc tabulate .

 

ods tagsets.excelxp style=minimal file="/groupspace/egvcar/rashmi/llbean/saspgms/cdi_llb_monthly_dashboard/inactive.xls";
options missing=' ' nocenter ;

/************************ Inactive Cards ********************/

ods tagsets.excelxp options(sheet_name='Inactive Cards' frozen_rowheaders="1" embedded_titles='yes'
                            embedded_footnotes='yes' autofit_height='yes'
 merge_titles_footnotes='Yes');

options missing=' ' nocenter;

title bold height=11pt "Inactive Cards Report ";
footnote1  "Note: ";
footnote2 "This Report is based on Calendar Year";
proc format;
  value actgrp_i
   0='Never Active         '
   1='Last Active 0-1 Mos  '
   3='Last Active 2-3 Mos  '
   6='Last Active 4-6 Mos  '
  12='Last Active 7-12 Mos '
  18='Last Active 13-18 Mos'
  23='Last Active 19-23 Mos'
  24='Last Active 24+ Mos  '
  99='Total                '
  ;
value  watchit
99='#ebf1de'
;
run;


proc tabulate data=llbdash.inactiveall  ;
class type active_grp tr_month calendar_label;
classlev calendar_label tr_month  / style=[font_weight=bold foreground=white background=#0c5641];
classlev active_grp /style=[background=watchit. cellwidth=100];
var otb open_accounts avg_otb/style=<parent>;
table type=' '*
active_grp=' '*
( OTB*f=dollar20.
OPEN_ACCOUNTS*f=comma12.
AVG_OTB*f=dollar20.
)*sum=' '*[style=<parent>],
calendar_label=' '*
tr_month=' '/  row=float Box=[style=[
font_weight=bold foreground=white background=#0c5641 ]] box=' ';
run;


ods tagsets.excelxp close;

 

The above code gives the following output

 

Capture.JPG

 

How do I display the row values corresponding to Total in the same color?

I used Style_precedence=row options as well which doesn't seem to work for me?

Any suggestions?

SAS Super FREQ
Posts: 9,424

Re: Style Precedence on row with Proc tabulate

Posted in reply to rashmirashid
Hi:
I see that you're using STYLE=PARENT, but without data to use, in order to run your code, anyone who might be interested has to make some fake data that may or may not be in the structure that is the same as your structure.

If you can't share your data, then help us to help you by making some fake data or using SASHELP data to mock up an example.

Cynthia
Ask a Question
Discussion stats
  • 1 reply
  • 120 views
  • 0 likes
  • 2 in conversation