Jim -

The first thing that you have to understand about EEPs is that they can ONLY
work with variables and not with actual columns in your form.  So you have
to create either form variables or global variables for any fields you will
be referencing in the form.

These steps are for version 6.5++ for Windows:

Step 1: 
So Create a form variable for the current TRANS#:
vTRANS# = TRANS#

Step 2:
For the Variable that will display the total on the form, create a global
variable in your command file just before opening the form:

SET VAR vInvoiceTotal CURRENCY = 0
EDIT USING formname WHERE whereclause

Step 3:
While you're testing and revising your form in design mode, you also need to
have this global variable in memory so at the R> Prompt type:
SET VAR vInvoiceTotal CURRENCY = 0

Step 4:
Place the global variable, vInvoiceTotal, on the form where you want to
display the total:  NOTE this CANNOT be placed within the scrolling region
that holds the detail lines so place it above or below the scrolling region

Step 5:
We'll place this EEP so that it evaluates and updates the form as soon as
the user saves the current row.  IN the Form designer, click on the Layout
menu, then Table Settings.  In the After Saving Row field, type in the EEP
name, TotalPrice.eep,  and click the Edit button to the right.

Step 6:
The blank file will open and you'll type:

SELECT SUM(EXTPRICE) INTO vInvoiceTotal FROM QUOTES WHERE TRANS# = .vTRANS#
UPDATE QUOTETOT SET TRANSTOT = .vInvoiceTotal WHERE TRANS# = .vTRANS#
RECALC VARIABLES
RETURN

I think that's all there is to it....

If this doesn't cut it, feel free to post again and we'll take it from
there!

Sami

____________________________
Sami Aaron
Software Management Specialists
913-915-1971
[EMAIL PROTECTED]




-----Original Message-----
From: [email protected] [mailto:[EMAIL PROTECTED] On Behalf Of Jim Belisle
Sent: Friday, January 25, 2008 12:27 PM
To: RBASE-L Mailing List
Subject: [RBASE-L] - using EEP's in 6.5 forms


I have tried to make the EEP's work in my forms for years but have not
been able to do so.  I have looked at the examples in 6.5 and 7.5 but
cannot seem to transfer the examples into my forms.  If anyone out there
could patiently look at the below information and show me exactly how to
make my form work, I would appreciate it.

The detail table name is QUOTES and the extended total per line is the
variable is VEXTPRICE. This variable is loaded into the column EXTPRICE.
The common column for each transaction is TRANS#.  The name of the table
for my totals is called QUOTETOT and the column to be updated with the
totals is called TRANSTOT.
 
I know this is simple for you folks that are programmers but it has
alluded me for years.  This simple little procedure is keeping me from
going forward in helping my fellow workers do their job more
efficiently.

Jim

Can you tell this is a PLEA?


Reply via email to