|
90288 8/4/2017 |
As Wikipedia says "running total is the summation of a sequence of numbers which is updated each time a new number is added to the sequence, simply by adding the value of the new number to the running total". It is also known as running sum or running balance. Adding running total to one of list pages is really simple. Lets consider table Balance with fields ID and Amount. 1.Modify SQL query adding a calculated Total field: SELECT
$_SESSION["Total"]=0;
$_SESSION["Total"] += $data["Amount"];
|
jadachDevClub member 1/8/2018 | |
This just came in very handy for a project I am doing. Does anyone know how I can format the total field to currency? I am using C#. XSession.Session["Total"] += data["Budgeted"].ToString();
|
admin 1/16/2018 | |
Jerry, |
jadachDevClub member 1/16/2018 | |
Jerry, I just double checked in ASPRunner.NET, your code works with both integer and floating point values. What results are you getting?
|
admin 1/17/2018 | |
Jerry, XSession.Session["Total"] += data["Budgeted"].ToString(); |
jadachDevClub member 1/17/2018 | |
Jerry, got it, I thought there were an issue with calculation. You need to convert it to float first. XSession.Session["Total"] += data["Budgeted"].ToString();
|