473,473 Members | 1,873 Online
Bytes | Software Development & Data Engineering Community
Create Post

Home Posts Topics Members FAQ

Running Total in Subreport Inaccurate

Using Access 97.
Background:
I have a main report called rptTrustHeader with a subreport
rptTrustDetails in the Details section of the main report. The main
report is grouped by MasterClientID. There are also several other
subreports in the main report's footer. The rptTrustDetails subreport
has two grouping levels MasterClientID and ClientID, with headers and
footers for each grouping level. In the ClientID footer, I have an
invisible running total unbound field called CountOfClientID, with its
control source set to = 1, with it set to total Over Group. In the
MasterClientID footer, I have some grand total fields that I want to
show up ONLY if there is more than one ClientID on the report. Then in
the OnFormat event of the MasterClientID footer, I make the grand total
fields show up if the CountOfClientID is greater than 1, and invisible
if CountOfClientID is equal to 1. This should prevent showing the same
totals in the ClientID footer down in the MasterClientID footer.

Problem:
When I open the subreport rptTrustDetails without viewing it through
the main report, the running total field accurately counts the number
of ClientID footers that it encountered and shows/hides the
MasterClientID footer totals exactly as expected. Great! The problem
occurs when I open the main report. Suddenly, my running total field
is randomly inaccurate. Sometimes the field accurately reflects 1,
then on the next MasterClientID's report with only 1 ClientID footer,
the running total shows 2! My only thought is that maybe something is
triggering the ClientID footer multiple times somehow during the
formatting of the main report, but I am at a total loss as to how I can
overcome this.

I have searched and found similar postings, but none with a resolution.
So, I throw myself upon the mercy of the Access gurus out there. As
such, I would welcome and solutions and/or workarounds for this
problem. Am I going to be reduced to doing a DCount in my OnFormat
event and writing a separate query, just to determine if there is more
than one ClientID reporting under the MasterClientID?

Thanks in advance for any suggestions!
Jana

Dec 1 '06 #1
2 2308
On 1 Dec 2006 12:43:36 -0800, "Jana" <Ba********@gmail.comwrote:

You do realize that OnFormat may be called more often than you might
think - that's why it has a FormatCount property. Some code might be
tripped up by this.

DCount or a Totals query ain't bad.

-Tom.
>Using Access 97.
Background:
I have a main report called rptTrustHeader with a subreport
rptTrustDetails in the Details section of the main report. The main
report is grouped by MasterClientID. There are also several other
subreports in the main report's footer. The rptTrustDetails subreport
has two grouping levels MasterClientID and ClientID, with headers and
footers for each grouping level. In the ClientID footer, I have an
invisible running total unbound field called CountOfClientID, with its
control source set to = 1, with it set to total Over Group. In the
MasterClientID footer, I have some grand total fields that I want to
show up ONLY if there is more than one ClientID on the report. Then in
the OnFormat event of the MasterClientID footer, I make the grand total
fields show up if the CountOfClientID is greater than 1, and invisible
if CountOfClientID is equal to 1. This should prevent showing the same
totals in the ClientID footer down in the MasterClientID footer.

Problem:
When I open the subreport rptTrustDetails without viewing it through
the main report, the running total field accurately counts the number
of ClientID footers that it encountered and shows/hides the
MasterClientID footer totals exactly as expected. Great! The problem
occurs when I open the main report. Suddenly, my running total field
is randomly inaccurate. Sometimes the field accurately reflects 1,
then on the next MasterClientID's report with only 1 ClientID footer,
the running total shows 2! My only thought is that maybe something is
triggering the ClientID footer multiple times somehow during the
formatting of the main report, but I am at a total loss as to how I can
overcome this.

I have searched and found similar postings, but none with a resolution.
So, I throw myself upon the mercy of the Access gurus out there. As
such, I would welcome and solutions and/or workarounds for this
problem. Am I going to be reduced to doing a DCount in my OnFormat
event and writing a separate query, just to determine if there is more
than one ClientID reporting under the MasterClientID?

Thanks in advance for any suggestions!
Jana
Dec 2 '06 #2
Tom:
Thanks for your reply, I hadn't had a chance to check back until now.
I have since corrected the problem using a DCount in the MasterClientID
footer, but was just confused as to why the Running Sum feature was
inaccurate on a subreport. Any thoughts?

Jana

Tom van Stiphout wrote:
On 1 Dec 2006 12:43:36 -0800, "Jana" <Ba********@gmail.comwrote:

You do realize that OnFormat may be called more often than you might
think - that's why it has a FormatCount property. Some code might be
tripped up by this.

DCount or a Totals query ain't bad.

-Tom.
Using Access 97.
Background:
I have a main report called rptTrustHeader with a subreport
rptTrustDetails in the Details section of the main report. The main
report is grouped by MasterClientID. There are also several other
subreports in the main report's footer. The rptTrustDetails subreport
has two grouping levels MasterClientID and ClientID, with headers and
footers for each grouping level. In the ClientID footer, I have an
invisible running total unbound field called CountOfClientID, with its
control source set to = 1, with it set to total Over Group. In the
MasterClientID footer, I have some grand total fields that I want to
show up ONLY if there is more than one ClientID on the report. Then in
the OnFormat event of the MasterClientID footer, I make the grand total
fields show up if the CountOfClientID is greater than 1, and invisible
if CountOfClientID is equal to 1. This should prevent showing the same
totals in the ClientID footer down in the MasterClientID footer.

Problem:
When I open the subreport rptTrustDetails without viewing it through
the main report, the running total field accurately counts the number
of ClientID footers that it encountered and shows/hides the
MasterClientID footer totals exactly as expected. Great! The problem
occurs when I open the main report. Suddenly, my running total field
is randomly inaccurate. Sometimes the field accurately reflects 1,
then on the next MasterClientID's report with only 1 ClientID footer,
the running total shows 2! My only thought is that maybe something is
triggering the ClientID footer multiple times somehow during the
formatting of the main report, but I am at a total loss as to how I can
overcome this.

I have searched and found similar postings, but none with a resolution.
So, I throw myself upon the mercy of the Access gurus out there. As
such, I would welcome and solutions and/or workarounds for this
problem. Am I going to be reduced to doing a DCount in my OnFormat
event and writing a separate query, just to determine if there is more
than one ClientID reporting under the MasterClientID?

Thanks in advance for any suggestions!
Jana
Dec 5 '06 #3

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

Similar topics

8
by: dixie | last post by:
I have a report with a subreport. The source object for this subreport varies according to the value of a field in a table. I am trying to programmatically set the object source for the subreport...
7
by: Ellen Manning | last post by:
I've got an A2K report showing students and their costs. Student info is in the main report and costs are in a subreport for each student. The user inputs the program desired then only those...
1
by: Marie | last post by:
How do you display a total from a subreport on the main report. If it makes a difference, the total is a total of a calculated field (Qty * Price). Does the total on the subreport go in the...
1
by: Alex | last post by:
I have a report with a subreport. In the subreport, I have a cell in a group footer that is used as a counter (ControlSource = 1, Running Sum = "Over Group". When I run the subreport independant...
3
by: Pecanfan | last post by:
Hi, I've got an access report which contains a sub-report. The sub-report contains various items in a group Footer which culminates in a running sum text box called txtGrandTotal. I want to...
2
by: jammer | last post by:
Hey All, I have a report based on a query that joins a 'parent' and 'child' table. Each row in the query corresponds to a row in the child table, with a few fields from the Parent table. At...
2
by: EManning | last post by:
Using A2K. I've got a report/subreport that looks like the following: <main report> Account AAA Beginning Fund Balance: $10,000 <subreport> "Expense" "Total" ...
1
by: eogyamfi | last post by:
i have subreport within the main report. The grand total for the main report is showing on the report. The grandtotal for the subreport is not showing even though on the subreport itself it shows...
0
by: JoeyFromGermany | last post by:
hi all. i have a main/detail report in crystal reports 8. i want to print a running total in the pagefooter of the main report of a shared variable from the subreport. which means, i want a "sum...
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
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,...
0
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...
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...
1
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...
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...
0
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
0
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 ...
0
muto222
php
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

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.