In the calling application I am able to set the datasource of my subreport with:
Dim subRepItem2 As Telerik.Reporting.SubReport = TryCast(TryCast(ReportViewer1.Report, rptRemit).Items.Find("rptSubRemitTransactions", True)(0), Telerik.Reporting.SubReport)
subRepItem2.ReportSource.DataSource = ReportsDAL.RemitByTransDateHistory(
Me.txtStartingDate.SelectedDate)
I then try to customize the contents of a textbox based on the same report parameter but I get an error:
Dim txtbox As Telerik.Reporting.TextBox = TryCast(subRepItem2.Items.Find("txtTotalSince", True)(0), Telerik.Reporting.TextBox)
txtbox.Value =
"Total Since " & Me.txtStartingDate.SelectedDate.ToString
The error is:
System.IndexOutOfRangeException: Index was outside the bounds of the array.
Help please!