473,413 Members | 1,811 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,413 software developers and data experts.

Calculate Running Sum on Report

294 256MB
I am trying to calculate 2 sums of 2 different fields on a report.

The fields are aggregates themselves.

Expand|Select|Wrap|Line Numbers
  1. Current Units: Sum(([AwardTbl]![AwardUnits]-[AwardTbl]![ForfeitedUnits]-[AwardTbl]![PaidOutUnits]))
For example.

I have tried creating a text box in the footer, putting [Current Units] in the Control Source and selected Running Sum Over All and I tried Over Group. Neither summed anything, they only provided me with the value of the last record on the report.

I also tried (in the text box)
Expand|Select|Wrap|Line Numbers
  1. =Sum([Current Units])
which did not work, either.

Here is the SQL for the report.
Expand|Select|Wrap|Line Numbers
  1. SELECT AssociateTbl.AstFirstName, 
  2. AssociateTbl.AstPrefName, 
  3. AssociateTbl.AstLastName, 
  4. Sum(([AwardTbl]![AwardUnits]-[AwardTbl]![ForfeitedUnits]-[AwardTbl]![PaidOutUnits])*[LastOfNetAssetValue]) AS [Current LTIR Value],
  5.  AssociateTbl.EmployeeID, Sum(([AwardTbl]![AwardUnits]-[AwardTbl]![ForfeitedUnits]-[AwardTbl]![PaidOutUnits])) AS [Current Units]
  6. FROM MaxNAVQry, AssociateTbl
  7.  INNER JOIN AwardTbl ON 
  8. AssociateTbl.EmployeeID = AwardTbl.EmployeeID
  9. GROUP BY AssociateTbl.AstFirstName, AssociateTbl.AstPrefName, AssociateTbl.AstLastName, AssociateTbl.EmployeeID
  10. HAVING (((Sum(([AwardTbl]![AwardUnits]-[AwardTbl]![ForfeitedUnits]-[AwardTbl]![PaidOutUnits])*[LastOfNetAssetValue]))>0) AND ((Sum(([AwardTbl]![AwardUnits]-[AwardTbl]![ForfeitedUnits]-[AwardTbl]![PaidOutUnits])))>0));
I am trying to sum both Current Units and Current LTIR Value. Any ideas?
Mar 27 '14 #1
2 5899
zmbd
5,501 Expert Mod 4TB
As far as I know, the method hasn't changed since ACC2003 so here's the link to that information: Calculate a running sum (cumulative total) (ACC2003)

Here it is from a different angle: Summing in reports


From the 2007 perspective... as you can see not much difference in effect; however, you can now use the layout view to create the sums. yea... not sure that's much of an improvement: Summing in reports (ACC2007)

And just one more angle as this is in the query... not sure if this runs faster in the query that is fed to the report or if the report is faster... I typically will use the query though and then feed it to the report for running totals, and then aggregate counts I'll use the report - just a habit.
How to create a running totals query in Microsoft Access (ACC2000-2010)
Mar 28 '14 #2
mcupito
294 256MB
I had to put it in the report footer, not the page footer. DOH. Thanks, z!
Mar 28 '14 #3

Sign in to post your reply or Sign up for a free account.

Similar topics

0
by: Lisa Henkel | last post by:
In Access 2000, does anybody know how to write code behind a button, in such a way that the Report Wizard runs when you press the button? I'd really like to use the standard Report Wizard if I can...
2
by: Davisro | last post by:
I am wondering if it is possible to have a running total of four textboxes so that when any text box is changed I could then calcuate the total of the four boxes and show this on the webform. ...
0
by: rupalirane07 | last post by:
Hi all experts, When i Run the report in reporting services, it locks the tables. so is there any option to Unlock the tables. I m using just select query to run the report but when i run the...
6
by: Stuart Shay | last post by:
Hello All: I have a array which contains the totals for each month and from this array I want to get a running total for each month decimal month = new decimal; month = 254; (Jan) month =...
1
by: Bruce | last post by:
I had a form with a running total working until I was asked to add some checkboxes. Here is what I have: http://www.bearzilla.net/test/Untitled-1.html The first section works, but I can't get...
2
by: Zammy | last post by:
I wrote a program in Access 2000 for a co-worker. She just got a new Dell Latitude laptop and when she opens the db, none of the reports will open. They show up in the report section with the...
0
by: kpotdar | last post by:
I have a scenario where on my page(reports.aspx) I submit a report request to a class(ReportWritter.cs) in a web app. The class in turn uses a webservice to submit this job to the DB(Oracle 10g). The...
2
by: bouldergirl | last post by:
Hello, My problem is this: I have an input table (called rin in the following code) with a field (GDD) that I am hoping to create a running, cumulative sum of (in the output table field called...
0
by: AndyB2 | last post by:
Using MS/Access 2010 When attempting to run a report in ShairPoint I am getting this error: "An error occurred during local report processing. An error has occurred during report...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.