Frank,
I don't think you need the eep.
Set a variable in the form to calculate your subtotal.
I tested a currency column called Amount.
Select Variable, Edit.
Then enter vSubtotal= Currency to establish a currency variable.
(It will not show up as a variable). Then
vSubtotal = (.vSubtotal + Amount)
You need to initialize vSubtotal = 0 or set Zero on in order for the
variable to show on the form. When you open the form it will
show $0.00.
Locate the variable outside your tiered rows.
Each time you leave a row, the subtotal should update and show correctly.
Actually my subtotal doubled the amount entered. So in order to
show correctly the formula was vSubtotal = (.vSubtotal + Amount /2)
Which seems totally unexplicable. But I am using RBWin 6.5+ ...
Could someone proffer a clue on why the entered amount might double?
Randy Peterson
Victor Leach wrote:
> Frank
> You are certainly going about it the right way with a variable at the
> bottom of the tiered region and a eep which returns tghe result back to the
> form. The eep I have on the exit of
> each row and the eep returns the total at the bottom of the page outside the
> tiered region.
>
> Regards
>
> Victor
>
> > -----Original Message-----
> > From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]On
> > Behalf Of Frank Carrubba
> > Sent: Sunday, 4 November 2001 6:16 AM
> > To: [EMAIL PROTECTED]
> > Subject: Form running total
> >
> >
> > I am converting an old RBASE DOS retail application to RBASE 6.5 ++. I
> > am having problems showing a running total on the form. Can anyone help?
> >
> > I am using the current windows version of RBASE++.
> >
> > I have a form that has a region with multiple tiers. As the user enters
> > the data into the tiers at the completion of each row I want to show a
> > subtotal field.
> >
> > I have tried to place a variable on the form then in an eep calculate the
> > vale, recalc variables and screen restore off. I could not get
> > this to work.
> >
> > I then tried executing the following eep from the last variable
> > in the tier:
> >
> > set var v_1 =3D test
> > set var v_subtotal1 =3D $5.00
> > set var v_2 =3D test
> > recalc variables
> > wri .v_subtotal1 at 25,70
> > screen restore off
> > return
> >
> > Nothing displays. What am I doing wrong?
> >
> > Frank
> >
> >
> >
> >
> >
> >
> >
> >
> >
> >
> >
> >
> >