Clear the Content of ReportViewer? RRS feed

  • Question

  • Hi all!


    I hope I'm asking a silly question but I've not been able to figure it out. I have a report viewer showing a report, and for a given condition, I need to clean the content (stop previewing the report) of the viewer. At the moment I'm using:


    viewer.ServerReport.ReportPath = "";



    This actually works (erases the content) but the viewer is going to show a message that says "The source of the report definition has not been specified". How can I accomplish this without showing the message ? 



    Thursday, May 20, 2010 2:28 PM


  • Try the ReportViewer.Clear() method.
    Brad Syputa, Microsoft Reporting Services This posting is provided "AS IS" with no warranties.
    Thursday, May 20, 2010 9:44 PM

All replies