UtterAccess.com
X   Site Message
(Message will auto close in 2 seconds)

Welcome Guest ( Log In | Register )

 
Reply to this topicStart new topic
> Summary of Averages    
 
   
night_rider
post May 14 2008, 09:53 PM
Post #1

New Member
Posts: 5



My database is an analysis of survey results. The results are included in text strings from which values must be extracted. Responses may be extractable values, text string w/no value or null.

Query 1 - uses nested IIF functions to handle the nulls and text strings with no values and returns the value contained in the text strings

Query 2 - applies a true/false rule to Query 1 in order to distinguish replies in the top 2 of 10 values

Query 3 - feeds my report and averages different questions in Query 2 across differing dates or other divisions

The problem I have is when I get to my report I want to summarize a true average of all responses regardless of the grouping in the detail above but I keep averaging the averages instead of the full dataset. I'm a novice and would appreciate a push in the right direction. In advance, thanks.
Go to the top of the page
 
+
prebez
post May 15 2008, 02:48 AM
Post #2

UtterAccess Guru
Posts: 908
From: Copenhagen, Denmark



Welcome to UA night rider.

First you need to make sure that your query that feeds the report contain detail records and not group averages, as it seems your query three does. You need to apply your grouping/filtering on the report and not on the query that feeds it. In other words: let your report calculate the averages, not the query.

You then need to use the =Average(myField) function on BOTH group level footers (group averages) and the report footer (complete average).

Post back if you don't know how to create grouped reports.

HTH

Jock
Go to the top of the page
 
+
night_rider
post May 15 2008, 11:30 PM
Post #3

New Member
Posts: 5



I didn't know how to create grouped reports but I'm learning.

With your shove in the right direction I took Query 2 and made it the basis of the report. I placed all my fields in the Group Header I created. I placed copies of those field in the Report Footer and it worked perfectly.

I do have one further question. Is there a property or means of forcing the Report Footer to the bottom of the page?

Thanks again.
Go to the top of the page
 
+
prebez
post May 16 2008, 01:45 AM
Post #4

UtterAccess Guru
Posts: 908
From: Copenhagen, Denmark



Glad I could help night rider.

As for forcing the footer to the bottom of the page, I'd look into using the page footer, and somehow transfering data from the report footer to the page footer, AND only showing the page footer where a report ends (on the last page).

You'll need some coding to do this, which I alas do not have time for today. But take a gander at this. This is a very elegant way of knowing the total number of pages (and pages within each group, which is beyond your scope but very usefull if you want to force group footers to the bottom as well). This code can be used in to show/supress controls/sections (page footer in your example) on your report. My guess is that you'll need to:

1: Transfer the contents of the report footer to page footer under the on_format event of the detail section

2: Supress (hide) the page footer on all pages where Page <> Pages

Anyway, don't have time for details today.

Have a nice weekend

Jock
Go to the top of the page
 
+

Thank you for your support! Reply to this topicStart new topic

Jump To Forum:
 



RSS Go to Top  ·  Lo-Fi Version Time is now: 23rd May 2013 - 02:53 AM