Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Westi on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Running Total

Status
Not open for further replies.

schase

Technical User
Sep 7, 2001
1,756
US
Hi all,

I have a page displaying filtered records from an Access 2000 database.

it is a repeated row type of display. Each line represents a deal total, I would like to also have a running total as each row repeats.

Any ideas?

thank you "Damn the torpedoes, full speed ahead!"

-Adm. James Farragut

Stuart
 
Declare a variable as your running total, as you loop through the rows add the new number to running total and display it.(runningTotal = runningTotal + newValue) You may have to cast the data from the row to int or double, depending on how the data is stored, but this should work for you.
-Tarwn
 
hmmmm, I'll give it a shot and let ya know - thanks Tarwn "Damn the torpedoes, full speed ahead!"

-Adm. James Farragut

Stuart
 
Hey Tarwn, or anybody who can help me.

Running into a block on how to do this.

Where I have 4 columns add together via asp to a deal total. How can I loop through the rows adding each deal total together to get the running total?

Thank you
"Damn the torpedoes, full speed ahead!"

-Adm. James Farragut

Stuart
 
Thanks, and sorry for the delay. Have been trying to work it out without much success.

I have this right after the repeat code.

<% Dim i, strPageTotal
For i = 1 to 15
strPageTotal = ((rsResults(&quot;fldSalePrice&quot;)&i)*.00245)
Next
%>

To no avail, there are two tables, the inner table repeats every 15 rows, and the second table repeats the whole page
until the inner table reaches EOF.

Wanted to get a per page total

Thank you for all your help &quot;Damn the torpedoes, full speed ahead!&quot;

-Adm. James Farragut

Stuart
 
Hi all,


I have a page displaying filtered records from an Access 2000 database.

it is a repeated row type of display. Each line represents a deal total, I would like to also have a running total as each row repeats.

Where I have 4 columns add together via asp to a deal total. How can I loop through the rows adding each deal total together to get the running total?

I have this right after the repeat code.

<% Dim i, strPageTotal
For i = 1 to 15
strPageTotal = ((rsResults(&quot;fldSalePrice&quot;)&i)*.00245)
Next
%>

To no avail, there are two tables, the inner table repeats every 15 rows, and the second table repeats the whole page
until the inner table reaches EOF.

Wanted to get a per page total

Thank you for all your help
&quot;Damn the torpedoes, full speed ahead!&quot;

-Adm. James Farragut

Stuart
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top