Report Query parameter passing issue

Bain

Registered User.
Local time
Today, 09:12
Joined
Jan 5, 2005
Messages
11
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:
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?
 
I would rather not use form pop-up, and I know this method works, I have like 9 other reports that work this way.
 
I put 2 textboxes on the report, one for start date, and the other for end date.

The other ones are sub reports pulling the dates from the main report. And if I run this on as a sub report, it works fine. but doesnt seem to work as a stand alone report.
 

Users who are viewing this thread

Back
Top Bottom