none
Index was out of range - ReportViewer bug for BindingSource.Filter RRS feed

All replies

  • Here's how I modified the code to work using info from 'UV protector': http://social.msdn.microsoft.com/forums/en-us/vsreportcontrols/thread/392FCDFC-7724-49C9-8AFA-7CAD84E5EEAA

    QryBindingSource.Filter = FilterStr

    If QryBindingSource.Count = 0  then

    rows =0

    Else

    Dim filteredTable as DataTable

    Dim currDataRowView as DataRowView

    currDataRowView = QryBindingSource.Current

    filteredTable = currDataRowView.DataView.ToTable

    Me.ReportViewer1.LocalReport.ReportPath = "\reports\report2.rdlc"

    Me.ReportViewer1.LocalReport.DataSources.Add(New Microsoft.Reporting.WinForms.ReportDataSource("PharmDataSet_qry", filteredTable))

    rows=QryTableAdapter.FillByDate(PharmDataSet.qry, gblVariables.StartDate, gblVariables.EndDate)

    End If

    if rows > 0 then

    Me.ReportViewer1.RefreshReport()

    Else

    MsgBox ("Sorry, no Data available", MsgBoxStyle.OkOnly)

    Me.Close()

    End If

    But curious as why initial code errors?

    Thanks


    • Edited by Mr.Kris Wednesday, March 7, 2012 3:25 PM filtered row count
    Wednesday, March 7, 2012 3:07 PM