Group totals in dynamic report

M

mrashid

I have a report that dynamically gets control source for five columns based
on user input through a form. The report successfully shows text boxes
(currency format) with approporiate fields (control source) and respective
data. I then have unbound text boxes for each of the five columns to show
group totals. I haven't been able to get it working. For example, one of the
text boxes' name is txtPeriod1 and based on user selection the field is
MAY_PYR. The group total should show Sum(MAY_PYR); it works through hard
coding but not dynamically and keeps prompting to enter "txtPeriod1"
parameter. Please suggest solution. Thanks in advance!
 
D

Duane Hookom

Not enough information...
Are the dynamic columns derived based on months?
Why are they dynamic?
How do you get and set the record source of the report?
 
A

Allen Browne

Presumably you are using Report_Open to assign the ControlSource of the text
boxes, based on the actual field names.

You can also assign the ControlSource of the total box in the group footer,
e.g.:
Me.Total0.ControlSource = "=Sum([Field99])"
 
M

mrashid

Thanks folks. I actually got it working using Domain Sum. Sorry for delayed
reply.

Thanks again!

Allen Browne said:
Presumably you are using Report_Open to assign the ControlSource of the text
boxes, based on the actual field names.

You can also assign the ControlSource of the total box in the group footer,
e.g.:
Me.Total0.ControlSource = "=Sum([Field99])"

--
Allen Browne - Microsoft MVP. Perth, Western Australia

Reply to group, rather than allenbrowne at mvps dot org.


mrashid said:
I have a report that dynamically gets control source for five columns
based
on user input through a form. The report successfully shows text boxes
(currency format) with approporiate fields (control source) and respective
data. I then have unbound text boxes for each of the five columns to show
group totals. I haven't been able to get it working. For example, one of
the
text boxes' name is txtPeriod1 and based on user selection the field is
MAY_PYR. The group total should show Sum(MAY_PYR); it works through hard
coding but not dynamically and keeps prompting to enter "txtPeriod1"
parameter. Please suggest solution. Thanks in advance!

.
 

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