or
SELECT REJECT_REPORT.VENDOR, COUNT(DISTINCT REJECT_REPORT.REJECT_ID) AS QTY_RRs, RR_CATEGORY.CATEGORY, @startDate AS STARTDATE, @endDate AS ENDDATEFROM REJECT_REPORT LEFT OUTER JOIN RR_CATEGORY ON REJECT_REPORT.CATEGORY = RR_CATEGORY.CATEGORY_IDWHERE (REJECT_REPORT.OCCURENCE_DATE BETWEEN @startDate AND @endDate)GROUP BY REJECT_REPORT.VENDOR, RR_CATEGORY.CATEGORY, REJECT_REPORT.CATEGORYReportViewer1.Report.ReportParameters("@endDate").Value =frmDateInput.dtpEnd.Value.ToShortDateString
Dim report As New CategoryReport report.ReportParameters.Add("@startDate", Telerik.Reporting.ReportParameterType.DateTime, "9/1/2010") report.ReportParameters.Add("@endDate", Telerik.Reporting.ReportParameterType.DateTime, "9/30/2010") ReportViewer1.Report = report