Crosstab Help

N

Newbie

Hi,

I have the following query - see below

I want a report that is based on week number - the actual week number needs
to be on the report.

I have written a query that inserts all the relevant records into a table
incl. the week number where it substitues anything that is older than 12
weeks before the entered date as a week 0
eg. date = 19/5/04 = week 21
date = 23/2/04 = week 0

I want my report to display 12 weeks prior to the date entered on a form
plus the Week 0

At the moment if a particular week doesn;t have any data it is missed out
completely.

How can I ensure that all 12 weeks will be reported?

Here is the crosstab query that I have

PARAMETERS [forms]![frmMetalRequirements]![dtpDateTo] DateTime;
TRANSFORM Sum(tblMatlSchedule.OSQtyReqd) AS SumOfOSQtyReqd
SELECT tblMatlSchedule.JobNo, tblMatlSchedule.Stockcode,
tblMatlSchedule.StartDate, Sum(tblMatlSchedule.OSQtyReqd) AS [Total Of
OSQtyReqd]
FROM tblMatlSchedule
GROUP BY tblMatlSchedule.JobNo, tblMatlSchedule.Stockcode,
tblMatlSchedule.StartDate
PIVOT tblMatlSchedule.WeekNo;
 

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

Similar Threads

Crosstab Report and query 4
Crosstab Query Help 1
crosstab query? 12
Crosstab Query Omitting Some Items 1
Crosstab Query by Week with Dates as Headers 5
Crosstab query 4
Crosstab 4
Numbering....??? 7

Top