zoukankan      html  css  js  c++  java
  • RDLC报表控件reportview显示问题(高度自适应)

    代码:

    <table style="background-color: ; overflow: hidden; height:100%;  100%; vertical-align:top;">
                 <tr style="">
                     <td style="height: 100%;">
                     </td>
                     <td>
                          <rsweb:ReportViewer ID="ReportViewer1" runat="server" Font-Names="Verdana"
        Font-Size="8pt" InteractiveDeviceInfos="(集合)" WaitMessageFont-Names="Verdana"
        WaitMessageFont-Size="14pt" style="100%; overflow:hidden;">
        <LocalReport ReportPath="D:\wwwroot\reportNew\RDLC\rdlc_temple\rdlc.rdlc">
        </LocalReport>
        </rsweb:ReportViewer>                

    </td>
                 </tr>
             </table>

    显示问题:在ff和IE8下,会在报表上部显示一片空白区域,影响美观,如图:

    解决办法:

    1、去掉红色字体的style设置,即 height:100%;

    <table style="background-color: ; overflow: hidden; height:100%;  100%; vertical-align:top;">
                 <tr style="">
                     <td style="height: 100%;">
                     </td>
                     <td>
                          <rsweb:ReportViewer ID="ReportViewer1" runat="server" Font-Names="Verdana"
        Font-Size="8pt" InteractiveDeviceInfos="(集合)" WaitMessageFont-Names="Verdana"
        WaitMessageFont-Size="14pt" style="100%; overflow:hidden;">
        <LocalReport ReportPath="D:\wwwroot\reportNew\RDLC\rdlc_temple\rdlc.rdlc">
        </LocalReport>
        </rsweb:ReportViewer>                

    </td>
                 </tr>
             </table>

    2、直接使用div作为容器

     <div id="mainPanel" style="background-color: ; border-left:1px solid scrollbar; overflow: hidden; height: 100%;">
            <rsweb:ReportViewer ID="ReportViewer1" runat="server" Font-Names="Verdana"
        Font-Size="8pt" InteractiveDeviceInfos="(集合)" WaitMessageFont-Names="Verdana"
        WaitMessageFont-Size="14pt" style="100%; overflow:hidden;">
        <LocalReport ReportPath="D:\wwwroot\reportNew\RDLC\rdlc_temple\rdlc.rdlc">
        </LocalReport>
        </rsweb:ReportViewer>    

    </div>

    如图:

  • 相关阅读:
    打印沙盒路径
    iOS自定义组与组之间的距离以及视图
    iOS开发之地域选择
    设置按钮文字右对齐
    ios应用下架方法(说明)
    You've implemented -[<UIApplicationDelegate> application:didReceiveRemoteNotification:fetchCompletionHandler:], but you still need to add "remote-notification" to the list of your supported UIBackgrou
    iOS开发-模拟器的小常识
    iOS-本地的推送
    创建节点学习
    窥探一句话木马后门的背后
  • 原文地址:https://www.cnblogs.com/zhangxu724100/p/2698617.html
Copyright © 2011-2022 走看看