471,356 Members | 1,572 Online
Bytes | Software Development & Data Engineering Community
Post +

Home Posts Topics Members FAQ

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

Force a report to wait before formatting?

Is there a way to force access to wait a specified time before making a
calculation?

On my report there is a subreport with a number of calculation on it. One if
which is a count of certain records using a text control with a running sum.
When I display the subreport on my main report, I can see the correct count
but when I make a reference to that control on the main report, I simply get
the number 1. I am sure that the reference to the control is correct as I
have several other references to other controls on the subreport and they
work fine. I suspect the problem is that access reads the subreport control
before the running sum calculation/count is complete thus displays 1.
Jan 27 '07 #1
3 1716
Jimmy wrote:
>Is there a way to force access to wait a specified time before making a
calculation?

On my report there is a subreport with a number of calculation on it. One if
which is a count of certain records using a text control with a running sum.
When I display the subreport on my main report, I can see the correct count
but when I make a reference to that control on the main report, I simply get
the number 1. I am sure that the reference to the control is correct as I
have several other references to other controls on the subreport and they
work fine. I suspect the problem is that access reads the subreport control
before the running sum calculation/count is complete thus displays 1.

The main report needs to reference the running sum total in
the subreport's footer section.

--
Marsh
Jan 27 '07 #2

"Marshall Barton" <ma*********@wowway.comwrote in message
news:mq********************************@4ax.com...
The main report needs to reference the running sum total in
the subreport's footer section.
I have set the control on my main report to reference both the calculated
control on the subreport (which is located in the subreports report footer)
and to reference the running sum control on the subreports detail section
and both give the same result - 1:

=IIf(IsError([rptSnowAnalysisSubreportPastYear].[Report]![txtStormCount]),"","("
& [rptSnowAnalysisSubreportPastYear].[Report]![txtStormCount] & ")")

where [rptSnowAnalysisSubreportPastYear].[Report]![txtStormCount] is the
control in the subreport report footer

also tried:

=IIf(IsError([rptSnowAnalysisSubreportPastYear].[Report]![txtStormDateCount]),"","("
& [rptSnowAnalysisSubreportPastYear].[Report]![txtStormDateCount] & ")")

where [rptSnowAnalysisSubreportPastYear].[Report]![txtStormDateCount] is the
running sum control in the detail section of the subreport.

If I run this subreport as a stand alone report,
([rptSnowAnalysisSubreportPastYear].[Report]![txtStormCount] displays the
correct number.
Jan 28 '07 #3
Jimmy wrote:
>
"Marshall Barton" wrote
>The main report needs to reference the running sum total in
the subreport's footer section.
I have set the control on my main report to reference both the calculated
control on the subreport (which is located in the subreports report footer)
and to reference the running sum control on the subreports detail section
and both give the same result - 1:

=IIf(IsError([rptSnowAnalysisSubreportPastYear].[Report]![txtStormCount]),"","("
& [rptSnowAnalysisSubreportPastYear].[Report]![txtStormCount] & ")")

where [rptSnowAnalysisSubreportPastYear].[Report]![txtStormCount] is the
control in the subreport report footer

also tried:

=IIf(IsError([rptSnowAnalysisSubreportPastYear].[Report]![txtStormDateCount]),"","("
& [rptSnowAnalysisSubreportPastYear].[Report]![txtStormDateCount] & ")")

where [rptSnowAnalysisSubreportPastYear].[Report]![txtStormDateCount] is the
running sum control in the detail section of the subreport.

If I run this subreport as a stand alone report,
([rptSnowAnalysisSubreportPastYear].[Report]![txtStormCount] displays the
correct number.

The only other thing I can think of is you are using A97 or
earlier (or maybe A2K?) and you have code in a report header
event that references the report footer total text box.

If that's not the case, then maybe(?) your main report text
box is not in the same section as the subreport.

--
Marsh
Jan 28 '07 #4

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

8 posts views Thread by Armando | last post: by
reply views Thread by comp.lang.php | last post: by
6 posts views Thread by Brett Barry: Go Get Geek! | last post: by

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.