• SQL Reporting Services Report Viewer Scroll Bar(RDLC)


    把ReportViewer 放到UpdatePanel之外,并且放到div之中,设置绝对高度和宽度。

    ReportViewer scrollbars are not rendered correctly in IE7. The Vertical
    scrollbar can be recovered and the bottom part of the report can be viewed if you add the folowing to your page:
    string userAgent = Request.ServerVariables.Get("HTTP_USER_AGENT");
    if(userAgent.Contains("MSIE 7.0"))
    vwrReports.Attributes.Add("style", "margin-bottom: 30px;");

    郁闷啊, 没有水平的滚动条, 在网上查了下, 发现了些solution:

    1. Use vwrReports.Attributes.Add("style", "overflow:auto;");
    2. Downgrade the ReportViewer control from its earliest version with ns:
    Microsoft.Samples.ReportingServices.

    不知道博客园的各位老大有没有好的解决方法。第一个我已经试过了,不可以。第二个没有试。

    ------------------

    Add a third person to the list that's encountered the problem. I've tried setting the height property to 100% of the available space, but then the vertical scrollbar gets cutoff. The other odd thing I've noticed is that when I set the height property, the outer shell of the control renders as a table instead of as a div, which is what it normally is rendered as. So far the only workaround I've found is to add 50 pixel margin between the control and what I'm putting the control in (a table in this case).

    rvReport.Attribute.Add("style", "margin-bottom: 50px;")

    Unfortunetly, this leaves 50pixels of empty space in IE6, so it isn't ideal. If there is a better solution, or an explanation to the problem, let me know!

    ------------------

    Spector's solution works pretty well, just a minor tweak so that IE6 and Firefox don't have to pay for IE7's incompatability...

    Code Snippet

    string userAgent = Request.ServerVariables.Get("HTTP_USER_AGENT");

    if(userAgent.Contains("MSIE 7.0"))

         vwrReports.Attributes.Add("style", "margin-bottom: 30px;");

    ------------------

    Wrap the control in DIV tag. This solved the Horizontal and vertical scroll bar problem for me in IE 7. Though the width of the report control is 900px, it takes the width of the table.

    <TABLE WIDTH="YOUR WIDTH HERE"> <TR> <TD>

    <div >

    <rsweb:ReportViewer ID="ReportViewer1" runat="server" Font-Names="Verdana" Font-Size="8pt"

    Height="600px" Visible=False Width="900px" SizeToReportContent="True" >

    <LocalReport ReportPath="XYZ.rdlc">

    </LocalReport>

    </rsweb:ReportViewer>

    </div>

    </td>

    </tr>

    </table>

    ------------------

    http://social.msdn.microsoft.com/Forums/en-US/vsreportcontrols/thread/ebaa0144-7eb0-47a6-95dd-348f76cdcc2b

  • 相关阅读:
    爬虫前奏
    虚拟机初始配置以及NAT模式下的联网配置
    VMware环境下安装CentOS
    牛客 华华对月月的忠诚 【规律】公因数
    CF1324A Yet Another Tetris Problem
    CF1325B CopyCopyCopyCopyCopy 【思维】【map】
    CF1325A EhAb AnD gCd【思维题】
    同济网络赛 排列计算【差分,前缀和】
    同济大学网络赛 张老师和菜哭武的游戏
    CF A. Phoenix and Balance Codeforces Round #638 (Div. 2) 5月1号
  • 原文地址:https://www.cnblogs.com/emanlee/p/1549216.html
Copyright © 2020-2023  润新知