| Date: | Thu, 20 Mar 2003 13:52:10 -0600 |
| Reply-To: | Sterling Price <Sterling.Price@WAL-MART.COM> |
| Sender: | "SAS(r) Discussion" <SAS-L@LISTSERV.UGA.EDU> |
| From: | Sterling Price <Sterling.Price@WAL-MART.COM> |
| Subject: | proc report question |
| Content-Type: | text/plain; charset="iso-8859-1" |
|---|
Greetings, all.
I have a somewhat complex report done in Proc Report that isn't quite
behaving quite as I need. Apologies in advance if my description of the
problem is confusing. I'll try my best to simplify it. Please refer to the
Proc Report code at the bottom of this message.
The intention of the report is to start a new page for each new DISTRICT.
Multiple STOREs can be on any given DISTRICT's page(s). This part is
working fine. I also have a requirement to write a custom break line
summarizing some values for each break of STORE, DISTRICT, REGION, and
DIV_SUBDIV. I used the COMPUTE AFTER statements to accomplish this, and it's
also working as I expect.
The problem I'm having is with the line being printed in the COMPUTE BEFORE
_PAGE_ statement. This line is used by our report managment software to
index sections of a report. So, when someone views the report online, they
can press a "go to" button and see a list of the distinct sections, select
one, and go to it instantly. The problem occurs when a new page prints for a
REGION or DIV_SUBDIV custom summary line. The lines normally created from
the COMPUTE BEFORE _PAGE_ section are missing.
The missing lines cause the report management software to read part of a
column header as a section and messes everything up. What I'd like to do in
this situation is to print 3 blank lines instead of the normal three lines
that print in the COMPUTE BEFORE PAGE STATEMENT. If there isn't a way to do
that, I'd like to just print the values for COMPANY_AREA, DIV_SUBDIV,
REGION, and DISTRICT that appeared on the previous page, but still keep the
REGION and DIV_SUBDIV custom summary lines on their own pages. If that
isn't possible, as a last resort I would want to print the custom summary
lines for REGION and DIV_SUBDIV on the same page with which they are
associated (i.e. don't start a new page for them, just print the summary
line where they occur).
Can anyone suggest a way to do this? Is my explanation of the problem even
making sense?
Thanks,
A frustrated Sterling Price
PROC REPORT DATA = &DATA NOWD LS=220 PS=88 SPLIT = "*"
CENTER HEADSKIP HEADLINE;
&WHERE_STRING;
TITLE2 'A V O I D A B L E L O S S D E C I S I O N S';
TITLE3 '*** FOR THE PERIOD 01/01/2003 THRU 01/31/2003 ***';
COLUMNS COMPANY_AREA XDIV_SUBDIV DIV_SUBDIV XREGION
REGION XDISTRICT DISTRICT XSTORE STORE
XOPER_DIVISION OPER_DIVISION
("CLAIMANT*INFORMATION"("__"(" "(SSN NAME))))
("SEPARATION*INFORMATION"("__"(" "(SEP_LAST_DAY_WORKED SEP_REASON))))
(" "("CLAIM*INFORMATION"("__"(" "(STATE CLAIM_RECD_DATE OUTCOME
DECISION_REASON))))
("MONETARY*INFORMATION"("__"(AMOUNT))) L_AMT C_AMT P_AMT
LOCATION_NAME);
DEFINE COMPANY_AREA / DISPLAY NOPRINT;
DEFINE DIV_SUBDIV / GROUP NOPRINT;
DEFINE XDIV_SUBDIV / DISPLAY WIDTH = 3 "DIV";
DEFINE REGION / GROUP NOPRINT;
DEFINE XREGION / DISPLAY WIDTH = 8 "REGION";
DEFINE DISTRICT / GROUP NOPRINT;
DEFINE XDISTRICT / DISPLAY WIDTH = 8 "DISTRICT";
DEFINE XSTORE / DISPLAY WIDTH =5 "STORE";
DEFINE STORE / GROUP NOPRINT;
DEFINE XOPER_DIVISION / DISPLAY WIDTH = 9 "OPERATING*DIVISION";
DEFINE OPER_DIVISION / GROUP NOPRINT;
DEFINE SSN / GROUP WIDTH=11 LEFT "SOCIAL*SECURITY" FORMAT=SSNUM.;
DEFINE NAME / DISPLAY WIDTH = 20 LEFT "NAME";
DEFINE SEP_LAST_DAY_WORKED / DISPLAY WIDTH = 10
"SEP*DATE" FORMAT=MMDDYY8.;
DEFINE SEP_REASON / DISPLAY WIDTH = 25
"EXPLANATION";
DEFINE STATE / DISPLAY WIDTH=5 "CLAIM*STATE";
DEFINE CLAIM_RECD_DATE / DISPLAY WIDTH=10 FORMAT=MMDDYY8.
"DATE*RECEIVED";
DEFINE OUTCOME / DISPLAY WIDTH=11
"OUTCOME";
DEFINE DECISION_REASON / DISPLAY WIDTH=40
"CLAIM/HEARING*DECISION";
DEFINE AMOUNT / DISPLAY WIDTH=25
"L= LIABILITY*C= CUMULATIVE CHARGES*P= PERIOD CHARGES";
DEFINE L_AMT / ANALYSIS NOPRINT;
DEFINE C_AMT / ANALYSIS NOPRINT;
DEFINE P_AMT / ANALYSIS NOPRINT;
DEFINE LOCATION_NAME / DISPLAY NOPRINT;
BREAK AFTER DISTRICT / PAGE;
BREAK AFTER REGION / PAGE;
BREAK AFTER DIV_SUBDIV / PAGE;
COMPUTE BEFORE _PAGE_;
LINE @089 COMPANY_AREA $50.;
LINE @099 'Div ' DIV_SUBDIV $2.
' Reg ' REGION Z3.
' Dist ' DISTRICT Z4.;
LINE ' ';
ENDCOMP;
COMPUTE AFTER STORE;
LINE ' ';
LINE @029 'STORE' STORE 5.
' TOTAL: LIABILITY:' L_AMT.SUM DOLLAR13.2
' '
'CUMULATIVE CHARGES:' C_AMT.SUM DOLLAR13.2
' '
'PERIOD CHARGES:' P_AMT.SUM DOLLAR13.2;
LINE ' ';
ENDCOMP;
COMPUTE AFTER DISTRICT;
LINE ' ';
LINE @019 'DISTRICT' DISTRICT 5.
' TOTAL: LIABILITY:' L_AMT.SUM DOLLAR13.2
' '
'CUMULATIVE CHARGES:' C_AMT.SUM DOLLAR13.2
' '
'PERIOD CHARGES:' P_AMT.SUM DOLLAR13.2;
LINE ' ';
ENDCOMP;
COMPUTE AFTER REGION;
LINE ' ';
LINE @011 'REGION' REGION 4.
' TOTAL: LIABILITY:' L_AMT.SUM DOLLAR13.2
' '
'CUMULATIVE CHARGES:' C_AMT.SUM DOLLAR13.2
' '
'PERIOD CHARGES:' P_AMT.SUM DOLLAR13.2;
LINE ' ';
ENDCOMP;
COMPUTE AFTER DIV_SUBDIV;
LINE ' ';
LINE @003 'DIVISION ' DIV_SUBDIV $2.
' TOTAL: LIABILITY:' L_AMT.SUM DOLLAR13.2
' '
'CUMULATIVE CHARGES:' C_AMT.SUM DOLLAR13.2
' '
'PERIOD CHARGES:' P_AMT.SUM DOLLAR13.2;
LINE ' ';
ENDCOMP;
RUN;
**********************************************************************
This email and any files transmitted with it are confidential
and intended solely for the individual or entity to
whom they are addressed. If you have received this email
in error destroy it immediately.
**********************************************************************
Wal-Mart Stores, Inc. Confidential
**********************************************************************
|