Sami,

You gave me some help on using an EEP in 6.5 forms for my Quotes table.
I was out of the office for the last three weeks so I did not update you
until now.  I have done the following:

1) I have three tables connected to this form: QUOTEREP, QUOTES, &
QUOTETOT.
2) I have a form variable named VTRANS in the QUOTES table. (this is the
detail section).
3) Prior to opening the form, I created the variable VTRANSTOTAL.  I do
not have an application for this form (they just open it from the list),
so for now I just used your step 3 below.
4) I placed the var. VTRANSTOTAL in the QUOTETOT table so it is not in a
tiered area.
5) I created the EEP as you suggested in the QUOTES table. This is the
EEP:
SELECT SUM(EXTPRICE) INTO vtranstotal FROM QUOTES WHERE TRANS# = .vTRANS
UPDATE QUOTETOT SET TRANSTOT = .vtranstotal WHERE TRANS# = .vTRANS
RECALC VARIABLES 
RETURN

Here is the problem. The variable VTRANSTOTAL does work at the R prompt
and in the QUOTETOT part of the form but it is not updating the actual
QUOTETOT table. The variable does not update until I actually leave the
QUOTETOT part of the form and go to the next transaction.  Then the
variable shows up as the proper amount.  I put the EEP in the QUOTES
table not the QUOTETOT table.  I am stumped.

Jim
  

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

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