Doug,

I think you need to capture them as TEXT first and then convert.

SET VAR vSumF3MilesTXT TEXT = NULL
SET VAR vSumF3MilesINT INTEGER = NULL
GETPROPERTY cidSumF3Miles TEXTVALUE vSumF3MilesTXT
SET VAR vSumF3MilesINT = .vSumF3MilesTXT

Jan
 


-----Original Message-----
From: Doug Hamilton <[email protected]>
To: [email protected] (RBASE-L Mailing List)
Date: Fri, 05 Feb 2010 13:45:53 -0600
Subject: [RBASE-L] - Capturing DBCalc for calculations


Hi List - I have a report with a band that has two DBCalcs, one sums 
miles (inte) and one sums Gallons (real).
I'm trying to GETPROPERTY the values of the DBCalcs to calc MPG.
The values I get are waaaay off (858 million miles and 4.006 E-11 
gallons - good mileage, but not accurate :)

Here's the EEP that is located in the F3 band with the DBCalcs:

--BeforeGenerate EEP; F3 Band; StateMonth report
SET TRACE ON

SET VARIABLE vSumF3Miles INTEGER = 0
SET VARIABLE vSumF3Gals REAL = 0
SET VARIABLE vF3MPG REAL = 0

GETPROPERTY cidSumF3Miles VALUE vSumF3Miles
GETPROPERTY cidSumF3Gals VALUE vSumF3Gals

SET VAR vF3MPG = (.vSumF3Miles/.vSumF3Gals)
PROPERTY cidF3MPG CAPTION .vF3MPG

SET TRACE OFF
RETURN


Any ideas why the GETPROPERTYs are returning the wrong values?
TIA
Doug

Reply via email to