日期:2014-05-18  浏览次数:20898 次

水晶报表老是只显示一半
代码如下,我想让报表在子页面中全屏显示,要怎么样改?高手指教。

HTML code

<%@ Page Title="" Language="C#" MasterPageFile="~/Main.master" AutoEventWireup="true" CodeFile="frmDalayReport.aspx.cs" Inherits="frmDalayReport" %>



<%@ Register assembly="CrystalDecisions.Web, Version=13.0.2000.0, Culture=neutral, PublicKeyToken=692fbea5521e1304" namespace="CrystalDecisions.Web" tagprefix="CR" %>



<asp:Content ID="Content1" ContentPlaceHolderID="HeadContent" Runat="Server">
    <style type="text/css">
         .stylelab
        {
            font-size:10.5px;
            vertical-align:middle;
            text-align:center;
        }
    </style>
        <style type="text/css">
         .div
        {
            width:100%;
            height:100%;
            line-height:100%;
            overflow:auto;
             overflow:scroll;
        }
    </style>
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="MainContent" Runat="Server">
    <script type="text/javascript" language="javascript" src="My97DatePicker/WdatePicker.js"></script>

 <div id="condition"  
        style="width:100%; height:6%; float:right; background-color:#E6EEEB; vertical-align:middle; padding-top: 4px;" >
请输入工号:
    <asp:TextBox ID="TextBox1" runat="server"></asp:TextBox>
开始日期:<asp:TextBox ID="txtBeginDate" runat="server" onclick="WdatePicker();"></asp:TextBox>
结束日期:     <asp:TextBox ID="txtEndDate" runat="server" onclick="WdatePicker();"></asp:TextBox>
    <asp:Button ID="Button1" runat="server" Text="查询" onclick="Button1_Click" />
 </div>
 <div style="clear:both;background-color: #FF00FF"></div>
 <div runat="server"
 style="height:93%; width:100%;padding:0px 0px 0px 0px;margin:0px 0px 0px 0px;overflow:hidden;">
 <!--<div id="result" runat="server"
        style="width:100%; height:100%; background-color:#E6EEEB; vertical-align:middle;  margin-top:4px;
">
 -->         
  
      <CR:CrystalReportViewer ID="CrystalReportViewer1" runat="server" 
          GroupTreeImagesFolderUrl="" Height="940px" 
          ReportSourceID="crs" ToolbarImagesFolderUrl="" ToolPanelWidth="200px" 
          Width="1410px" HasCrystalLogo="False" oninit="CrystalReportViewer1_Init"  Visible="false"/>
      <CR:CrystalReportSource ID="crs" runat="server">
          <Report FileName="Report\usp_DalayReoprt.rpt">
          </Report>
      </CR:CrystalReportSource>
      <iframe id="Report" runat="server"  src="Include/frmDalayReport.aspx" scrolling="auto" height="100%" width="100%"></iframe>
 <!--</div>-->
 </div>
 <div runat="server" style="clear:both">     
    </div>
        </asp:Content>






------解决方案--------------------
你首先要把报表放到子画面呀,没有办法让浏览器全屏只能把你的报表充满整个浏览器
通过js来控制子画面的大小
js获取大小你看下下面这个说明吧
http://www.cnblogs.com/lf6112/archive/2011/07/26/2117348.html