or
Dim subRpt1 As ReportServer.subrptContacts = New ReportServer.subrptContacts
srContacts.ReportSource = subRpt1 Dim subRpt2 As ReportServer.subrptCFR = New ReportServer.subrptCFR srCFRs.ReportSource = subRpt2
sqlContacts.ConnectionString = strConn sqlContacts.SelectCommandType = SqlDataSourceCommandType.StoredProcedure sqlContacts.SelectCommand = "get_contacts"sqlContacts.Parameters.Add("@p_activity_id") sqlContacts.Parameters("@p_activity_id").Value = USER2 Me.DataSource = sqlContacts
subRpt2:
sqlCFRs.ConnectionString = strConn sqlCFRs.SelectCommandType = SqlDataSourceCommandType.StoredProcedure sqlCFRs.SelectCommand = "get_cfrs"sqlCFRs.Parameters.Add("@p_activity_id") sqlCFRs.Parameters("@p_activity_id").Value = USER2 Me.DataSource = sqlCFRs Why is the second subreport not using the dataset I am assigning???
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