BookmarkSubscribeRSS Feed
anil2
Fluorite | Level 6

PROC REPORT DATA=expo.OPEN_TICKET_SUMMARY_SOURCE1 out=expo.summary_table_result LIST
/*style=[cellwidth=.1 in rules=group frame=void] */
style(header)=[background= #BBDEFB foreground=black]
style(summary)=[background=white foreground=black font_weight=bold];


COLUMN UserName (category,status) Total_count ;
DEFINE UserName / GROUP style=[background=#BBDEFB foreground=black font_weight=bold borderleftwidth=2 borderrightwidth=2] ;
DEFINE CATEGORY / ACROSS style =[borderleftwidth=1 borderrightwidth=1];
DEFINE STATUS / ACROSS style =[borderleftwidth=1 borderrightwidth=1 ];
define total_count / computed style=[font_weight=bold foreground=black ] ;
rbreak after / summarize;
compute total_count;
Total_count=sum(input(_c2_,best32.),
input(_c3_,best32.),
input(_c4_,best32.),
input(_c5_,best32.),
input(_c6_,best32.),
input(_c7_,best32.),
input(_c8_,best32.),
input(_c9_,best32.),
input(_c10_,best32.)
);

IF total_count ^= ''
THEN CALL DEFINE(_COL_, "style", "STYLE=[BACKGROUND=white ]");
endcomp;

RUN;

3 REPLIES 3
RW9
Diamond | Level 26 RW9
Diamond | Level 26

Why not summarise your data in a a datastep before the proce report using a procedure designed for such a task - means/summary - then use a simple proc report to print the data out.  You have full control over the data then.

ballardw
Super User

As I understand proc report you can only modify the order of appearance of variables that are Group, Order or Across, not computed.

 

So to get the desired order I think you'll want to go with @RW9's suggestion of summarizing the data prior to building the report.

anil2
Fluorite | Level 6
Thanks,
@ballardw i have solved above issue by using datafmt option

hackathon24-white-horiz.png

The 2025 SAS Hackathon has begun!

It's finally time to hack! Remember to visit the SAS Hacker's Hub regularly for news and updates.

Latest Updates

How to Concatenate Values

Learn how use the CAT functions in SAS to join values from multiple variables into a single value.

Find more tutorials on the SAS Users YouTube channel.

SAS Training: Just a Click Away

 Ready to level-up your skills? Choose your own adventure.

Browse our catalog!

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