Group totals in dynamic report

  • Follow


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!
0
Reply Utf 4/26/2010 8:05:01 PM

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?

-- 
Duane Hookom
Microsoft Access MVP


"mrashid" wrote:

> 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!
0
Reply Utf 4/26/2010 9:45:01 PM


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
Tips for Access users - http://allenbrowne.com/tips.html
Reply to group, rather than allenbrowne at mvps dot org.


"mrashid" <mrashid@discussions.microsoft.com> wrote in message 
news:9A72E7FA-8E52-46F3-B28A-1C49E7C52DD4@microsoft.com...
> 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! 

0
Reply Allen 4/27/2010 3:43:42 AM

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

Thanks again!

"Allen Browne" wrote:

> 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
> Tips for Access users - http://allenbrowne.com/tips.html
> Reply to group, rather than allenbrowne at mvps dot org.
> 
> 
> "mrashid" <mrashid@discussions.microsoft.com> wrote in message 
> news:9A72E7FA-8E52-46F3-B28A-1C49E7C52DD4@microsoft.com...
> > 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! 
> 
> .
> 
0
Reply Utf 6/7/2010 9:34:24 PM

3 Replies
422 Views

(page loaded in 1.181 seconds)

Similiar Articles:
















7/22/2012 11:10:01 AM


Reply: