vertical gap when resizing broswer

6 posts, 0 answers
  1. xie yufei
    xie yufei avatar
    14 posts
    Member since:
    Sep 2009

    Posted 10 Jun 2010 Link to this post

    Hi

    when i resize the broswer,some vertical gaps appear.do resizing more times ,the gap will be larger more and more.you can check the attached files.

    snap1 is the original status,just loaded.everything is ok. then click the query button to retieve data.it's ok.then drag the broswer's border to enlarge the size,the gap appeared.see the snap2.if i click the query button again,the gap disappeared .

     

    i noticed that if i didn't click the query button,it' ok when changing the browser's size.it just occured after processing the retrieve action.

    how to resolve this problem?

    thanks!

    <%@ Master Language="C#" AutoEventWireup="true" CodeBehind="ReportBase.master.cs" 
        Inherits="Rp.UI.Common.ReportBase" %> 
     
    <%@ Register Assembly="Telerik.ReportViewer.WebForms, Version=4.0.10.423, Culture=neutral, PublicKeyToken=a9d7983dfcc261be" 
        Namespace="Telerik.ReportViewer.WebForms" TagPrefix="telerik" %> 
    <%@ Register Src="ReportViewer.ascx" TagName="ReportViewer" TagPrefix="uc1" %> 
    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> 
    <html xmlns="http://www.w3.org/1999/xhtml">  
    <head runat="server">  
        <title></title>  
        <style> 
            html, body, form  
            {  
                height: 100%;  
                margin: 0;  
                padding: 0;  
                overflow: hidden;  
            }  
            .Report  
            {  
                margin: 0;  
                padding: 0;  
                vertical-align: top;  
            }  
        </style> 
        <asp:ContentPlaceHolder ID="head" runat="server">  
        </asp:ContentPlaceHolder> 
    </head> 
    <body> 
        <form id="form1" runat="server">  
        <telerik:RadScriptManager ID="RadScriptManager1" runat="server">  
        </telerik:RadScriptManager> 
        <telerik:RadAjaxManager ID="RadAjaxManager1" runat="server">  
        </telerik:RadAjaxManager> 
        <telerik:RadFormDecorator ID="RadFormDecorator1" runat="server" DecoratedControls="Default, Textbox, Label" /> 
        <telerik:RadSkinManager ID="RadSkinManager1" runat="server" Skin="Sitefinity">  
        </telerik:RadSkinManager> 
        <telerik:RadSplitter ID="RadSplitter1" runat="server" Orientation="Horizontal" BorderSize="0" 
            BorderStyle="None" Height="100%" Width="100%">  
            <telerik:RadPane ID="RadPaneTop" runat="server" Scrolling="None" Width="100%">  
                <asp:ContentPlaceHolder ID="ContentPlaceHolder1" runat="server">  
                </asp:ContentPlaceHolder> 
            </telerik:RadPane> 
            <telerik:RadPane ID="ReportPane" runat="server" OnClientResized="resizeViewer" Scrolling="None" 
                CssClass="Report">  
                <telerik:ReportViewer ID="ReportViewer" runat="server" DocumentMapVisible="False" 
                    ProgressText="正在获取数据..." ParametersAreaVisible="False" ShowParametersButton="false" 
                    ShowZoomSelect="True" Height="100%" Width="100%">  
                    <Resources ExportButtonText="导出" ExportSelectFormatText="选择输出格式..." ProcessingReportMessage="正在获取数据..." /> 
                </telerik:ReportViewer> 
            </telerik:RadPane> 
        </telerik:RadSplitter> 
        <telerik:RadCodeBlock runat="server">  
     
            <script type="text/javascript" language="javascript">  
     
             function resizeViewer()  
            {            
               <%=ReportViewer.ClientID %>.AdjustReportAreaHeight();  
            }  
     
            function closeLink()  
            {  
                parent.closeActiveTab();  
            }  
            </script> 
     
        </telerik:RadCodeBlock> 
        </form> 
    </body> 
    </html> 
     
    <%@ Page Title="" Language="C#" MasterPageFile="~/Common/ReportBase.Master" AutoEventWireup="true" 
        CodeBehind="ListAll.aspx.cs" Inherits="Rp.UI.ReportCenter.SalesOrder.ListAll" %> 
     
    <%@ MasterType VirtualPath="~/Common/ReportBase.Master" %> 
    <asp:Content ID="ContentHeader" ContentPlaceHolderID="head" runat="server">  
     
    </asp:Content> 
    <asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder1" runat="server">  
        <div id="Top" style="width: 100%; height: 26px;font-size:10pt;">  
            <div style="float: left">  
                <div style="float: left; margin-top:5px;">  
                    <asp:Label ID="Label1" runat="server" Text="选择查询方式:" ></asp:Label> 
                </div> 
                <asp:RadioButtonList ID="RadioButtonList1" runat="server" RepeatDirection="Horizontal" 
                    Width="148px">  
                    <asp:ListItem Value="All">汇总</asp:ListItem> 
                    <asp:ListItem Selected="True" Value="Part">分大区</asp:ListItem> 
                </asp:RadioButtonList> 
            </div> 
            <div style="float: right;">  
                <asp:Button ID="btnQuery" runat="server" Text="查  询" onclick="btnQuery_Click" /> 
                <input id="Button1" type="button" value="关  闭" onclick="closeLink()" /> 
            </div> 
        </div> 
    </asp:Content> 
     
  2. xie yufei
    xie yufei avatar
    14 posts
    Member since:
    Sep 2009

    Posted 11 Jun 2010 Link to this post

    snap files
  3. DevCraft banner
  4. Steve
    Admin
    Steve avatar
    10941 posts

    Posted 15 Jun 2010 Link to this post

    Hello xie yufei,

    As we have advised in your previous thread, try forcing the viewer to repaint itself in the pane. To do that you should hook up to the OnClientResized event and invoke the AdjustReportAreaHeight method e.g.:

    <script type="text/javascript">
             function resizeViewer()
            {
                <%=ReportViewer1.ClientID %>.AdjustReportAreaHeight();
            }
        </script>
    .......
    <telerik:RadPane runat="server" ID="ViewerPane" Scrolling="None" OnclientResized="resizeViewer">  
            <uc1:ReportViewer ID="ReportViewer1" runat="server" />
        </telerik:RadPane>
    .....

    Another thing you can try is remove the doctype declaration from your page or use a less restricting one, like <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">.
    If this does not resolve the issue, use a tool like Firebug or IE Developer Toolbar for identifying what those spaces are.

    Sincerely yours,
    Steve
    the Telerik team

    Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items.
  5. xie yufei
    xie yufei avatar
    14 posts
    Member since:
    Sep 2009

    Posted 15 Jun 2010 Link to this post

    hi

    my previous problem is the scrollbar ,i followed your structions,it works fine.this time is different.have you check my code snippets and the snap shot  imgage file?  when i load the page and don't anything ,it's ok if i change the browser's size whatever.but if i clicked the query (查询) button then changed browser's size,the gap appeared. i guess it is not spaces.

    thanks

    best regards
  6. Steve
    Admin
    Steve avatar
    10941 posts

    Posted 17 Jun 2010 Link to this post

    Hi xie yufei,

    I've missed the fact that you've already incorporated the AdjustReportAreaHeight method of the viewer. You do not share whether you have tried my other suggestion of replacing or removing the doctype? On a side note resizing of the browser is not a very common thing to do, especially when you are already using a resizing control in your page (the RadSplitter), so can you share why you would need to do this in a first place?
    In this line of thoughts, you can detect the resize of the browser (i.e. window.onresize) and invoke the AdjustReportAreaHeight method once again.

    Best wishes,
    Steve
    the Telerik team

    Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items.
  7. xie yufei
    xie yufei avatar
    14 posts
    Member since:
    Sep 2009

    Posted 17 Jun 2010 Link to this post

    Hi

    In my previous thread,i mentioned that the parameter's label would be wrapped when chinese characters been used.You guys give me one suggestion that using spaces between every words,that's unacceptable.So i have to build my own parameters area.If not have  the problem of  label  wrapping ,i can just use one viewer control.set it's height  to 100% and width to 100%,It will be very good.but now,for the reason, i have those following problems one by one.

    It's ok no matter how many times clicking on the refresh button in the toolbar.However,the gaps appeared when i click the retrieve button defined by myself and then change the size of browser. i have set the background color of two departs to watch which area has been affected,i guess the problem may lies in the viewer ,not spaces.i know the resizing operation is fewer.i just did some tests and let you know what i found.

    I can give you a scenario.First i retrieve data by conditions,then i want to do some contrast.I double click on the browse's title bar to change the size smaller,then open one excel file,i want to show both in the screen,so i adjust the browser's size,then the user would find the more and more larger gap.

    The problem only arises when i click self-defined button rather than the refresh button on viewer .

    I will try your other suggestion and let you know the result.Sorry for my bad expression in English.

    Anyway thank you very much.

    Best regards!
Back to Top
DevCraft banner