asp.net - 报告 Mozilla 中的查看器宽度问题

标签 asp.net html css reporting-services mozilla

报表查看器宽度/高度在 Mozila Firefox 中显示不正确,但在 IE 中显示完美。 Mozila 中的显示大小为 450 宽和 175 高,在 IE 中完美显示在整页中。我在 px 中设置了宽度而不是 %age 但得到相同。 有没有人能解决这个问题? 这是我的 .aspx 页面源代码

 <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>

最佳答案

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

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

然后解决问题

关于asp.net - 报告 Mozilla 中的查看器宽度问题,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/949165/

相关文章:

c# - 通过 HTML 按钮调用 C# 函数

asp.net - 从 Azure 服务访问 TFS

c# - 每次单击按钮时递增数字

javascript - Web Audio API 振荡器节点对象生命周期和 stop() 方法

html - 当其他元素获得焦点时输入失去焦点

javascript - 如何获取 HTML 表格单元格的内容?

C# 数据集和 Crystal Reports

css - 如何修复我的 CSS 网格布局的跨浏览器兼容性?

css - IE7 中的错误 - body -direction :rtl

html - 导航菜单对齐