Cynthia, thanks for the answer) Didn't know about such possibilites in column statement as: hours,dateval hours=hourtot - thought itshould be just listing of variables. And I still can't get used to formats - it's really very pointful. But the thing is not only highlighting actually.... Last 2 rows (and last 2 columns) in my report present 'summary data' - the last one is summary working time for a day (for all employees) and the previous is the number of employees who worked more than one hour that day (I didn't knew how to organize 'conditional count' in proc report - so I did it through SQL, and to avoid effecting this value on summary time I summed time in SQL too....). I know it's not a good way but I've made my report-table before proc report (in SQL) and then I used proc report to color cells, change value-formats or replace NULL-values. So I have fixed number of columns in my data set. This report is going to be weekly, so I had an idea to 'shade' the days since current(report)-day to the end of current month. I guess that is not the 'best' idea but I've planned something like that: %MACRO before_after(n); /* n - №day*/ define <'№day'n> / order missing noprint order=data; define n<№day> / computed <'№day'> missing order=data; compute n<№day> / character; %if &n lt %sysfunc(day(%sysfunc(today()))) %then do; %if agent ne <pre-last row> %then do; %if <'№day'n> <30 %then n<№day>='-'; /*working time <30 seconds --> '-'*/ %else do; n<№day>=strip(put(<'№day'n>,hhmm10.)); CALL DEFINE(_COL_, "style", "STYLE=[BACKGROUND=ALICEBLUE]"); end; end; %else n<№day>= strip(put(<'№day'n>,5.)); /*number of employees worked >1h in №day*/ end; %else do; n<№day>=.; CALL DEFINE(_COL_, "style", "STYLE=[BACKGROUND=grey]"); end; %if agent=<pre-last row> or agent=<last row> %then CALL DEFINE(_COL_, "style", "STYLE=[BACKGROUND=CXE1E8FB]"); /*colouring 2 last - summary rows*/ endcomp; %MEND before_after; %macro mproc; proc report data=WORK.WORKTIME nowd; column agent d1 '1'n ................d31 '31'n sum1 sum2; define agent / group 'agent' missing; %do i=1 %to %sysfunc(day(%sysfunc(INTNX(month,%sysfunc(today()),-1,e)))); /*end of current month*/ %before_after(&i); %end; define sum1 / <.....>; define sum2 / <.....>; run; quit; %mend mproc; %mproc; Maybe it's hard to understand.... But could something like that be organized through proc report? (to delimitate 'past' and 'future' and to get 2 types of summary results - counting and summing - these are extra things, besides highlighting, I need in my report) It'll be great if you manage to understand what I mean....)
... View more