BookmarkSubscribeRSS Feed
Kirito1
Quartz | Level 8
PROC REPORT DATA=FINAL_RESULT nowd spanrows
style(report)=[JUST=CENTER OUTPUTWIDTH=95% CELLSPACING=2 BORDERCOLOR=BLACK BORDERWIDTH=2]
STYLE(HEADER)={BORDERCOLOR=BLACK FOREGROUND=WHITE BACKGROUND=MAROON FONT=("zurich BT",11pt)}
STYLE(COLUMN)={TAGATTR="WRAP" JUST=CENTER FONT=("zurich BT",08pt) OUTPUTWIDTH=0.05IN BACKGROUND=LIGHTYELLOW
FOREGROUND=BLACK BORDERCOLOR=BLACK};
TITLE FONT="Zurich BT" bold height=6 "<U>Date wise :</U>" JUSTIFY=LEFT;

 

column Emp_Code DATE_OF_APPROVAL N TOTAL_COUNT;

 

define Emp_Code/DISPLAY "Employee Code" width=20  group order order=data style(column)=[font=("zurich BT",11pt)];
define DATE_OF_APPROVAL/DISPLAY "DOA" width=10 style(column)=[font=("zurich BT",11pt)];
define N/ANALYSIS "Count datewise" format=comma11. style(column)=[TAGATTR="WRAP" JUST=RIGHT font=("zurich BT",11pt)];
define TOTAL_COUNT/ANALYSIS "Total Qr Deployed" format=comma11. style(column)=[TAGATTR="WRAP" JUST=RIGHT font=("zurich BT",11pt)];


rbreak after /summarize ol skip;
compute after;
       if _BREAK_ eq '_RBREAK_' then do; 
        RESPYM = 'Total';
        CALL DEFINE(_ROW_ ,"style","style=[BACKGROUND=MAROON FOREGROUND=WHITE]");
    end;
endcomp;
run;

I was using the above code to get the desired result but it didn't work the way I wanted it to be.

Kirito1_0-1673504783366.png

The output I want is something like this:

Kirito1_1-1673504970953.png

So How can I get those dates up there as  columns in proc report? Can someone help......

Thanks in advance to all the contributors.

 

 

1 REPLY 1
Kurt_Bremser
Super User

You need to define the date as an ACROSS variable and combine it with the variable which should appear under it:

column emp_code n,date_of_approval;
define emp_code / group;
define n / analysis;
define date_of_approval / across;
run;

This is, of course, untested and just a suggestion. For detailed help, provide example data in a working data step with datalines.