I have a report that is based off of a cross tab query. The cross tab query is based off a query which takes the date parameters from the report. The spelling of the controls are correct. But when I run the report I get 2 errors where the date is supposed to be displayed.
Base Query SQL:
CrossTab Query SQL:
As you can see I declare my parameters in both queries, and they are not mis-spelled (unless I have overlooked that for the last 3 hours).
Any idea's?
Base Query SQL:
Code:
PARAMETERS Reports![QuarterlyIncidentTypeReport]![StartDate] DateTime, Reports![QuarterlyIncidentTypeReport]![EndDate] DateTime;
SELECT [Incident_MasterListLT].[Incident Code], [Incident_MasterListLT].[Incident Type], [CHASI_ProgramsLT].[Region], [Incident_Registration].[Incident_Date], [Incident_Registration].[Incident_ID]
FROM CHASI_ProgramsLT INNER JOIN (Incident_Registration INNER JOIN (Incident_MasterListLT RIGHT JOIN Incidents ON [Incident_MasterListLT].[Incident Code]=[Incidents].[Incident_Code]) ON [Incident_Registration].[Incident_ID]=[Incidents].[Incident_ID]) ON [CHASI_ProgramsLT].[TierID]=[Incident_Registration].[Reporter_Program_ID]
WHERE ((([Incident_MasterListLT].[Incident Code])<>"") And (([Incident_Registration].[Incident_Date]) Between [Reports]![QuarterlyIncidentTypeReport]![StartDate] And [Reports]![QuarterlyIncidentTypeReport]![EndDate]))
ORDER BY [Incident_MasterListLT].[Incident Code];
CrossTab Query SQL:
Code:
PARAMETERS Reports![QuarterlyIncidentTypeReport]![StartDate] DateTime, Reports![QuarterlyIncidentTypeReport]![EndDate] DateTime;
TRANSFORM IIf(Count([Incident_ID]) Is Null,0,Count([incident_ID])) AS Expr1
SELECT [Incident Type Query].[Incident Code], [Incident Type Query].[Incident Type], Count([Incident Type Query].[Incident_ID]) AS Total
FROM [Incident Type Query]
GROUP BY [Incident Type Query].[Incident Code], [Incident Type Query].[Incident Type]
PIVOT [Incident Type Query].[Region] In ("Metropolitan","Mid Central","Northern","NW Suburban","Southern");
As you can see I declare my parameters in both queries, and they are not mis-spelled (unless I have overlooked that for the last 3 hours).
Any idea's?