This is a migrated thread and some comments may be shown as answers.

Telerik ReportViewer failing inASP.NET UpdatePanel

1 Answer 120 Views
General Discussions
This is a migrated thread and some comments may be shown as answers.
Snehal
Top achievements
Rank 1
Snehal asked on 10 Mar 2017, 11:04 AM

Hi,

I am trying to use Telerik ReportViewer with ASP.NET UpdatePanel but getting below error when I trigger update request.
I also tried using Telerik RadAjaxManager but the result is the same.

Below is my Page and its Code Behind. I a using Internet Explorer 11 (11.0.9600)
I have added both UpdatePanel and RadAjaxManager with different ReportViewer and trigger buttons.

.aspx 

<!DOCTYPE html>

<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
    <title></title>
</head>
<body>
    <form id="form1" runat="server">
        <div>
            <table>
                <tr>
                    <td>Report</td>
                </tr>
                <tr>
                    <td>

                        <asp:ScriptManager ID="ScriptManager1" runat="server" />
                        <asp:Button ID="Button1" runat="server" Text="Button" OnClick="Button1_Click" />
                        <asp:UpdatePanel ID="UpdatePanel1" runat="server">
                            <Triggers>
                                <asp:AsyncPostBackTrigger ControlID="Button1" />
                            </Triggers>
                            <ContentTemplate>
                                <telerik:ReportViewer runat="server" ID="rptViewerTest"></telerik:ReportViewer>

                            </ContentTemplate>
                        </asp:UpdatePanel>

                    </td>
                    <td>
                        <hr />
                    </td>
                    <td>
                        <asp:Button ID="Button2" runat="server" Text="Button" OnClick="Button2_Click" />
                      
                         <telerik:ReportViewer ID="ReportViewer1" runat="server"></telerik:ReportViewer>
                         <telerik2:RadAjaxManager ID="RadAjaxManager1" runat="server">
                          <AjaxSettings>
                            <telerik2:AjaxSetting AjaxControlID="Button2">
                              <UpdatedControls>
                                <telerik2:AjaxUpdatedControl ControlID="ReportViewer1"/>
                              </UpdatedControls>
                            </telerik2:AjaxSetting>
                          </AjaxSettings>
                    </telerik2:RadAjaxManager>
                    </td>
                </tr>
            </table>
        </div>
    </form>
</body>
</html>

Code behind :

 protected void Button1_Click(object sender, EventArgs e)
        {
            Telerik.Reporting.Report report = new EmployeeReport();
            rptViewerTest.Report = report;
            rptViewerTest.Visible = true;
        }

        protected void Button2_Click(object sender, EventArgs e)
        {
            Telerik.Reporting.Report report = new EmployeeReport();
            ReportViewer1.Report = report;
            ReportViewer1.Visible = true;
        }

 

Error message:

Error: Sys.WebForms.PageRequestManagerServerErrorException: Value cannot be null.
Parameter name: key

(PFA screenshot)

Can you please help.

Thanks,

Snehal

 

1 Answer, 1 is accepted

Sort by
0
Stef
Telerik team
answered on 10 Mar 2017, 12:34 PM
Hello Snehal,

Please check the avaScript runtime error: Sys.WebForms.PageRequestManagerServerErrorException: Value cannot be null KB article and test to run the application with disabled BrowserLink.

Also check the supported AJAX scenarios by the old ASP.NEt WebForms ReportViewer. Additionally, you should use the viewer's ReportSource property and a TypeReportSource to specify the report that will be displayed. Report Sources are introduced as of Q2 2012, and their purpose is to let you specify a report to be displayed, where the report can be built at run-time, by VS or Standalone Report Designer.


On a side note, the old ASP.NET WebForms ReportViewer is obsolete as of Q3 2015. We recommend the usage of the HTML5 Viewer - Migrate to the HTML5 Viewer from the old ASP.NET WebForms ReportViewer control. The HTML5 Viewer does not have to be ajaxified as it is updated via ajax requests served by an instance of Telerik Reporting REST services. The attached video illustrates how to use the HTML5 Viewer in a Web application. The video can be previewed in IE browser.

Regards,
Stef
Telerik by Progress
Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Feedback Portal and vote to affect the priority of the items
Tags
General Discussions
Asked by
Snehal
Top achievements
Rank 1
Answers by
Stef
Telerik team
Share this question
or