Does partial rendering need to be disabled for an SSRS report

635 Views Asked by At

The ASP.NET site that I'm doing some work on has a few SSRS reports as pages. For every one of these pages (but not for any of the others), the master page's RadMenu dropdown doesn't work, and it appears to be because the Report View page is disabling partial rendering through the script manager on the Page_Init event.

Unfortunately, the original developer isn't available anymore and no one here seems to know for sure why partial rendering was disabled. Nothing seems to break if I do enable partial rendering, but that seems like poor justification given how deliberately the choice seems to have been.

This is the code for the Page_Init event:

    protected void Page_Init(object sender, EventArgs e)
    {
        ScriptManager sm = ScriptManager.GetCurrent(this);
        if (sm != null)
        {
            sm.EnablePartialRendering = false;
        }
    }

The RadMenu is on my master page and looks like this:

    <telerik:RadMenu ID="MasterPageMenu" runat="server" Height="20px" Style="top: 0px;
        left: 0px;" Width="100%" CssClass="RadMenuLevel" EnableRoundedCorners="True"
        OnItemDataBound="MasterPageMenu_ItemDataBound" OnClientItemClicking="onClicking"
        DataTextField="title" DataNavigateUrlField="url">
        <DefaultGroupSettings OffsetX="11" OffsetY="2" />
    </telerik:RadMenu>

All of the reports use a ReportViewer.aspx page to load, below is the code:

        <%@ Page Title="Reports" Language="C#" MasterPageFile="~/HPTS.Master"       AutoEventWireup="true"
        CodeBehind="ReportViewer.aspx.cs" Inherits="HPTS.HPTSAdmin.ReportViewer" %>

    <%@ Register Assembly="Microsoft.ReportViewer.WebForms, Version=9.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a"
        Namespace="Microsoft.Reporting.WebForms" TagPrefix="rsweb" %>
    <asp:Content ID="Content1" ContentPlaceHolderID="head" runat="server">
        <style type="text/css">
            .heightTest
            {
                height: auto;
            }
            .fullheight
            {
                margin-bottom: 120px;
            }
            #testdiv
            {
                display:table;
                width:1250px;
                height:auto;
            }
        </style>

        <script language="JavaScript" type="text/JavaScript">

    window.onload=function resize(){

    var viewer = document.getElementById("testdiv");

    var htmlheight = document.documentElement.clientHeight;

    viewer.style.height = (htmlheight - 120) + "px";

    }

        </script>

    </asp:Content>
    <asp:Content ID="Content2" ContentPlaceHolderID="cphHPTS" runat="server">
        <telerik:RadAjaxManagerProxy ID="RadAjaxManagerProxyforReports" runat="server">
            <AjaxSettings>
                <telerik:AjaxSetting AjaxControlID="ReportViewerControl">
                    <UpdatedControls>
                        <telerik:AjaxUpdatedControl ControlID="ReportViewerControl" />
                    </UpdatedControls>
                </telerik:AjaxSetting>
            </AjaxSettings>
        </telerik:RadAjaxManagerProxy>
        <div id="testdiv" style="width: 100%">
            <br />
            <rsweb:ReportViewer ID="ReportViewerControl" runat="server" Font-        Names="Verdana"
                Font-Size="8pt" ProcessingMode="Remote" CssClass="fullheight" Height="8.5in"
                Width="100%" SizeToReportContent="true">
                <ServerReport ReportPath="" ReportServerUrl="" />
            </rsweb:ReportViewer>
        </div>
    </asp:Content>
1

There are 1 best solutions below

0
On BEST ANSWER

I had enabled partial rendering and deployed the change to our QA instance and our Staging instance, and having partial rendering enabled did not have any negative impact on the page, so it appears that there's not an issue.