sum time in report based on Stored Procedure

G

Guest

..adp file ----

I have a report based on a Stored Procedure. I am able to get the time a
student spends in the lab each day.

I am unable to get an accumulated total in the report. ie:
2 hours on Day 1
4 hours on Day 2
 
D

David Lloyd

Suzanne:

Have you tried using the "Sorting and Grouping" feature to create a grouping
on each day and then calculating a total in the group footer? The following
KB article may be useful in calculating report totals, depending on your
exact circumstances.

http://support.microsoft.com/default.aspx?scid=kb;en-us;208850

--
David Lloyd
MCSD .NET
http://LemingtonConsulting.com

This response is supplied "as is" without any representations or warranties.


..adp file ----

I have a report based on a Stored Procedure. I am able to get the time a
student spends in the lab each day.

I am unable to get an accumulated total in the report. ie:
2 hours on Day 1
4 hours on Day 2
 
G

Guest

When I SUM in my group footer I get:

"Aggregate Functions are only allowed on output fields of the record source".

thanks for taking a shot at it.
 
D

Duane Hookom

What "SUM" expression did you try? Did you SUM expression use a field or
fields from the report's record source? That is what your error message
seems to be suggesting your issue is.
 
G

Guest

Hi Duane,

The SUM expression I am trying is:

=HoursAndMinutes(Sum([CheckOut]-[CheckIn]))

It works like a charm in my .mdb file. I get that aggregate in my .adp

HoursAndMinutes is a user defined function that I snagged from microsoft. I
am thinking that I might have to migrate that function to SQL and use it to
create a column that I can then sum. ....

thanks, Suzanne
 
D

Duane Hookom

The other option might be to subtract the In from the Out in the stored
procedure.

--
Duane Hookom
MS Access MVP
--

sack said:
Hi Duane,

The SUM expression I am trying is:

=HoursAndMinutes(Sum([CheckOut]-[CheckIn]))

It works like a charm in my .mdb file. I get that aggregate in my
.adp

HoursAndMinutes is a user defined function that I snagged from microsoft.
I
am thinking that I might have to migrate that function to SQL and use it
to
create a column that I can then sum. ....

thanks, Suzanne



Duane Hookom said:
What "SUM" expression did you try? Did you SUM expression use a field or
fields from the report's record source? That is what your error message
seems to be suggesting your issue is.
 
J

joel sitbon

HI guys

take a look at this
best regards
joel
sack said:
Hi Duane,

The SUM expression I am trying is:

=HoursAndMinutes(Sum([CheckOut]-[CheckIn]))

It works like a charm in my .mdb file. I get that aggregate in my
.adp

HoursAndMinutes is a user defined function that I snagged from microsoft.
I
am thinking that I might have to migrate that function to SQL and use it
to
create a column that I can then sum. ....

thanks, Suzanne



Duane Hookom said:
What "SUM" expression did you try? Did you SUM expression use a field or
fields from the report's record source? That is what your error message
seems to be suggesting your issue is.
 

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