none
reset causes "The source of the report definition has not been specified" RRS feed

  • Question

  • I am using VS 2005 report viewer control. without the call of  this.reportViewer.Reset(), the report works fine, but after I add reset call, it has the following error: "The source of the report definition has not been specified".

    Here is the source code:

    this

    .reportViewer.Reset();

     

     

     

    this.reportViewer.ProcessingMode = ProcessingMode.Local;

     

    this.reportViewer.LocalReport.ReportPath = @"C:\test.rdlc";
     

     

    Microsoft.Reporting.WinForms.ReportDataSource reportDataSource = new Microsoft.Reporting.WinForms.ReportDataSource();

     

    reportDataSource.Name = dataSourceName;//
     

     

    reportDataSource.Value = dataSource;//
     

     

     

     

    this.reportViewer.LocalReport.DataSources.Clear();

     

    this.reportViewer.LocalReport.DataSources.Add(reportDataSource);

    this

     

    .reportViewer.RefreshReport

    ();

     
    Thursday, July 14, 2011 8:20 PM