【问题标题】:Report viewer width problem in Mozila在 Mozilla 中报告查看器宽度问题
【发布时间】:2010-10-31 06:05:49
【问题描述】:

报告查看器宽度/高度在Mozila Firefox 中无法正确显示,但在IE 中完美显示。 Mozila 中的显示尺寸为450 width and 175 height,在整页中显示为IE。我已经在 px 中设置了宽度而不是 %age 但得到了相同的值。 有没有人有这个问题的解决方案? 这是我的.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>

【问题讨论】:

  • 我使用过 SQL Reporting Services。

标签: asp.net html css reporting-services mozilla


【解决方案1】:

非常棘手的解决方案......

添加此样式,解决问题,但微软指出的某些功能缺失 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>

这里是rptvReport ReportViewer的ID,这里应该设置你的ReportView控件的ID。 实际上这里的问题是,当呈现报告时,表格具有样式属性,如

style="display:inline-block"

这是造成问题,我在这里所做的就是将其更改为

 display: table !important;

解决问题

【讨论】:

  • 谢谢。我将此代码添加到 SSRS 服务器页面 (ReportServer/Pages/ReportViewer.aspx)。我只需要将 table#rptvReport 更改为 table#ReportViewerControl。
【解决方案2】:

这有助于我解决宽度问题...

浏览到 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 文档并将其用于打印和搜索...

【讨论】:

  • 我无法在这个目录旁边找到 C:\Program Files\Microsoft SQL Server\ 在这里我找到了 MSSQL.1 和 MSSQL.2 但没有找到 MSSQL.3 等等.... .
【解决方案3】:
【解决方案4】:

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

【讨论】:

  • 感谢您的快速回复,我只在 head 标签中添加了以下样式,页面中没有其他定义。
猜你喜欢
  • 2013-12-26
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 2023-03-23
  • 2013-10-25
  • 1970-01-01
相关资源
最近更新 更多