PDA

View Full Version : RE: VDF or back to BASIC



Dennis Piccioni
9-Feb-2005, 09:45 AM
Hi Alan,

I noticed a syntactical error that could cause this problem: you are
using Field_Current_Value and Field_Changed_Value, but the keyword
File_Field. You should use the Field keyword with these messages and the
File_Field keyword with their File_Field_xxx equivalents
(File_Field_Current_Value and File_Field_Changed_Value).

Regards,
Dennis


-----Original Message-----
From: Alan Dowley [mailto:alan@ashfieldsoftware.com]
Posted At: Wednesday, February 09, 2005 12:16 AM
Posted To: visual-dataflex
Conversation: VDF or back to BASIC
Subject: VDF or back to BASIC


Is there a code that will unravel simple problems with VDF that should
work
but don't?

Windows XP sp2
VDF 10.1

Could some please tell me why the following will not work....
----------------------------------------------------------------------
View . (Main DD is Payroll)

Header - saves ok... so far ..so good

dbGrid. (Main DD is Payroll) (Index 1)

dbForm Gross_Pay dbForm Deductions dbForm Net_Pay
----------------------------------------------------------------------
The dbGrid displays records from Jobs_DD - Empl_DD
each line item lists: Job_No - Service_Name - Total_Time - Empl_Pay -
Total_Pay (Payroll.Total_Pay)

Selecting the job enters the information ok. Empl_Pay is entered
depending
on Empl selected in the header.... works great

Now the crunch bit....

The following code SHOULD take the value of Empl_Pay * Total_Time and
enter
the sum into Total_Pay

Procedure Adjust_Display_Total
Number nQty
Number nAmnt
Number nTpay
Get Field_Current_Value File_Field Jobs.Total_time To nQty
Get Field_Current_Value File_Field Empl.Pay_rate To nAmnt
Move (nAmnt*nQty)To nTpay
Set Field_Changed_Value File_Field Payroll.Total_pay To nTpay
End_Procedure // Adjust_Display_Total

it doesn't....

If I set the field Total_Pay to display only in the Payroll_DD the
calculation does not work and still shows 0.00 (and nothing is entered
into
the Gross_Pay field)

If I remove the display only, the calculation does not work and the
Total_pay remains at 0.00, BUT the Gross_Pay shows 5.00 instead of the
expected 16.00 - 2 x 8 = 16 (nAmnt*nQty)

I have tried setting this code to run on Entry and Exit of
Empl_Pay/Total_Time and Payroll.Total_Pay but to no avail.

DDO Structure for the view:

Client_DD
Empl_DD
Services_DD
Payroll_DD (Main DDO)
Empl_DD (Server)
Jobs_DD
Empl_DD (Server)
Client_DD (Server)
Services_DD (Server)

I can't understand why the calculations will not work in the dbGrid when
I
have calculations working in the final 3 dbForms

I have tried so many different ways of trying to get this working I'm
fast
running out of ideas.... any help please!!!

Alan Dowley
16-Feb-2005, 09:18 AM
Thanks Denis and everyone else for your advice. I managed to sort it at last
and with the help of Peter Donovan I will be sticking to VDF

--


---------------------------------------------------------------------
"Are you still wasting your time with spam?...
There is a solution!"

Protected by GIANT Company's Spam Inspector
The most powerful anti-spam software available.
http://mail.spaminspector.com


"Dennis Piccioni" <dennis-p@dataaccess.com> wrote in message
news:58%23$BYrDFHA.4040@dacmail.dataaccess.com...
Hi Alan,

I noticed a syntactical error that could cause this problem: you are
using Field_Current_Value and Field_Changed_Value, but the keyword
File_Field. You should use the Field keyword with these messages and the
File_Field keyword with their File_Field_xxx equivalents
(File_Field_Current_Value and File_Field_Changed_Value).

Regards,
Dennis


-----Original Message-----
From: Alan Dowley [mailto:alan@ashfieldsoftware.com]
Posted At: Wednesday, February 09, 2005 12:16 AM
Posted To: visual-dataflex
Conversation: VDF or back to BASIC
Subject: VDF or back to BASIC


Is there a code that will unravel simple problems with VDF that should
work
but don't?

Windows XP sp2
VDF 10.1

Could some please tell me why the following will not work....
----------------------------------------------------------------------
View . (Main DD is Payroll)

Header - saves ok... so far ..so good

dbGrid. (Main DD is Payroll) (Index 1)

dbForm Gross_Pay dbForm Deductions dbForm Net_Pay
----------------------------------------------------------------------
The dbGrid displays records from Jobs_DD - Empl_DD
each line item lists: Job_No - Service_Name - Total_Time - Empl_Pay -
Total_Pay (Payroll.Total_Pay)

Selecting the job enters the information ok. Empl_Pay is entered
depending
on Empl selected in the header.... works great

Now the crunch bit....

The following code SHOULD take the value of Empl_Pay * Total_Time and
enter
the sum into Total_Pay

Procedure Adjust_Display_Total
Number nQty
Number nAmnt
Number nTpay
Get Field_Current_Value File_Field Jobs.Total_time To nQty
Get Field_Current_Value File_Field Empl.Pay_rate To nAmnt
Move (nAmnt*nQty)To nTpay
Set Field_Changed_Value File_Field Payroll.Total_pay To nTpay
End_Procedure // Adjust_Display_Total

it doesn't....

If I set the field Total_Pay to display only in the Payroll_DD the
calculation does not work and still shows 0.00 (and nothing is entered
into
the Gross_Pay field)

If I remove the display only, the calculation does not work and the
Total_pay remains at 0.00, BUT the Gross_Pay shows 5.00 instead of the
expected 16.00 - 2 x 8 = 16 (nAmnt*nQty)

I have tried setting this code to run on Entry and Exit of
Empl_Pay/Total_Time and Payroll.Total_Pay but to no avail.

DDO Structure for the view:

Client_DD
Empl_DD
Services_DD
Payroll_DD (Main DDO)
Empl_DD (Server)
Jobs_DD
Empl_DD (Server)
Client_DD (Server)
Services_DD (Server)

I can't understand why the calculations will not work in the dbGrid when
I
have calculations working in the final 3 dbForms

I have tried so many different ways of trying to get this working I'm
fast
running out of ideas.... any help please!!!

Peter Donovan
17-Feb-2005, 10:18 PM
:-)
Good to hear.

Alan Dowley
18-Feb-2005, 04:55 AM
Peter, Many thanks for your valued help. I just need to sort out the time
issue and then try the deployment..

I'm still struggling to understand just what should happen first and what
setting should be in place for the program to work but I have been trying
for a year to get the payroll view to work so a little more work on
deployment will not hurt.

--


---------------------------------------------------------------------
"Are you still wasting your time with spam?...
There is a solution!"

Protected by GIANT Company's Spam Inspector
The most powerful anti-spam software available.
http://mail.spaminspector.com


"Peter Donovan" <sonatasoftwareus@yahoo.com> wrote in message
news:YwA2inWFFHA.1912@dacmail.dataaccess.com...
> :-)
> Good to hear.
>