3

报告查看器宽度/高度在 中未正确显示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>
4

4 回答 4

4

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

添加这种风格,解决了问题,但微软指出的一些功能缺失 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;

并解决了问题

于 2009-06-04T11:33:05.300 回答
0

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

于 2009-06-04T08:18:34.663 回答
0

这帮助我解决了宽度问题......

浏览到 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" .....

这里

打印和搜索不起作用。我们创建 pdf 文档并将其用于打印和搜索...

于 2009-06-04T11:00:09.563 回答