Build reports by using ODS to create HTML, PDF, RTF, Excel, text reports and more!

Proc report

Accepted Solution Solved
Reply
Regular Contributor
Posts: 166
Accepted Solution

Proc report

[ Edited ]

I want to place the word sum in the last row 

 

this is my code 

proc report data=all1;
column (" " x);
column ("GIPRC" TOTAL_PACs_GI total_cases_GI Open_GI ESCGI pending_review_GI completed_Review_GI );
DEFINE X/ "Protocol";
define TOTAL_PACs_GI/ sum "Total PACs" ;
define total_cases_GI/ sum "Total Cases in Package Prep/QC/Translation";
define Open_GI/ sum "Open WCC Queries";
define ESCGI/ sum "Escalated queries (Pfizer)";
define pending_review_GI/ sum"Pending Review";
define completed_Review_GI/sum "Completed Review";

RBREAK AFTER / SUMMARIZE;
RUN;

 

this is my current result 

 

 GIPRC
ProtocolTotal PACsTotal Cases in Package PrepOpen WCC QueriesEscalated queries (Pfizer)Pending ReviewCompleted Review
QC
Translation
1009      
1019      
1021      
102453    53
1025      
1030      
1032      
1035      
1039      
10401    1
1041      
1043      
1044      
1045      
 14821  146

 

 this is my desired result 

 GIPRC
ProtocolTotal PACsTotal Cases in Package PrepOpen WCC QueriesEscalated queries (Pfizer)Pending ReviewCompleted Review
QC
Translation
1009      
1019      
1021      
102453    53
1025      
1030      
1032      
1035      
1039      
10401    1
1041      
1043      
1044      
1045      
 sum14821  146

Accepted Solutions
Solution
‎04-27-2018 10:00 AM
Super User
Posts: 10,860

Re: Proc report

[ Edited ]
compute after;
 x='sum' ;
endcomp;

View solution in original post


All Replies
Respected Advisor
Posts: 3,294

Re: Proc report

Since you don't have a BREAK or RBREAK statement in your code, I assume that the last row is already in data set ALL1. Is that  correct?

 

If so, you would need to either

  1. If X is numeric, apply a format to the value of X in the last row so that the word SUM appears there; or
  2. If X is character, just change the value of X to 'Sum'
--
Paige Miller
Regular Contributor
Posts: 166

Re: Proc report

Posted in reply to PaigeMiller

oh sorry I just updated my code 

Solution
‎04-27-2018 10:00 AM
Super User
Posts: 10,860

Re: Proc report

[ Edited ]
compute after;
 x='sum' ;
endcomp;
☑ This topic is solved.

Need further help from the community? Please ask a new question.

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