zero totals

G

Guest

I have a report which includes 3 sub reports, each with a total. I have then
added these 3 totals to give a grand total. However, if one of the sub
reports have a zero total, the report total comes up as an error. Is there a
way to stop this happening?
 
K

Ken Snell [MVP]

A zero total? Or a Null total? or no records in the subreport at all?

Tell us more info about the subreports' contents, and the expressions that
you're using?
 
G

Guest

The subreports look at the three different types of payments received in a
single day, and the main report then looks to combine the three reports to
produce a daily figure.

Report total is
=DailyCommPaymentsSubreport.Report![comm
total]+DailyProgPaymentsSubreport.Report![prog
total]+DailyCompPaymentsSubreport.Report![comp total]
 
K

Ken Snell [MVP]

Is it possible for any of these subreports to have no data? if yes, then
there is no control in that subreport for the expression to read, and that
will cause an error, which will propogate through the calculation.

Assuming that this is the problem, try this:

=IIf(DailyCommPaymentsSubreport.Report.HasData,DailyCommPaymentsSubreport.Report![comm
total],0)+IIf(DailyProgPaymentsSubreport.Report.HasData,DailyProgPaymentsSubreport.Report![prog
total],
0)+IIf(DailyCompPaymentsSubreport.Report.HasData,DailyCompPaymentsSubreport.Report![comp
total],0)


--

Ken Snell
<MS ACCESS MVP>


rachael said:
The subreports look at the three different types of payments received in a
single day, and the main report then looks to combine the three reports to
produce a daily figure.

Report total is
=DailyCommPaymentsSubreport.Report![comm
total]+DailyProgPaymentsSubreport.Report![prog
total]+DailyCompPaymentsSubreport.Report![comp total]

Ken Snell said:
A zero total? Or a Null total? or no records in the subreport at all?

Tell us more info about the subreports' contents, and the expressions
that
you're using?
 
G

Guest

It is possible that one or more of the sub reports will have no data, which
is what causes the error, but unfortunately the below expression didn't fix
the problem. Any other ideas?

Ken Snell said:
Is it possible for any of these subreports to have no data? if yes, then
there is no control in that subreport for the expression to read, and that
will cause an error, which will propogate through the calculation.

Assuming that this is the problem, try this:

=IIf(DailyCommPaymentsSubreport.Report.HasData,DailyCommPaymentsSubreport.Report![comm
total],0)+IIf(DailyProgPaymentsSubreport.Report.HasData,DailyProgPaymentsSubreport.Report![prog
total],
0)+IIf(DailyCompPaymentsSubreport.Report.HasData,DailyCompPaymentsSubreport.Report![comp
total],0)


--

Ken Snell
<MS ACCESS MVP>


rachael said:
The subreports look at the three different types of payments received in a
single day, and the main report then looks to combine the three reports to
produce a daily figure.

Report total is
=DailyCommPaymentsSubreport.Report![comm
total]+DailyProgPaymentsSubreport.Report![prog
total]+DailyCompPaymentsSubreport.Report![comp total]

Ken Snell said:
A zero total? Or a Null total? or no records in the subreport at all?

Tell us more info about the subreports' contents, and the expressions
that
you're using?

--

Ken Snell
<MS ACCESS MVP>


I have a report which includes 3 sub reports, each with a total. I have
then
added these 3 totals to give a grand total. However, if one of the sub
reports have a zero total, the report total comes up as an error. Is
there
a
way to stop this happening?
 
K

Ken Snell [MVP]

Three things to check:

(1) Is DailyCommPaymentsSubreport, DailyProgPaymentsSubreport, and
DailyCompPaymentsSubreport the correct names of the subreport controls on
the report? These names in the expression must be those of the subreport
control, which may or may not be the name of the source object for those
controls. If they're not the correct names, change them.

(2) If they are the correct names (and assuming that the control names on
the subreports are correct), then change the expression to this:

=IIf(IsError(DailyCommPaymentsSubreport.Report![comm
total]),0,DailyCommPaymentsSubreport.Report![comm
total])+IIf(IsError(DailyProgPaymentsSubreport.Report![prog total]), 0,
DailyProgPaymentsSubreport.Report![prog
total])+IIf(IsError(DailyCompPaymentsSubreport.Report![comp
total]),0,DailyCompPaymentsSubreport.Report![comp total])

(3) Put three temporary textboxes on the main report. Set the control source
of each to point to one of the three subreports' textbox. Let's see if all
are erroring, no matter whether the subreport has data or not, or if just
some.

--

Ken Snell
<MS ACCESS MVP>



rachael said:
It is possible that one or more of the sub reports will have no data,
which
is what causes the error, but unfortunately the below expression didn't
fix
the problem. Any other ideas?

Ken Snell said:
Is it possible for any of these subreports to have no data? if yes, then
there is no control in that subreport for the expression to read, and
that
will cause an error, which will propogate through the calculation.

Assuming that this is the problem, try this:

=IIf(DailyCommPaymentsSubreport.Report.HasData,DailyCommPaymentsSubreport.Report![comm
total],0)+IIf(DailyProgPaymentsSubreport.Report.HasData,DailyProgPaymentsSubreport.Report![prog
total],
0)+IIf(DailyCompPaymentsSubreport.Report.HasData,DailyCompPaymentsSubreport.Report![comp
total],0)


--

Ken Snell
<MS ACCESS MVP>


rachael said:
The subreports look at the three different types of payments received
in a
single day, and the main report then looks to combine the three reports
to
produce a daily figure.

Report total is
=DailyCommPaymentsSubreport.Report![comm
total]+DailyProgPaymentsSubreport.Report![prog
total]+DailyCompPaymentsSubreport.Report![comp total]

:

A zero total? Or a Null total? or no records in the subreport at all?

Tell us more info about the subreports' contents, and the expressions
that
you're using?

--

Ken Snell
<MS ACCESS MVP>


I have a report which includes 3 sub reports, each with a total. I
have
then
added these 3 totals to give a grand total. However, if one of the
sub
reports have a zero total, the report total comes up as an error. Is
there
a
way to stop this happening?
 
G

Guest

i have checked items (1) and (3), item (2) doesn't quite work, when i run the
report i have totals for sub report 1 & 3, but the overall total is now
showing as $0.00 instead of error
 
K

Ken Snell [MVP]

I'm not clear about these results.

You have verified that the subreport controls' names are the ones that
you're using in the expression?

You tried using the (2) expression that I provided (with IsError)? What does
"doesn't quite work" mean?

In which scenario are you seeing the overall total as $0.00? What did the
(3) scenario show as totals for each subreport?
 
G

Guest

Using the expression you provided the report total is no longer error but
rather displays as $0.00 rather than adding the totals for the individual sub
reports.
 
K

Ken Snell [MVP]

Hmmm... let's try this minor change:

=IIf(IsError(DailyCommPaymentsSubreport.Report.[comm
total]),0,DailyCommPaymentsSubreport.Report.[comm
total])+IIf(IsError(DailyProgPaymentsSubreport.Report.[prog total]), 0,
DailyProgPaymentsSubreport.Report.[prog
total])+IIf(IsError(DailyCompPaymentsSubreport.Report.[comp
total]),0,DailyCompPaymentsSubreport.Report.[comp total])
--

Ken Snell
<MS ACCESS MVP>
 
G

Guest

The total now comes up as #Name?

Ken Snell said:
Hmmm... let's try this minor change:

=IIf(IsError(DailyCommPaymentsSubreport.Report.[comm
total]),0,DailyCommPaymentsSubreport.Report.[comm
total])+IIf(IsError(DailyProgPaymentsSubreport.Report.[prog total]), 0,
DailyProgPaymentsSubreport.Report.[prog
total])+IIf(IsError(DailyCompPaymentsSubreport.Report.[comp
total]),0,DailyCompPaymentsSubreport.Report.[comp total])
--

Ken Snell
<MS ACCESS MVP>


rachael said:
Using the expression you provided the report total is no longer error but
rather displays as $0.00 rather than adding the totals for the individual
sub
reports.
 
K

Ken Snell [MVP]

That error indicates that ACCESS cannot find a field or control by the names
given in those subreports. Is "comm total" a textbox in the subreport?

I am still thinking that the problem here is the use of an incorrect
name(s).
--

Ken Snell
<MS ACCESS MVP>



rachael said:
The total now comes up as #Name?

Ken Snell said:
Hmmm... let's try this minor change:

=IIf(IsError(DailyCommPaymentsSubreport.Report.[comm
total]),0,DailyCommPaymentsSubreport.Report.[comm
total])+IIf(IsError(DailyProgPaymentsSubreport.Report.[prog total]), 0,
DailyProgPaymentsSubreport.Report.[prog
total])+IIf(IsError(DailyCompPaymentsSubreport.Report.[comp
total]),0,DailyCompPaymentsSubreport.Report.[comp total])
--

Ken Snell
<MS ACCESS MVP>


rachael said:
Using the expression you provided the report total is no longer error
but
rather displays as $0.00 rather than adding the totals for the
individual
sub
reports.
:

I'm not clear about these results.

You have verified that the subreport controls' names are the ones that
you're using in the expression?

You tried using the (2) expression that I provided (with IsError)?
What
does
"doesn't quite work" mean?

In which scenario are you seeing the overall total as $0.00? What did
the
(3) scenario show as totals for each subreport?

--

Ken Snell
<MS ACCESS MVP>

i have checked items (1) and (3), item (2) doesn't quite work, when i
run
the
report i have totals for sub report 1 & 3, but the overall total is
now
showing as $0.00 instead of error

:

I have a report which includes 3 sub reports, each with a total. I
have
then
added these 3 totals to give a grand total. However, if one of the
sub
reports have a zero total, the report total comes up as an error.
Is
there a
way to stop this happening?
 
G

Guest

the report total does work when i have received all types of payments

Ken Snell said:
That error indicates that ACCESS cannot find a field or control by the names
given in those subreports. Is "comm total" a textbox in the subreport?

I am still thinking that the problem here is the use of an incorrect
name(s).
--

Ken Snell
<MS ACCESS MVP>



rachael said:
The total now comes up as #Name?

Ken Snell said:
Hmmm... let's try this minor change:

=IIf(IsError(DailyCommPaymentsSubreport.Report.[comm
total]),0,DailyCommPaymentsSubreport.Report.[comm
total])+IIf(IsError(DailyProgPaymentsSubreport.Report.[prog total]), 0,
DailyProgPaymentsSubreport.Report.[prog
total])+IIf(IsError(DailyCompPaymentsSubreport.Report.[comp
total]),0,DailyCompPaymentsSubreport.Report.[comp total])
--

Ken Snell
<MS ACCESS MVP>


Using the expression you provided the report total is no longer error
but
rather displays as $0.00 rather than adding the totals for the
individual
sub
reports.
:

I'm not clear about these results.

You have verified that the subreport controls' names are the ones that
you're using in the expression?

You tried using the (2) expression that I provided (with IsError)?
What
does
"doesn't quite work" mean?

In which scenario are you seeing the overall total as $0.00? What did
the
(3) scenario show as totals for each subreport?

--

Ken Snell
<MS ACCESS MVP>

i have checked items (1) and (3), item (2) doesn't quite work, when i
run
the
report i have totals for sub report 1 & 3, but the overall total is
now
showing as $0.00 instead of error

:

I have a report which includes 3 sub reports, each with a total. I
have
then
added these 3 totals to give a grand total. However, if one of the
sub
reports have a zero total, the report total comes up as an error.
Is
there a
way to stop this happening?
 
K

Ken Snell [MVP]

IF you can zip up an example of the file, with sample data that will show
the problem, email it to me (remove this is not real from my reply email
address). Provide specific instructions on how to recreate the "good" and
"bad" results so that I can see what you have.

--

Ken Snell
<MS ACCESS MVP>

rachael said:
the report total does work when i have received all types of payments

Ken Snell said:
That error indicates that ACCESS cannot find a field or control by the
names
given in those subreports. Is "comm total" a textbox in the subreport?

I am still thinking that the problem here is the use of an incorrect
name(s).
--

Ken Snell
<MS ACCESS MVP>



rachael said:
The total now comes up as #Name?

:

Hmmm... let's try this minor change:

=IIf(IsError(DailyCommPaymentsSubreport.Report.[comm
total]),0,DailyCommPaymentsSubreport.Report.[comm
total])+IIf(IsError(DailyProgPaymentsSubreport.Report.[prog total]),
0,
DailyProgPaymentsSubreport.Report.[prog
total])+IIf(IsError(DailyCompPaymentsSubreport.Report.[comp
total]),0,DailyCompPaymentsSubreport.Report.[comp total])
--

Ken Snell
<MS ACCESS MVP>


Using the expression you provided the report total is no longer
error
but
rather displays as $0.00 rather than adding the totals for the
individual
sub
reports.
:

I'm not clear about these results.

You have verified that the subreport controls' names are the ones
that
you're using in the expression?

You tried using the (2) expression that I provided (with IsError)?
What
does
"doesn't quite work" mean?

In which scenario are you seeing the overall total as $0.00? What
did
the
(3) scenario show as totals for each subreport?

--

Ken Snell
<MS ACCESS MVP>

i have checked items (1) and (3), item (2) doesn't quite work,
when i
run
the
report i have totals for sub report 1 & 3, but the overall total
is
now
showing as $0.00 instead of error

:

I have a report which includes 3 sub reports, each with a total.
I
have
then
added these 3 totals to give a grand total. However, if one of
the
sub
reports have a zero total, the report total comes up as an
error.
Is
there a
way to stop this happening?
 
G

Guest

Thank you for you offer but company policy does not allow me to send this
information to you

Ken Snell said:
IF you can zip up an example of the file, with sample data that will show
the problem, email it to me (remove this is not real from my reply email
address). Provide specific instructions on how to recreate the "good" and
"bad" results so that I can see what you have.

--

Ken Snell
<MS ACCESS MVP>

rachael said:
the report total does work when i have received all types of payments

Ken Snell said:
That error indicates that ACCESS cannot find a field or control by the
names
given in those subreports. Is "comm total" a textbox in the subreport?

I am still thinking that the problem here is the use of an incorrect
name(s).
--

Ken Snell
<MS ACCESS MVP>



The total now comes up as #Name?

:

Hmmm... let's try this minor change:

=IIf(IsError(DailyCommPaymentsSubreport.Report.[comm
total]),0,DailyCommPaymentsSubreport.Report.[comm
total])+IIf(IsError(DailyProgPaymentsSubreport.Report.[prog total]),
0,
DailyProgPaymentsSubreport.Report.[prog
total])+IIf(IsError(DailyCompPaymentsSubreport.Report.[comp
total]),0,DailyCompPaymentsSubreport.Report.[comp total])
--

Ken Snell
<MS ACCESS MVP>


Using the expression you provided the report total is no longer
error
but
rather displays as $0.00 rather than adding the totals for the
individual
sub
reports.
:

I'm not clear about these results.

You have verified that the subreport controls' names are the ones
that
you're using in the expression?

You tried using the (2) expression that I provided (with IsError)?
What
does
"doesn't quite work" mean?

In which scenario are you seeing the overall total as $0.00? What
did
the
(3) scenario show as totals for each subreport?

--

Ken Snell
<MS ACCESS MVP>

i have checked items (1) and (3), item (2) doesn't quite work,
when i
run
the
report i have totals for sub report 1 & 3, but the overall total
is
now
showing as $0.00 instead of error

:

I have a report which includes 3 sub reports, each with a total.
I
have
then
added these 3 totals to give a grand total. However, if one of
the
sub
reports have a zero total, the report total comes up as an
error.
Is
there a
way to stop this happening?
 
K

Ken Snell [MVP]

I'm not sure that I can provide additional suggestions at this point, then.
I apologize that I cannot seem to get to the root cause.
--

Ken Snell
<MS ACCESS MVP>



rachael said:
Thank you for you offer but company policy does not allow me to send this
information to you

Ken Snell said:
IF you can zip up an example of the file, with sample data that will show
the problem, email it to me (remove this is not real from my reply email
address). Provide specific instructions on how to recreate the "good" and
"bad" results so that I can see what you have.

--

Ken Snell
<MS ACCESS MVP>

rachael said:
the report total does work when i have received all types of payments

:

That error indicates that ACCESS cannot find a field or control by the
names
given in those subreports. Is "comm total" a textbox in the subreport?

I am still thinking that the problem here is the use of an incorrect
name(s).
--

Ken Snell
<MS ACCESS MVP>



The total now comes up as #Name?

:

Hmmm... let's try this minor change:

=IIf(IsError(DailyCommPaymentsSubreport.Report.[comm
total]),0,DailyCommPaymentsSubreport.Report.[comm
total])+IIf(IsError(DailyProgPaymentsSubreport.Report.[prog
total]),
0,
DailyProgPaymentsSubreport.Report.[prog
total])+IIf(IsError(DailyCompPaymentsSubreport.Report.[comp
total]),0,DailyCompPaymentsSubreport.Report.[comp total])
--

Ken Snell
<MS ACCESS MVP>


Using the expression you provided the report total is no longer
error
but
rather displays as $0.00 rather than adding the totals for the
individual
sub
reports.
:

I'm not clear about these results.

You have verified that the subreport controls' names are the
ones
that
you're using in the expression?

You tried using the (2) expression that I provided (with
IsError)?
What
does
"doesn't quite work" mean?

In which scenario are you seeing the overall total as $0.00?
What
did
the
(3) scenario show as totals for each subreport?

--

Ken Snell
<MS ACCESS MVP>

i have checked items (1) and (3), item (2) doesn't quite work,
when i
run
the
report i have totals for sub report 1 & 3, but the overall
total
is
now
showing as $0.00 instead of error

:

I have a report which includes 3 sub reports, each with a
total.
I
have
then
added these 3 totals to give a grand total. However, if one
of
the
sub
reports have a zero total, the report total comes up as an
error.
Is
there a
way to stop this happening?
 
G

Guest

No worries, thanks for your input.

Ken Snell said:
I'm not sure that I can provide additional suggestions at this point, then.
I apologize that I cannot seem to get to the root cause.
--

Ken Snell
<MS ACCESS MVP>



rachael said:
Thank you for you offer but company policy does not allow me to send this
information to you

Ken Snell said:
IF you can zip up an example of the file, with sample data that will show
the problem, email it to me (remove this is not real from my reply email
address). Provide specific instructions on how to recreate the "good" and
"bad" results so that I can see what you have.

--

Ken Snell
<MS ACCESS MVP>

the report total does work when i have received all types of payments

:

That error indicates that ACCESS cannot find a field or control by the
names
given in those subreports. Is "comm total" a textbox in the subreport?

I am still thinking that the problem here is the use of an incorrect
name(s).
--

Ken Snell
<MS ACCESS MVP>



The total now comes up as #Name?

:

Hmmm... let's try this minor change:

=IIf(IsError(DailyCommPaymentsSubreport.Report.[comm
total]),0,DailyCommPaymentsSubreport.Report.[comm
total])+IIf(IsError(DailyProgPaymentsSubreport.Report.[prog
total]),
0,
DailyProgPaymentsSubreport.Report.[prog
total])+IIf(IsError(DailyCompPaymentsSubreport.Report.[comp
total]),0,DailyCompPaymentsSubreport.Report.[comp total])
--

Ken Snell
<MS ACCESS MVP>


Using the expression you provided the report total is no longer
error
but
rather displays as $0.00 rather than adding the totals for the
individual
sub
reports.
:

I'm not clear about these results.

You have verified that the subreport controls' names are the
ones
that
you're using in the expression?

You tried using the (2) expression that I provided (with
IsError)?
What
does
"doesn't quite work" mean?

In which scenario are you seeing the overall total as $0.00?
What
did
the
(3) scenario show as totals for each subreport?

--

Ken Snell
<MS ACCESS MVP>

i have checked items (1) and (3), item (2) doesn't quite work,
when i
run
the
report i have totals for sub report 1 & 3, but the overall
total
is
now
showing as $0.00 instead of error

:

I have a report which includes 3 sub reports, each with a
total.
I
have
then
added these 3 totals to give a grand total. However, if one
of
the
sub
reports have a zero total, the report total comes up as an
error.
Is
there a
way to stop this happening?
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top