monthly crosstab - query or report?

Happy YN

Registered User.
Local time
Today, 18:50
Joined
Jan 27, 2002
Messages
425
My table consists of 3 fields,student,date,value. Each time a student pays, its value is recorded along with the date (as a serial number). I now wish to produce a report listing the student names across as headers (there are not more than 10) and then calculate 2 summary values for each month - Sum and count. Ideally the summary values should be next to each other, but if not then below each other. The months should be arranged in order.
I managed to make a crosstab query but have 2 problems.

Firstly one cannot have such a query containing both Sum & Count

Secondly how to arrange the months in correct order since to show them by their names, I must use format(serialDate,"mm/yyyy") which turns them into a string. but as soon as I add the serial numbers into the query its is not grouped per month anymore and I cannot hide the date field.
Maybe I'm supposed to do the calculations in the report? and how?
Maybe I should not use a crosstab query at all?
Thanks for any ideas
 
16 views and not one reply?!!!
Just pushing it up
Thanks
 
1. for the "SUM", do a Count of your count.... make sense? that is what I did, seems to work fine.

2. have a different RowHeading field that holds the Month number, and sortbased on that, and make sure that it is set to "not shown"

hope that helps
 
I don't think you realize the complexity of my situation
the table looks like this
John Jan05 50
John Jan 05 100
jill Jan 05 100
john Feb05 250
john Mar05 200
jill feb05 150
jill feb 05 200
jack feb05 600
jack feb05 200

My report should look like this

John Jill Jack
Jan05 150(2) 100(1) 0(0)
Feb05 250(0) 350(2) 850(2)
Mar05 200(1) 0(0) 0(0)

(This does not seem to look neat after submitting to forum! but it should have names along top, months down side, total and count at intersection)

The first number in the intersection is the total of that month for that person, the second number in brackets is the number of donations in that month

Can this calculation be done in a report or needs a query first
Thanks
 
Last edited:

Users who are viewing this thread

Back
Top Bottom