Report footer values equal to subreport footer values

  • Thread starter dp724 via AccessMonster.com
  • Start date
D

dp724 via AccessMonster.com

I have 3 crosstab subreports (BarChartData1, 2 & 3), each having a row of
text boxes (Tot7 thru Tot67) in the report footer which display column totals
generated through code in each report and each report is nested separately in
the report footer of a main report. Now, included in the report footer of the
main report, below the 3 subreports, are a 3 rows of textboxes, each row
should be should be an exact representation of the 'totals' row in each
subreport. Here's my problem...I tried setting up the control source for the
very first textbox to =[BarChartData1].[Report]![Tot7], but in preview
nothing shows up in the box; I can set it equal to the generated total of a
textbox in the main report itself, but I can't seem to get it equal to the
value of the appropriate subreport textbox. Can someone help me get this
solved?
 
G

Guest

That may be because of timing issues.
Depending on how your totals are generated (are the running totals generated
as the subreport runs, perhaps?), it might be that the tot7 textbox may not
get populated with data in your subreport(s) until after your main report
tries to grab the "current" value from it.
Perhaps you need to unbind the report controls and try to populate them with
data in code from one of the subreport _format or _Print events - or perhaps
in the report footers' _format or _print event?
 
G

Guest

We don't know how the text boxes are bound or valued in the subreport so it's
difficult to tell you how to fix the control on the main report. I would
expect that binding the subreport controls to fields with no coding in the
subreports would fix this issue.

--
Duane Hookom
Microsoft Access MVP


Mark Burns said:
That may be because of timing issues.
Depending on how your totals are generated (are the running totals generated
as the subreport runs, perhaps?), it might be that the tot7 textbox may not
get populated with data in your subreport(s) until after your main report
tries to grab the "current" value from it.
Perhaps you need to unbind the report controls and try to populate them with
data in code from one of the subreport _format or _Print events - or perhaps
in the report footers' _format or _print event?

dp724 via AccessMonster.com said:
I have 3 crosstab subreports (BarChartData1, 2 & 3), each having a row of
text boxes (Tot7 thru Tot67) in the report footer which display column totals
generated through code in each report and each report is nested separately in
the report footer of a main report. Now, included in the report footer of the
main report, below the 3 subreports, are a 3 rows of textboxes, each row
should be should be an exact representation of the 'totals' row in each
subreport. Here's my problem...I tried setting up the control source for the
very first textbox to =[BarChartData1].[Report]![Tot7], but in preview
nothing shows up in the box; I can set it equal to the generated total of a
textbox in the main report itself, but I can't seem to get it equal to the
value of the appropriate subreport textbox. Can someone help me get this
solved?
 
D

dp724 via AccessMonster.com

Mark,
Your suggestion intrigues me, if I follow you correctly, it is possible that
main report tries to "grab" the data from the subreport before it is
generated.
Duane,
As you may have imagined the totals row in each subreport is a row of unbound
text boxes, and thus calculated by code; and "binding" the subreport controls
is not an option.

I have resolved the issue by creating 3 copies of the subreports with
different names and hid the data I don't need displayed, leaving only the
totals row visible, then aligned the subreports to display as needed.

Thanks to all who may have given this some thought.

Duane said:
We don't know how the text boxes are bound or valued in the subreport so it's
difficult to tell you how to fix the control on the main report. I would
expect that binding the subreport controls to fields with no coding in the
subreports would fix this issue.
That may be because of timing issues.
Depending on how your totals are generated (are the running totals generated
[quoted text clipped - 17 lines]
 

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