C#报表查看器:布局无法处理类型为“ Microsoft.Reporting.WebForms.ReportViewer”的控件

时间:2018-08-09 11:59:17

标签: c# reportviewer ext.net

我想在这样的面板中显示报告:

<asp:Content ID="Content1" ContentPlaceHolderID="head" runat="server" ></asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder1" runat="server">
    <asp:ScriptManager ID="ScriptManager1" runat="server"/>
    <ext:ResourceManager runat="server" />
    <ext:Panel ID="Panel1" runat="server" Height="800" Layout="FitLayout">
            <Content>
                <rsweb:ReportViewer ID="ReportViewer1" runat="server" AsyncRendering="true" Width="100%"
                    OnInit="ReportViewer1_Init"
                    Font-Names="Verdana" SizeToReportContent="true"
                    ShowExportControls="true" ShowPrintButton="true" ShowBackButton="false" ShowFindControls="false"
                    ProcessingMode="Remote" Height="800px" ZoomMode="PageWidth">
                </rsweb:ReportViewer>
            </Content>
        </ext:Panel>
</asp:Content>

但是我得到这个错误:

  
    

布局不能处理类型为'Microsoft.Reporting.WebForms.ReportViewer'的控件

  

1 个答案:

答案 0 :(得分:0)

我通过从Layout="FitLayout"属性中删除ext:Panel来解决了这个问题