Solved

Calculated Fields - How to

Posted on 1998-10-27
2
181 Views
Last Modified: 2010-04-06
Simple question. How do I define and access a calculated field in a table.

I have two field values i want to multiply, with the total going in the calculated field.

Thanks.
0
Comment
Question by:DougBennett
2 Comments
 
LVL 8

Expert Comment

by:ZifNab
ID: 1344647
0
 

Accepted Solution

by:
binho earned 10 total points
ID: 1344648
Define a third field in your TTable component (using Fields Editor), and set it to "Calculated". In the TTable.OnCalcFields event, write your multiplication procedure, such as:

Field3 := Field1 * Field2;

Note: TTable.AutoCalcFields property must be set to true (default).

0

Featured Post

Why You Should Analyze Threat Actor TTPs

After years of analyzing threat actor behavior, it’s become clear that at any given time there are specific tactics, techniques, and procedures (TTPs) that are particularly prevalent. By analyzing and understanding these TTPs, you can dramatically enhance your security program.

Join & Write a Comment

Creating an auto free TStringList The TStringList is a basic and frequently used object in Delphi. On many occasions, you may want to create a temporary list, process some items in the list and be done with the list. In such cases, you have to…
Introduction I have seen many questions in this Delphi topic area where queries in threads are needed or suggested. I know bumped into a similar need. This article will address some of the concepts when dealing with a multithreaded delphi database…
Polish reports in Access so they look terrific. Take yourself to another level. Equations, Back Color, Alternate Back Color. Write easy VBA Code. Tighten space to use less pages. Launch report from a menu, considering criteria only when it is filled…
This video explains how to create simple products associated to Magento configurable product and offers fast way of their generation with Store Manager for Magento tool.

757 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

23 Experts available now in Live!

Get 1:1 Help Now