Help using Base SAS procedures

PROC REPORT Group Printing Options

Accepted Solution Solved
Reply
New Contributor
Posts: 2
Accepted Solution

PROC REPORT Group Printing Options

I am very new to SAS and cannot seem to figure out a way around my problem.

PROC REPORT DATA=FILE1 NOWD LS=140;                          

     DEFINE REITFLAG / GROUP WIDTH=8;    

....

    i removed some defines here.

....                   

     COLUMN BANK REITFLAG ACCT ACCTST PROCST PROD ACCTTYP    

     PROCTYP MATDATE EFFDATE COLLCD BAL COFFBAL STATE MLSTATE;

     BREAK AFTER REITFLAG / PAGE SUMMARIZE;                  

     COMPUTE AFTER;                                          

        LINE 'TOTAL BALANCE: '                               

             BAL.SUM DOLLAR14.2;                             

        LINE 'TOTAL CHARGEOFF: '                

             COFFBAL.SUM DOLLAR14.2;            

     ENDCOMP;                                   

     TITLE 'XXXXXXXXXXXX';

     TITLE2 "XXXXXXXXX";   

RUN;

My issue is the REITFLAG won't print on each row of data.  It only prints on the first row and then on the summary row.  How can I force it to print on all rows?

                                                     XXXXXXXXXXXXX

                                                       XXXXXXXXX

BANK  REITFLAG  ACCOUNT NUMBER  ACCTST   PROCST   PROD  ACCTTYP  PROCTYP MATDATE   EFFDATE   COLLCD     BALANCE   COFF BAL  STATE  MLSTATE

001   0001    00000XXXXXXXXX    AC             AAAA   120     01   20231125  19831122    RES      28703.32        0   OH     IN      

001        0000XXXXXXXXXX    AC             AAAA   210     03   20130130  20061209    AUT       7870.42      0   VA     IN    

070        0000XXXXXXXXXX    AC     CF    AAAA   210     03   20031119  19980507    AUT           0  6972.23   OH    IN    

    0001                                                                  36573.74   6972.23

                 

                                                     XXXXXXXXXXXXX

                                                       XXXXXXXXX

                                                                        

BANK  REITFLAG  ACCOUNT NUMBER  ACCTST   PROCST   PROD  ACCTTYP  PROCTYP MATDATE   EFFDATE   COLLCD     BALANCE   COFF BAL  STATE  MLSTATE

001   0002    00000XXXXXXXXX    AC     CF     AAAA   111    00   20151013  20000928   RE3            0   30612.51   OH     IN   

001         00000XXXXXXXXX    AC          AAAA   111     01   20201025  20001004   RE3       6577.23       0   OH     IN

...

...   

Any help to print the REITFLAG on each line would be appreciated.

Brian


Accepted Solutions
Solution
‎08-15-2011 06:28 PM
PROC Star
Posts: 7,467

PROC REPORT Group Printing Options

I think you can get around that behavior using compute blocks.  Take a look at:

http://www.sascommunity.org/wiki/Repeating_Group_variable_values_in_PROC_REPORT

View solution in original post


All Replies
Solution
‎08-15-2011 06:28 PM
PROC Star
Posts: 7,467

PROC REPORT Group Printing Options

I think you can get around that behavior using compute blocks.  Take a look at:

http://www.sascommunity.org/wiki/Repeating_Group_variable_values_in_PROC_REPORT

New Contributor
Posts: 2

PROC REPORT Group Printing Options

I added...

COMPUTE BEFORE REITFLAG;     

   HOLD_REITFLAG = REITFLAG; 

ENDCOMP;                     

COMPUTE REITFLAG;            

   IF _BREAK_ = ' ' THEN     

     REITFLAG = HOLD_REITFLAG;

ENDCOMP;                     


Just after the define of the REITFLAG and it works perfect.  Thanks art297.  I spent 8 hours trying to figure this out and fixed it in 30 minutes after seeing your reply.

Much appreciated.

Super User
Posts: 10,018

PROC REPORT Group Printing Options

What usage for REITFLAG variable. I doubt it is defalut usage(i.e. analysis).

You should change it into display.

define REITFLAG / display .........

Which will give you detail report.

Ksharp

🔒 This topic is solved and locked.

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

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