the name of the report is called invoice and this is the sql i am using
and i
am hoping to use 7 columns
Firstname, surname, week1, week2, week3, week4, total
and i wish to open this invoice depending on the dates selected in a form
TRANSFORM
Abs(Sum(MondaySet))+Abs(Sum(TuesdaySet))+Abs(Sum(WednesdaySet))+Abs
(Sum(ThursdaySet))+Abs(Sum(FridaySet)) AS [Week Total]
SELECT Student.StudentID, Student.FirstName, Student.Surname,
School.SchoolID,
School.Name, Student.Billing, BillingUnionQry.Address, BillingUnionQry.
PostCode, BillingUnionQry.PhoneNo, BillingUnionQry.Fax,
Abs(Sum([MondaySet]))
+Abs(Sum([TuesdaySet]))+Abs(Sum([WednesdaySet]))+Abs(Sum([ThursdaySet]))+Abs
(Sum([FridaySet])) AS Total
FROM Attendance, School, Centre, Student, BillingUnionQry
WHERE (((Attendance.StudentID)=[Student].[StudentID]) AND
((Student.Centre)=
[Centre].[CentreID]) AND ((Student.School)=[School].[SchoolID]) AND
((Student.
Billing)=[BillingUnionQry].[Name]))
GROUP BY Student.StudentID, Student.FirstName, Student.Surname, School.
SchoolID, School.Name, Student.Billing, BillingUnionQry.Address,
BillingUnionQry.PostCode, BillingUnionQry.PhoneNo, BillingUnionQry.Fax,
School.Address, School.PostCode, School.PhoneNo, School.Fax, Student.
StudentID
PIVOT Format([Week],'Short Date');
Duane said:
Why/how are you changing the record source of the report? Consider
"fixing"
the column headings by using relative dates rather than changing dates.
If you want more information, come back with
-the name of your open form
-the SQL of your crosstab query
-the number of columns you expect to display
Thanks for ur advice Duane
[quoted text clipped - 18 lines]
the week as names. Dates should be values stored in fields, not field
names.