我更喜欢在一个div
容器中显示我的报告overflow:scroll
我将水晶报表查看器放在 DIV 中,并希望它只保留在 div 中,这样可以正常工作。当报告溢出时,我的 div 会出现滚动条。
但是当报告溢出时,我的页面也会出现滚动条!显示等于报表高度的空白区域。
不知何故z-index
,报告没有按预期工作。因此,我尝试了 html 中的所有 div,position:relative
并使用了高达 1000 的更高 z-index 值。但仍然没有运气。
我错过了什么吗?
这是我的 HTML
<div id="divCrt" class="GridTableBorder" style="left: 0px; right: 0px; overflow: scroll;
position: relative; height: 400px;width: 99%; vertical-align: top; z-index: 800; top: 0px; background-color: #b0c4de;" runat="server">
<CR:CrystalReportViewer ID="Crv" runat="server" Style="width: 98%; vertical-align: top ; overflow:hidden; " AutoDataBind="true" DisplayToolbar="False" DisplayPage="true"
Font-Names="Draft 10cpi" BestFitPage="False" >
</CR:CrystalReportViewer>
</div>
预期结果: divCrt 应该滚动而不是页面。相同的代码在 VS2005、VS2008 中工作
谢谢
编辑:这是屏幕截图