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

ReportViewer in UpdatePanel in PanelBar not working

6 Answers 201 Views
PanelBar
This is a migrated thread and some comments may be shown as answers.
Jeremy
Top achievements
Rank 1
Jeremy asked on 13 Nov 2014, 10:19 PM
I'm trying to load a ReportViewer report inside a RadPanelItem on a RadPanelBar_ItemClick event so that it doesn't load on pageload but only when the user expands that PanelItem.  This seems to work but it causes the page to postback and the user sees the screen refresh.  I'd like to avoid this by using an updatepanel.  But when I wrap the contents of my RadPanelItem in an updatepanel, I get the "Generating Report" and pinwheel but when it's done, nothing is displayed.

<telerik:RadPanelBar runat="server" ID="RadPanelBar" ExpandMode="MultipleExpandedItems" Width="100%" ExpandAnimation-Type="InBack" OnItemClick="RadPanelBar_ItemClick">
    <Items>
        <telerik:RadPanelItem Text="myReport" Value="myReport">
            <ContentTemplate>
                <div style="height: 500px">
                    <asp:UpdatePanel ID="UpdatePanel3" runat="server" style="width:100%">
                        <Triggers>
                           <asp:AsyncPostBackTrigger ControlID="RadPanelBar" />
                         </Triggers>
                        <ContentTemplate>
                            <telerik:ReportViewer ID="ReportViewer1" runat="server" Width="100%" Height="95%" ToolbarVisible="false"></telerik:ReportViewer>
                        </ContentTemplate>
                    </asp:UpdatePanel>
                </div>
            </ContentTemplate>
        </telerik:RadPanelItem>
    </Items>
</telerik:RadPanelBar>
 
 
 
protected void RadPanelBar_ItemClick(object sender, RadPanelBarEventArgs e)
{
    if (e.Item.Value == "myReport")
    {
        TheReport report01 = new TheReport();
        chargeReport.ReportParameters["ID"].Value = this._myID;
        ReportViewer1.ReportSource = report01;
        ReportViewer1.Visible = true;
    }
}

I could be just missing something simple but I've been looking at this for a while now and nothing.

6 Answers, 1 is accepted

Sort by
0
Stef
Telerik team
answered on 18 Nov 2014, 04:18 PM
Hi Jeremy,

The supported AJAX scenarios with the ASP.NET ReportViewer are listed in the AJAX support help article. Please compare your settings, check the server's logs for any errors on displaying the report.

If you need further help, please open a support ticket and send us a demo project with the report.

Regards,
Stef
Telerik
 

Check out the Telerik Platform - the only platform that combines a rich set of UI tools with powerful cloud services to develop web, hybrid and native mobile apps.

 
0
Jeremy
Top achievements
Rank 1
answered on 18 Nov 2014, 07:36 PM
I followed the two examples in the link you posted.  Neither of them worked.  I did discover something.  If I removed the ToolbarVisible="false" property, the report would display with a very poorly formatted toolbar.  With the toolbar, the report displays.  Without the toolbar, report does not display.  The user shouldn't have a toolbar when viewing this report.


0
Stef
Telerik team
answered on 20 Nov 2014, 04:33 PM
Hello Jeremy,

Please test the suggestions listed in the The styles of the web report viewer's toolbar are messed up KB article.

If none of them helps you to resolve the problem, please open a support ticket to Telerik Reporting and send us a demo project to check your settings.

Regards,
Stef
Telerik
 

Check out the Telerik Platform - the only platform that combines a rich set of UI tools with powerful cloud services to develop web, hybrid and native mobile apps.

 
0
Jeremy
Top achievements
Rank 1
answered on 20 Nov 2014, 05:26 PM
Hi Stef, thanks for the reply.  I'll take a look at these steps.  Hopefully this will solve my problem.  However, this support article seems to be focused on making the toolbar look better.  I don't want it to look better.  I want to not have to display it and still get the report to display in an update panel.  It works when it's not in an update panel but doesn't display the report in the update panel.  It works in the update panel if the toolbar is visible but doesn't work if the toolbar is invisible.  Doesn't seem to be a toolbar styling issue to me.
0
Stef
Telerik team
answered on 21 Nov 2014, 04:49 PM
Hi Jeremy,

The report is rendered as HTML, where the additional resources as images, CSS are served by the Telerik.ReportViewer.axd handler. Thus the settings in the provided KB article relate to both the ASP.NET ReportViewer and its content. Once the Toolbar is loaded correctly, the report must be loaded as well.

In case the settings do not help you, send us a demo project to test it at our end. Include also details about the tested browsers.

Regards,
Stef
Telerik
 

Check out the Telerik Platform - the only platform that combines a rich set of UI tools with powerful cloud services to develop web, hybrid and native mobile apps.

 
0
n/a
Top achievements
Rank 1
Veteran
answered on 09 Jul 2020, 03:20 PM
I have the same issue as Jeremy.  If you use a Button, as in the Telerik Demo http://www.telerik.com/help/reporting/asp-net-report-viewer-ajax.html, it works, however, using the onItemClick event as part of the RadAjaxManger does not work.  Button and PanelBar Click Events do not work the same.  Button will trigger the Report to Refresh, however, PanelBar ItemClick will not.
Tags
PanelBar
Asked by
Jeremy
Top achievements
Rank 1
Answers by
Stef
Telerik team
Jeremy
Top achievements
Rank 1
n/a
Top achievements
Rank 1
Veteran
Share this question
or