At 01:16 PM 11/3/2001 -0700, Frank Carrubba wrote:
>I am converting an old RBASE DOS retail application to RBASE
>6.5 ++. I am having problems showing a running otal 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,
You are not doing anything wrong.
When moving an application from DOS to Windows, you may need
to make changes to entry/exit procedures (EEPs) used in your
applications. Many EEPs use techniques designed to be
compatible with the DOS operating system and these techniques
need to be modified for use in Windows.
Many DOS EEPs calculated values and then displayed the value
on the form using the WRITE command. This technique works in
DOS because there is only one screen on which to display data;
everything displays in the same window. In Windows, there are
many windows or screens used for displaying data�the form in
one window and the R> prompt is in another. The WRITE command
displays to the R> prompt window, not to the form window.
Try the following:
01. Locate the variable, for example, vSubTotal on the form
(associated with the region table) where you want the
total to display.
02. Modify your EEP to include the following, for example:
SAVEROW
SELECT (SUM(ColName)) INTO vSubTotal INDIC IvSubTotal +
FROM TableName WHERE ColID = .vColID
RECALC VARIABLES
RETURN
The SAVEROW will save the current row.
The variable vSubTotal is placed on the form (associated
with the region table) where you want the total to display.
The RECALC VARIABLES command displays the current variable
value when you return from the EEP to the form.
There you have it.
Enjoy TGRB2000 (ver 6.5++) for Windows and make sure to have fun.
Very Best Regards,
Razzak.
P.S. Stay tuned for ...
From The Edge: Converting DOS EEPs to Windows and more ...
===================================-============================
R:BASE Developers's Conference: http://www.rbase.com/conference
Official R:BASE List Server: mailto:[EMAIL PROTECTED]
RBTI Events/Training: http://www.rbase2000.com/events
R:DCC Members: http://www.rbase2000.com/rdcc
================================================================
R:BASE, Oterro & R:Tango are registered trademarks of RBTI.
==================================-=============================