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

sas-innovate-2024.png

Join us for SAS Innovate April 16-19 at the Aria in Las Vegas. Bring the team and save big with our group pricing for a limited time only.

Pre-conference courses and tutorials are filling up fast and are always a sellout. Register today to reserve your seat.

 

Register now!

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.

Click image to register for webinarClick image to register for webinar

Classroom Training Available!

Select SAS Training centers are offering in-person courses. View upcoming courses for:

View all other training opportunities.

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