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

Subscribe to our news:
Partners
Testimonials
John Gondek: "Your software is amazing. I consider myself a novice at PHP and JS and with your software I have a web page that is truly fantastic. Thank you so much ".
Simon Greener: "A lot of work went in to designing our application database. PHP Generator allowed us to build a fully functional, professional looking, and functionally powerful web application from that database. It has freed us from worrying about low level code, enabling us to focus on the business requirements of the customer. The support provided is excellent with staff quickly producing answers to questions ranging from newbie to simple or complex. I highly recommend the product".

More

Add your opinion

PostgreSQL PHP Generator online Help

Prev Return to chapter overview Next

OnCustomRenderTotals

This event occurs before total values rendering and allows you to replace the default total footer content. To use it, enable the grid footer in the View properties of the corresponding column.

 

 

Signature:

function OnCustomRenderTotals ($totalValue, $aggregate, $columnName,

    &$customText, &$handled)

 

Parameters:

$totalValue

The value of currently processed total.

$aggregate

The string representation of total aggregate ('AVG', 'SUM', 'MIN', 'MAX', 'COUNT').

$columnName

The column name of currently processed total.

$customText

A string to replace the total cell content.

$handled

A parameter to indicate whether the event handler executed. Set $handled to true in the event handler to apply new content.

 

Example 1:

The code below changes the caption of the 'amount' column footer and gives it strong importance.

 

if ($columnName == 'amount')

{

    $customText = '<strong>Total: $' . $totalValue . '</strong>';

    $handled = true;   

}

 

This picture demonstrates the difference between a webpage generated with default footer and a webpage with the OnCuStomRenderTotals event specified in this way:

 

 

Example 2:

The code below is used in our online demo on the 'Teams' page to display the year of foundation of the oldest team on the page in more convenient form.

 

if ($columnName == 'year_founded') {

   $customText = 'MIN: ' . intval(str_replace(',', '', $totalValue));

   $handled = true;

}

 



Prev Return to chapter overview Next