Choose your database:
AnySQL
MySQL
MS SQL Server
PostgreSQL
SQLite
Firebird
Oracle
SQL Anywhere
DB2
MaxDB

Subscribe to our news:
Partners
Testimonials
Ananda Theerthan J: "I have been looking for PHP generator for years and now I am happy that I found one. Yes, its the PHP generator for MySQL. I completely rate 10/10 for this product for making life easier. It has lot of features and capabilities especially the CRUD, lookups and data partitioning. I love this product and recommend to others".
Dionys Henzen: "Congratulations! Your MySQL PHP Generator is a great tool, that can save a lot of time and money to a developer! I'll evaluate for sure your software products when I need them. Great job".

More

Add your opinion

PHP Generator for MySQL online Help

Prev Return to chapter overview Next

Calculated Columns

Calculated (AKA computed, generated, or virtual) columns are columns that do not exist in the data source the page is based on and their values are automatically computed using other column values or another deterministic expression.  For example, you might create a string column that displays concatenated values from other fields, create an integer column to calculate the person age based on his birthday, and so on.

 

Creating calculated columns

To create a new calculated column, open Page Editor, right-click the grid at the Columns tab and choose Add calculated column... from the popup menu. The following window will be opened:

 

 

Provide the name, the data type and the caption for the new column and press OK. A new calculated column will be added to the column list. To quickly distinguish between ordinal and calculated fields, the latter are marked with a green calculator icon.

 

It is possible to add multiple calculated columns for a single page.

 

Dropping calculated columns

To drop an existing calculated column, select the column in the column list, right-click and choose Drop calculated column from the popup menu.

 

Compute column values

To compute column values in read-only views (List, Print, Export, etc) provide the OnCalculateFields server-side event handler. For Edit and Insert forms provide the OnCalculateControlValues client-side event handler.

 

Use totals

Check this option to aggregate values this calculated column, specify the Aggregate expression (like SUM(quantity*price) where quantity and price are the table column names) and the Aggregate caption. Total content of calculated columns can be customized via OnCustomRenderTotals event.

 

Restrictions

Calculated columns cannot be used with Data Filtering and Multi-Edit tools, so the corresponding options in the column list are always disabled.



Prev Return to chapter overview Next