Jim,
Another to thing to look out for is re-typing a variable.
You could get away with it in the old days but I think it's not a good think
anymore.
Try in your before generate eep;
CLEAR VAR vSDaysTXT, vSDaysINT, vDOrdersTXT, vDOrdersINT
SET VAR vSDaysTXT TEXT = NULL
SET VAR vSDaysINT INTEGER = 0
SET VAR vDOrdersTXT TEXT = NULL
SET VAR vDOrdersINT INTEGER = 0
SET VAR vAvgShipd DOUBLE = 0
GETPROPERTY Comp_CountC VALUE vDOrdersTXT
GETPROPERTY Comp_SumSdays VALUE vSDaysTXT
SET VAR vSDaysINT = .vSDaysTXT
SET VAR vDOrdersINT = .vSDaysTXT
SET VAR vAvgShipD = (.vSDaysINT/.vDOrdersINT)
SET VAR vCaption = +
('PROPERTY Comp_Avgd CAPTION '+(CTXT(.vAvgShipD)))
&vCaption
RETURN
Jan
-----Original Message-----
From: [email protected]
To: [email protected] (RBASE-L Mailing List)
Date: Wed, 5 May 2010 11:09:22 EDT
Subject: [RBASE-L] - Re: Using SUM OF in two page report
Jim: It's a pretty powerful tool once you get the procedures down! First,
is your control with the compid of Comp_AvgD a regular label control? Make
sure it's not a variable or db label. If it's okay, then I suggest you
trace thru
code and carefully watch your variables to see if they are evaluating okay.
Karen
I found the problem. Once again something simple.
I also want to try to use the compID of the dbcalc in a breakfooter to
calculate an average in that same footer.
Below is the code I am using trying to follow what you had sent earlier
regarding a report footer dbcalc.
I put this in the Before Generate EEP of the break footer.
SET VAR vSDays TEXT
SET VAR vDorders TEXT
GETPROPERTY Comp_CountC VALUE vDOrders
GETPROPERTY Comp_SumSdays VALUE vSDays
SET VAR vDOrders INTEGER
SET VAR vSDays INTEGER
SET VAR vAvgShipd = (.vSDays/.vDOrders)
PROPERTY Comp_AvgD CAPTION .vAvgShipd
RETURN
I am only getting an 0 for the var SvgShipd