Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

wrong sum using variable

Status
Not open for further replies.

atarrqis

IS-IT--Management
Nov 26, 2004
155
US
Oracle and CR11.5
I have Group 2=Tran_ID & Group 1=Part. I take the maximum quantity by Trans_ID in GF2. I want to sum these by Part.
I have 3 formulas:
SumPart in GF2
WhilePrintingRecords;
numbervar MP := MP + Maximum ({PROJ \\.QUANTITY}, {PROJ \\.TRANS_ID});

DisplayPart in GF1
WhilePrintingRecords;
numbervar MP;

ResetPart in GH1
whileprintingrecords;
numbervar MP;
if not inrepeatedgroupheader then
MP := 0;

MP in GF1 acts as if it adds the last line twice so the sum is incorrect. I must have something in the wrong place but can’t see it.
 
I think I figured our my problem. I was not reseting properly. Thanks anyway.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top