473,769 Members | 6,286 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Summing problem on report

I have a report-summing problem using Access 2000. When a section runs
over the end of the page, sometimes a detail gets picked up twice.

Example:
Customer Header
XYZ Company
Detail Section (INVISIBLE)
Invoice 1 $100.00
Invoice 2 $250.00
Page Break
Customer Footer
Customer Total $450.00

The bad total is because Invoice 1 is summed twice.

Keep section together does not help. If I make the detail section
visible, then the page fills in a different manner and the problem goes
away. There are no sub-reports on this report

This is a very rare occurrence but I do see it once in awhile. How
should I change my report to solve this?
Hank Reed

Nov 13 '05 #1
7 2177
Hank, how are you calculating this total?

Are you using code in the (Format?) event of the Detail section to
accumulate the total as a variable? If so, drop the code and set the Control
Source property of the Customer Total box to:
=Sum([Amount])

If that does not solve the problem, what is the RecordSource of the report?
Is there anything there that could cause one row to show up multiple times?

If that still does not pin down the issue, check your updates of Access and
JET. Locate msaccess.exe on your hard disk, typically in:
C:\Program Files\Microsoft Office\Office
Right-click the file, and choose Properties.
On the Version tab, if you do not see 9.0.0.6620, go to:
http://support.microsoft.com/gp/sp
and download SP3 for Office 2000.

Just as important, locate msjet40.dll, typically in \windows\system 32.
You should see version 4.0.8xxx.0.
The digits at xxx don't matter, but if you don't see the 8, get SP8 for Jet
4 from the same link as above.

--
Allen Browne - Microsoft MVP. Perth, Western Australia.
Tips for Access users - http://allenbrowne.com/tips.html
Reply to group, rather than allenbrowne at mvps dot org.

"Hank" <ha********@aol .com> wrote in message
news:11******** **************@ z14g2000cwz.goo glegroups.com.. .
I have a report-summing problem using Access 2000. When a section runs
over the end of the page, sometimes a detail gets picked up twice.

Example:
Customer Header
XYZ Company
Detail Section (INVISIBLE)
Invoice 1 $100.00
Invoice 2 $250.00
Page Break
Customer Footer
Customer Total $450.00

The bad total is because Invoice 1 is summed twice.

Keep section together does not help. If I make the detail section
visible, then the page fills in a different manner and the problem goes
away. There are no sub-reports on this report

This is a very rare occurrence but I do see it once in awhile. How
should I change my report to solve this?
Hank Reed

Nov 13 '05 #2

Thanks Allen.
No, I have never used VBA for summing in the detail section –
doesn’t work well

Typically, I accumulate totals like this:
Variable Variable
Visible Invisible
IV 1 $100 [IVTotal] [Running] = [IVTotal] Over Group $100
IV 2 $250 [IVTotal] [Running] = [IVTotal] Over Group $350
IV 3 $ 75 [IVTotal] [Running] = [IVTotal] Over Group $425

Section Footer
Total of all Invoices [GrandTotal] = [Running] = $425

This might be replicated over several section groupings: Date, Customer,
Invoice

I believe the recordsource is fine. Remember this only happens on a
page rollover and not very often at that.

I did find msjet40.dll but did not know how to find the version number.
Hank Reed

*** Sent via Developersdex http://www.developersdex.com ***
Nov 13 '05 #3
Okay, you're using Running Sum. That should work but you could try the text
box with:
=Sum([IVTotal])
or whatever the field name is called.

Right-click the msjet40.dll, and choose Properties.
The 2nd tab of the Properties box is Version.

--
Allen Browne - Microsoft MVP. Perth, Western Australia.
Tips for Access users - http://allenbrowne.com/tips.html
Reply to group, rather than allenbrowne at mvps dot org.

"Hank Reed" <ha********@aol .com> wrote in message
news:uO******** ******@news.usw est.net...

Thanks Allen.
No, I have never used VBA for summing in the detail section â?"
doesnâ?Tt work well

Typically, I accumulate totals like this:
Variable Variable
Visible Invisible
IV 1 $100 [IVTotal] [Running] = [IVTotal] Over Group $100
IV 2 $250 [IVTotal] [Running] = [IVTotal] Over Group $350
IV 3 $ 75 [IVTotal] [Running] = [IVTotal] Over Group $425

Section Footer
Total of all Invoices [GrandTotal] = [Running] = $425

This might be replicated over several section groupings: Date, Customer,
Invoice

I believe the recordsource is fine. Remember this only happens on a
page rollover and not very often at that.

I did find msjet40.dll but did not know how to find the version number.
Hank Reed

Nov 13 '05 #4
My tests with the Sum function in a report indicate that it will sum a
bound text box but not a text box with a calculated value in it.
For instance, I could sum [Price] or [Quantity] but not sum a text box
named [ExtendedPrice], that held [Price] * [Quantity].

When I set the Control Source to =[ExtendedPrice] is pretends not to
know what text box I'm talking about. The Text Boxes [Price],
[Quantity], and [ExtendedPrice] are all in the detail section.
I want the sum of [ExtendedPrice] in the footer.
Hank Reed

Nov 13 '05 #5
You will need the syntax = Sum([Price]*[Quantity]) here ...

Arno R
"Hank" <ha********@aol .com> schreef in bericht news:11******** **************@ g14g2000cwa.goo glegroups.com.. .
My tests with the Sum function in a report indicate that it will sum a
bound text box but not a text box with a calculated value in it.
For instance, I could sum [Price] or [Quantity] but not sum a text box
named [ExtendedPrice], that held [Price] * [Quantity].

When I set the Control Source to =[ExtendedPrice] is pretends not to
know what text box I'm talking about. The Text Boxes [Price],
[Quantity], and [ExtendedPrice] are all in the detail section.
I want the sum of [ExtendedPrice] in the footer.
Hank Reed

Nov 13 '05 #6
Arno's is probably the simplest solution, and should work 100%.

Another solution is to create a query, and put the calculation into the
query as a calculated field, e.g.:
ExtendedPrice: [Price] * [Quantity]
Using the query as the RecordSource for your report, you can then use:
=Sum([ExtendedPrice])

--
Allen Browne - Microsoft MVP. Perth, Western Australia.
Tips for Access users - http://allenbrowne.com/tips.html
Reply to group, rather than allenbrowne at mvps dot org.
"Arno R" <ar***********@ tiscali.nl> wrote in message
news:42******** *************@d reader2.news.ti scali.nl...
You will need the syntax = Sum([Price]*[Quantity]) here ...

Arno R

"Hank" <ha********@aol .com> schreef in bericht
ews:11********* *************@g 14g2000cwa.goog legroups.com...
My tests with the Sum function in a report indicate that it will sum a
bound text box but not a text box with a calculated value in it.
For instance, I could sum [Price] or [Quantity] but not sum a text box
named [ExtendedPrice], that held [Price] * [Quantity].

When I set the Control Source to =[ExtendedPrice] is pretends not to
know what text box I'm talking about. The Text Boxes [Price],
[Quantity], and [ExtendedPrice] are all in the detail section.
I want the sum of [ExtendedPrice] in the footer.
Hank Reed

Nov 13 '05 #7
I have always known that the sort order in the "Sorting and
Grouping" dialog box takes preference over sorts you may specify on the
report, including sorting the recordset.
I did, however, miss the point that there is a "Keep Together"
choice in "Sorting and Grouping". This takes preference over the
"Keep Together" selection on the properties box for the report section.
Having set "Keep Together" for my Customer section (in the
Sorting and Grouping Dialog), my report totals accurately but I may be
just masking the bigger problem.
Thanks to all,
Hank Reed

Nov 13 '05 #8

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

9
2576
by: Yaroslav Bulatov | last post by:
I made an array of 10 million floats timed how long it takes to sum the elements, here's what I got (millis): gcc -O2: 21 Python with numarray: 104 Python with Numeric: 302 java: 325 gcc: 348 Python with Psyco: 1317 Pure Python using sum: 2312
3
1496
by: Todd D. Levy | last post by:
I have a query based report where a number of the fields in each record are Yes/No data fields. I would like this report to behave as follows: If ALL of the Yes/No data fields in a given record have a value of YES, I would like that particular record to be suppressed (I.e. NOT appear in the report). and
2
1518
by: Den | last post by:
I have a report where at the report footer, I have a field that sums up the total of a field in the report. My problem is, when the report is empty the field shows #error. Would someone tell me a way to have it so that when the report is empty, the sum shows as a zero or displays a message like "No records in report"? Thanks.
4
2655
by: John Baker | last post by:
Hi: At the bottom of a report, I wish to sum all the amounts that appear in a field called Discount$ that appears on the report. I am not doing this summing in the query that supports the report because I have sprinkled the discounts amount into every record, and it only applies in the totals summary for each invoice. In any case, the Field is called Discount$ and the report is called RINV1Q1. How do I reference the field in the report...
2
5118
by: Lynn N. | last post by:
I have a report showing Rate, Hours and Total Pay (which is Rate*Hours) for several workers. I want to sum the Total Pay and get a CORRECT figure. This seems like it should be such a simple task. But there seems to be rounding issues in Access 2000 that I can't figure out. It seems that, even though the report is displaying Total Pay as currency rounded off to two decimal places, the report is actually using more than two decimal places...
7
3430
by: SueB | last post by:
Greetings. I have a report based on the following query (hang in there ... it's quite long): SELECT Year(.) AS Yr, tblEvents.eventID, tblEvents.eventname, tblEvents.eventhost, tblEvents.eventcity, tblEvents.eventstate, tblEvents.eventstartdt, tblEvents.eventenddt, tblTrials.trialnbr, tblTrials.trialdt, tblTrialClass.trialclassID, tblClasses.class, tblScores.score, tblScores.level, . & (" "+.+".") & " " & . & (" "+.+".") & " (" & . & ",...
4
3287
by: MLH | last post by:
I have a report and on it, a subreport control Main Report Name: rptInvoiceMain Sub Report Name: rptInvoiceSubReport SubReport Control Name: rptInvoiceSubReportCtl The subreport contains 2 fields - a text field where line items sold are listed and a currency field where the price per item is shown. The subreport control displays these two fields when the main report is opened.
0
1585
by: CaptainDahlin | last post by:
Access 2003 Report rptWhiteMailDeposit I have found the "four lines of code" solution to adding sums to page footers and it is working...mostly. (if report is only one page long it doesn't count. Over two pages it works.) In the rptWhiteMailDeposit I would like to have in the PAGE FOOTER of each page the following: Total Brought Forward (from previous page of report when report is longer than 1 page)
4
2533
by: dancole42 | last post by:
So I have an invoicing database based on two main forms: Orders and OrderLines. Orders has fields like: OrderID BillingMethod OrderDate CreditCard CCExp OrdSubTotal ShippingCharge
0
10211
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
10045
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
0
9863
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 protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
8870
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
0
6672
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 then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
5298
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
5447
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
3958
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
3
2815
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.