none
Control "ReportViewer" of type "UpdatePanel" must be placed inside a form tag with runat=server.

    Question

  • Hi,

    My requirement here is to show the saved reports (from database) in the "Dashboard.aspx" page.

    Example:

    When user1 logged in the application, he has to see his saved (10 reports) in the page.

    When user2 logged in the application, he has to see his saved (5 reports) in the page.

    This saved reports information will be saved in the database.

    As this report count is not fixed, need to add report viewers dynamically and below is the code for adding report viewers dynamically. 

    ReportViewer rptVwr = new ReportViewer();
    this.Controls.Add(rptVwr);

    When I run the application with the above code, getting the error saying

    "Control "ReportViewer" of type "UpdatePanel" must be placed inside a form tag with runat=server. "

    If i comment above two lines of code and place one report viewer in the design, able to run the report successfully but this report viewer will show only one report.

    I don't understand what is the need of updatepanel control to show the reports in the report viewer.

    Version: VS 2010, SQL 2008 R2

    Please let me know if you need any further information.

    Regards,


    Raj



    • Edited by Raju Kotla Monday, February 27, 2012 11:26 AM
    • Moved by Challen FuModerator Wednesday, February 29, 2012 6:16 AM move for better support (From:SQL Server Reporting Services)
    Monday, February 27, 2012 11:21 AM

All replies

  • Did you check the forum post:? http://forums.asp.net/t/1044194.aspx/1

    Additional references:

    http://msdn.microsoft.com/en-us/library/ee960138.aspx#AJAX <AJAX Support in the ASP.NET Web Server Control>

    http://blogs.msdn.com/b/brianhartman/archive/2009/06/18/where-s-the-new-report-viewer.aspx <Whats new in ReportViewer>

    Please make sure you install the latest patches for Visual Studio 2010, and ReportViewer control.

    Hope this helps.


    Chaitanya( Twitter | Blogs )

    Any documentation bug? Tell us about it at Connect. Please feel free to add any community comments in any of the MSDN/technet articles.
    This posting is provided "AS IS" with no warranties, and confers no rights.

    Monday, February 27, 2012 11:46 AM
  • Hi Chaitanya,

    Thanks for your quick response.

    Can you suggest the CU to be installed in order to fix the issue?

    Present version we are using:

    Microsoft Visual Studio 2010 Version 10.0.40219.1 SP1 Rel

    Microsoft .NET framework version 4.0.30319. SP1 Rel

    Regards,


    Raj

    Monday, February 27, 2012 12:23 PM
  • Looks like you are on the latest build, but am not too sure about that, you can check : http://msdn.microsoft.com/en-us/vstudio/aa718359

    can you check your reportviewer version also: http://www.microsoft.com/download/en/details.aspx?id=6442


    Chaitanya( Twitter | Blogs )

    Any documentation bug? Tell us about it at Connect. Please feel free to add any community comments in any of the MSDN/technet articles.
    This posting is provided "AS IS" with no warranties, and confers no rights.

    Monday, February 27, 2012 1:11 PM
  • Please have a try to set AsyncRendering=false. It's default value is true

    [DefaultValueAttribute(true)] 

    Please let me explain the theory background. When you set it to true, it will be run on AJAX mode, it means it need to be registered in ajax update panel.

    Hope it helps


    Regards, Nighting Liu

    Monday, February 27, 2012 1:44 PM
  • Hi Nighting Liu,

    Thanks for the response.

    There is no luck even though we set the property, AsyncRendering=false. Please let me know if I miss anything.

    Code:

    ReportViewer rptVwr = new ReportViewer();
    this.Controls.Add(rptVwr);
     rptVwr.AsyncRendering = false;

    Regards,


    Raj


    • Edited by Raju Kotla Tuesday, February 28, 2012 4:28 AM
    Tuesday, February 28, 2012 4:28 AM
  • Help this article can help you

    ReportViewer inside UpdatePanel not working


    Regards, Nighting Liu

    Tuesday, February 28, 2012 4:51 AM
  • Hi Nighting Liu,

    I'm not using any updatepanel control in my aspx page, then there is no question of "Reportviewer inside Updatepanel not working". Correct?

    Regards,


    Raj

    Wednesday, February 29, 2012 3:09 AM
    1. You are using SharePoint 2010 or SharePoint 2007?
    2. You are using ReportViewer 9.0.0.0 or 10.0.0.0?
    3. Do you ever added AjaxManager or ScriptManager in you aspx page?

    Can you show me your aspx file to contain that ReportViewer?


    Regards, Nighting Liu


    • Edited by Nighting Liu Wednesday, February 29, 2012 4:05 AM
    Wednesday, February 29, 2012 3:56 AM
    1. You are using SharePoint 2010 or SharePoint 2007?  SharePoint 2010
    2. You are using ReportViewer 9.0.0.0 or 10.0.0.0? 10.0.0.0
    3. Do you ever added AjaxManager or ScriptManager in you aspx page? Yes. addded ScriptManager

    Please let me know if you need any other information.

    Regards,


    Raj

    Wednesday, February 29, 2012 10:40 AM
  • The issue is that you are adding reportviewer  directly to the Page rather than to a container .

    Can you confirm what is "this" in your code below? I suspect this = Page object which will not work. 

    ReportViewer rptVwr = new ReportViewer();
    this.Controls.Add(rptVwr);

    Use data container such as form or div with server tag and let me know if the error goes away.

    • Proposed as answer by SHS1 Thursday, March 01, 2012 9:51 PM
    Thursday, March 01, 2012 9:32 PM