报表查看器宽度/高度在 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/