Calculations in Forms [message #80079] |
Fri, 09 August 2002 09:06 |
Eddie
Messages: 23 Registered: January 2001
|
Junior Member |
|
|
I'm having trouble doing calculations within forms. I'm trying to multiply a qty item with a price item (both in different data blocks) I also have a view with the same price and qty items in the same datablock. I want to have the product displayed along with other database records on the Form.
I've tried enabling the formular calculation mode in the property palette and entered the following formular-> :WHSSTDR.WHSSTDR_QTY * :WHSDRUG.WHSDRUG_COST
where WHSSTDR & WHSDRUG are the datablocks/underlying tables. Nothing shows up as the result/product, on the form.
I've also tried using the formular below in the view datablock:
:WHSDGVW.WHSSTDR_QTY * :WHSDGVW.WHSDRUG_COST with similar results.
I've also tried using a block-level post query trigger with the following code:
:GLOBAL.COST:= NULL;
:GLOBAL.COST:= :WHSDRVW.WHSSTDR_QTY * :WHSDRVW.WHSDRUG_COST;
and tried inserting the :GLOBAL.COST variable into the copy from value item in the property palette to no avail.
The field in which I am trying to display the product is a non-database text item. Please help.
Any help will be greatly appreciated.
Sincerely,
Eddie.
|
|
|
|