Topic:Access Report - Summing the results of a Detail text box Remainpoint:0
   
PostTime:12/16/2008 11:35:22 AM FloorTop
Lv is 1
Avatar
Level:
1
Professional point:
5
Experience:
19
Thread:
290
Post:
993
Total online time:
19M
Joined date:
4/28/2007 11:08:00 PM
Last Visit:
12/17/2008 12:44:18 AM
Status:
Offline
I created a text box named "DaysToApprvd" in the detail section that says "=IIf([ApprvdDecld]="Approved",[DateApprvdDeclined]-[DateRcvd],""). This, of course, tells me the number of days from which it was received to which it was approved. I get a list of numbers, for example:

2
5
7
2
I would now like to sum these numbers in the group footer so that I would see a total of 16 (the sum of the above numbers). I thought "=Sum([DaysToApprvd])" would do it. However, I get the message "The Microsoft Jet database engine does not recognize '[DaysToApprvd]' as a valid field name or expression."

Help!
 
     
   
Gender PostTime:12/16/2008 11:37:26 AM Point:0 | Floor# 1
Lv is 1
portrait
Level:
1
Professional point:
38
Experience:
20
Thread:
263
Post:
936
Total online time:
20M
Joined date:
4/28/2007 10:44:00 PM
Last Visit:
12/17/2008 12:58:22 AM
Status:
Offline
Well, if you only have one group, you would get the same answer. However, I think this may be a data type issue. I imagine those fields [DateApprvdDeclined] and [DateRcvd] are Date data types, yes? Somewhere in there, you're having an implicit type conversion from a number data type to text. That is, the FalsePart of your IIf is a zero-length string instead of a number. That shouldn't necessarily cause problems, but it might.

Like I said, though, I'm no good with reports. Obviously it's pulling the last value only instead of the entire group. Is there any chance you could upload a dummy copy?

chris.
 
     
   
Gender PostTime:12/16/2008 3:14:29 PM Point:0 | Floor# 2
Lv is 1
portrait
Level:
1
Professional point:
46
Experience:
1
Thread:
287
Post:
926
Total online time:
1M
Joined date:
4/28/2007 11:03:00 PM
Last Visit:
12/17/2008 12:22:57 AM
Status:
Offline
That idea appears to be trying to work. However, it only adds the last number if there is a last number. In other words, if I have a column of numbers:

2
4
3
6
It will give me an answer of 6. Of course, I should get an answer of 15. If I have a column of numbers:
2
4
3
(blank)
It will give no answer. I should get an answer of 9.

Also, it makes no difference if I set it to Over Group or Over All, I get the same answers.

Grrrr
 
     
   
Gender PostTime:12/16/2008 7:02:57 PM Point:0 | Floor# 3
Lv is 1
portrait
Level:
1
Professional point:
0
Experience:
11
Thread:
265
Post:
940
Total online time:
11M
Joined date:
4/28/2007 10:35:00 PM
Last Visit:
12/16/2008 11:40:39 PM
Status:
Offline
Sum is a scalar function used in SQL queries. What you want is a running sum, which is particular to reports. In the group footer textbox control with which you wish to display the sum, do the following:
  • Open the control's Properties window.
  • Under the Data tab, set the Running Sum property to Over Group.
  • Again, under the Data tab, set the Control Source property to equal the name of the group control you want to sum. In your case,
    =[DaysToApprvd]
  • Save your report and preview it to see if this works for you.
I'm no great shakes with reports, so this is just a guess. But give it a try on a copy of your report.

chris.
 
     
1

Sorry, you are not login, click here to login

 

About us | Advertise | Contact us | Partner | Bug Report|Suggesting box|Donation
Home | Forum | Affiliate program| Remote help | Setting | Search | Document | Help | Download|Message

 

Start new topicAdvanced search
Your location: Database -> Access