Want total for detail section subreports in section header?

M

Max Moor

Hi All,
I have a report with two subreports in it's detail section. These
each report on sales in their areas. I have a textbox in the header for
the group level above the detail with the following, rather messy, control
source:

=IIf(Reports!rptMain!rsub1.Report.HasData, Reports!rptMain!rsub1!txtSum,0)
+ IIf(Reports!rptMain!rsub2.Report.HasData, Reports!rptMain!rsub2!txtSum,0)

This makes sure each subreport has data, then, if so, gets the total
out of a textbox on each.

This works on every group except the first one on the report. For
that first group, the total in the group header is always 0. I put a text
box in the detail section with the same control source, and it totals fine,
even on the first group. The header just doesn't get it.

I assume this has something to do with when formatting and such is
done on the first group of a report, but I don't know what to do about it.
Can anyone help me make this work?

- Max
 

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