代码之家  ›  专栏  ›  技术社区  ›  Muhammad Akhtar

Mozilla中的报表查看器宽度问题

  •  3
  • Muhammad Akhtar  · 技术社区  · 15 年前

    报表查看器的宽度/高度未在中正确显示 Mozila Firefox ,但在 IE . Mozilla中的显示大小为 450 width and 175 height 完美融入 工业工程 整页显示。我在px中设置了宽度,而不是年龄的百分比,但得到了相同的结果。 有人能解决这个问题吗? 这是我的 .aspx page source

     <form id="form1" runat="server">
    <div id="divException" runat="server" style="text-align: center; padding-top: 100px"
        visible="false">
        <asp:Label ID="lblException" runat="server" Text="Sorry, no data found!!!" Font-Size="Large"
            ForeColor="Red"></asp:Label>
    </div>
    <div style="height: 100%; width: 100%;">
        <rsweb:ReportViewer ID="rptvReport" runat="server" Width="100%" Height="95%">
        </rsweb:ReportViewer>
    </div>
    </form>
    
    4 回复  |  直到 13 年前
        1
  •  4
  •   Muhammad Akhtar    15 年前

    非常棘手的解决方案……

    添加此样式,解决问题,但Microsoft指出缺少某些功能 http://msdn.microsoft.com/en-us/library/ms156511.aspx

     <style type="text/css">
        html, body, form
        {
            width: 100%;
            height: 100%;
            margin: 0;
            padding: 0;
        }
        table#rptvReport
        {
            display: table !important;
            background-color:White;
            min-height:500px;
        }
    </style>
    

    这是哪里 RTPTV报告 这里应该设置ReportView控件的ID。 实际上,这里的问题是,当呈现报表时,表具有类似

    style="display:inline-block"
    

    这就造成了问题,我在这里所做的就是把它变成

     display: table !important;
    

    解决了这个问题

        3
  •  0
  •   EFraim    15 年前

    你是不是偶然在IE中触发了怪癖模式?无论如何,很难知道会发生什么,除非您指定应用于所有更高级别元素(body?)的样式。

        4
  •  0
  •   Xn0vv3r    15 年前

    这帮我解决了宽度问题…

    浏览到C:\Program Files\Microsoft SQL Server\MSSQL.3\Reporting Services\ReportServer\Pages\ReportViewer.aspx

    向标记样式属性添加信息。

    <RS:ReportViewerHost style="display:table; margin: 0px; overflow: auto" ID="ReportViewerControl" runat="server" .....
    

    here .

    打印和搜索不起作用。我们创建了PDF文档,并将其用于打印和搜索…