Posting a subreport in the report footer


03-08-2010, 2:40 PM
First of all, I am fairly new to AR 3.0, so perhaps I'm just overlooking the obvious here.

There is a need in our office to report on the results of an internal survey over a given timeframe. I've created the report that gives the scores back for each of the 10 questions from each customer. Now I'm trying figure out how to put the average rating (or grade) in the report footer based on these results.

It seems to me that this should be fairly straightforward. Can anyone point me in the right direction?

Re: Posting a subreport in the report footer


03-09-2010, 12:10 AM
Hello,

I am assuming that your report structure would be like:

- PageHeader
    - GroupHeader --> bound with customer unique field
        -Detail
    - GroupFooter
- PageFooter

And you want to find the average for each customer. If this is the said scenario then I suggest you to add a textbox in the GroupFooter of your report and set the following properties for this textbox.

Me.TextBox1. DataField: the field that you want to summarize
Me.TextBox1.SummaryFunc = DataDynamics.ActiveReports.SummaryFunc.Avg
Me.TextBox1.SummaryGroup = "GroupHeader1"  ‘GroupName
Me.TextBox1.SummaryRunning = DataDynamics.ActiveReports.SummaryRunning.Group
Me.TextBox1.SummaryType = DataDynamics.ActiveReports.SummaryType.SubTotal

For more information you may check this link.

Regards,
Ankit Nigam


Re: Posting a subreport in the report footer


03-09-2010, 6:42 AM
Yes, but that is only half the battle. The challenge is that once we have found the averages per customer, we'd like to find the overall average of the entire report.

Re: Posting a subreport in the report footer


03-09-2010, 10:08 PM
Hello,

To find the overall avg. you need to use 2 global variables, one to calculate the total avg and other to calculate the total number of customers. Please find attached sample which implements the desired behavior.

I hope it helps.

Regards,
Ankit Nigam