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 = reportDim rp as new ReportProcessor, r as InvoiceReport, ms as MemoryStream for each itm in list( of items) r=New InvoiceReport rp.RenderReport("PDF", r, Nothing) 'database save code Select itm.SendFormat Case email,fax 'do email/fax processing with memory stresm Case paper rp.PrintReport(r,settings) End Select r.dispose ms.dispose