This topic is locked

Total of Column At End Of Pagination

3/14/2010 8:35:46 AM
PHPRunner General questions
D
denspad author

Hi,
I am trialing PHPRunner and I am trying to find a way to add a 'grand total' for a column on the last page of the pagination.
I can see that in the list page I can add a Totals Type of TOTAL but this appears to only show the sum of a column on the current page of the pagination. What I want to do is to have this value cummulatively add up so that on the last page of the pagination the TOTAL reflects the sum of all rows in the table.
Hope this makes sense.
Any help would be very much appreciated - the only thing missing from the software before we buy!
Regards,
Denspad.

A
aramuni 3/18/2010



Hi,
I am trialing PHPRunner and I am trying to find a way to add a 'grand total' for a column on the last page of the pagination.
I can see that in the list page I can add a Totals Type of TOTAL but this appears to only show the sum of a column on the current page of the pagination. What I want to do is to have this value cummulatively add up so that on the last page of the pagination the TOTAL reflects the sum of all rows in the table.
Hope this makes sense.
Any help would be very much appreciated - the only thing missing from the software before we buy!
Regards,
Denspad.


Hi,
I'm trying to do that too. I'm sure it's possible but my programing skills are not so good.
I just discovered it's possible alter the list.php file where the total is displayed.

J
Jane 3/19/2010

Hi,
use custom event (Insert PHP code snippet option on the Visual Editor tab) to select global sum and print it on the page.

Here is just a sample:

$rstmp = CustomQuery("select sum(FieldName) from TableName");

$datatmp = db_fetch_array($rstmp);

echo "Global total: ".$datatmp[0];