【问题标题】:Telerik Report not updatingTelerik 报告未更新
【发布时间】:2014-05-15 17:39:23
【问题描述】:

我正在尝试使用 Telerik Q3 报告

当我更改报表中的任何内容(例如在运行时或预览时未反映的文本框文本)时,我将报表查看器设为 EnableViewState=False 但没有反映

<%@ Page Title="Home Page" Language="C#" MasterPageFile="~/Site.master" AutoEventWireup="true"
    CodeBehind="Default.aspx.cs" Inherits="NoranReporting._Default" %>

<%@ Register Assembly="Telerik.ReportViewer.WebForms, Version=7.2.13.1016, Culture=neutral, PublicKeyToken=a9d7983dfcc261be"
    Namespace="Telerik.ReportViewer.WebForms" TagPrefix="telerik" %>

<asp:Content ID="HeaderContent" runat="server" ContentPlaceHolderID="HeadContent">
</asp:Content>
<asp:Content ID="BodyContent" runat="server" ContentPlaceHolderID="MainContent">
<telerik:ReportViewer ID="ReportViewer1" runat="server" ZoomMode="FullPage" 
        EnableViewState="False" Height="100%" ProgressText="يتم تجهيز التقرير..." 
        Width="100%" ></telerik:ReportViewer>   
</asp:Content>

这是设计图

http://postimg.org/image/41b4o3yu5/

这是运行时的图片

http://postimg.org/image/htpjjqplp/

为什么报表高度这么小?

我试过了

ZoomMode="FullPage" Height="100%"

但正如您在图片中看到的那样,它不起作用

母版页:

<%@ Master Language="C#" AutoEventWireup="true" CodeBehind="Site.master.cs" Inherits="NoranReporting.SiteMaster" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en">
<head runat="server">
    <title></title>
    <link href="~/Styles/Site.css" rel="stylesheet" type="text/css" />
    <asp:ContentPlaceHolder ID="HeadContent" runat="server">
    </asp:ContentPlaceHolder>
</head>
<body>
    <form runat="server">
    <div class="page">
        <div class="header">
            <div class="title">
                <h1>
                    My ASP.NET Application
                </h1>
            </div>

            <div class="clear hideSkiplink">
                <asp:Menu ID="NavigationMenu" runat="server" CssClass="menu" EnableViewState="false" IncludeStyleBlock="false" Orientation="Horizontal">
                    <Items>
                        <asp:MenuItem NavigateUrl="~/Default.aspx" Text="Home"/>
                        <asp:MenuItem NavigateUrl="~/About.aspx" Text="About"/>
                    </Items>
                </asp:Menu>
            </div>
        </div>
        <div class="main">
            <asp:ContentPlaceHolder ID="MainContent" runat="server"/>
        </div>
        <div class="clear">
        </div>
    </div>
    <div class="footer">

    </div>
    </form>
</body>
</html>

CSS 文件:

/* DEFAULTS
----------------------------------------------------------*/

  html#html, body#body, form#form1, div#content, center#center
  { 
   border: 0px solid black;

   float:right;
   height: 100%;
  }

body   
{
    background: #b6b7bc;
    font-size: .80em;
    font-family: "Helvetica Neue", "Lucida Grande", "Segoe UI", Arial, Helvetica, Verdana, sans-serif;
    margin: 0px;
    padding: 0px;
    color: #696969;
}

a:link, a:visited
{
    color: #034af3;
}

a:hover
{
    color: #1d60ff;
    text-decoration: none;
}

a:active
{
    color: #034af3;
}

p
{
    margin-bottom: 10px;
    line-height: 1.6em;
}


/* HEADINGS   
----------------------------------------------------------*/

h1, h2, h3, h4, h5, h6
{
    font-size: 1.5em;
    color: #666666;
    font-variant: small-caps;
    text-transform: none;
    font-weight: 200;
    margin-bottom: 0px;
}

h1
{
    font-size: 1.6em;
    padding-bottom: 0px;
    margin-bottom: 0px;
}

h2
{
    font-size: 1.5em;
    font-weight: 600;
}

h3
{
    font-size: 1.2em;
}

h4
{
    font-size: 1.1em;
}

h5, h6
{
    font-size: 1em;
}

/* this rule styles <h1> and <h2> tags that are the 
first child of the left and right table columns */
.rightColumn > h1, .rightColumn > h2, .leftColumn > h1, .leftColumn > h2
{
    margin-top: 0px;
}


/* PRIMARY LAYOUT ELEMENTS   
----------------------------------------------------------*/

.page
{
    width: 960px;
    background-color: #fff;
    margin: 0px auto 0px auto;
    border: 1px solid #496077;
}

.header
{
    position: relative;
    margin: 0px;
    padding: 0px;
    background: #4b6c9e;
    width: 100%;
}

.header h1
{
    font-weight: 700;
    margin: 0px;
    padding: 0px 0px 0px 20px;
    color: #f9f9f9;
    border: none;
    line-height: 2em;
    font-size: 2em;
}

.main
{
    padding: 0px 12px;
    margin: 12px 8px 8px 8px;
    min-height: 420px;
    width:100%;
    height:100%;
    direction:rtl;
}

.leftCol
{
    padding: 6px 0px;
    margin: 12px 8px 8px 8px;
    width: 200px;
    min-height: 200px;
}

.footer
{
    color: #4e5766;
    padding: 8px 0px 0px 0px;
    margin: 0px auto;
    text-align: center;
    line-height: normal;
}


/* TAB MENU   
----------------------------------------------------------*/

div.hideSkiplink
{
    background-color:#3a4f63;
    width:100%;
}

div.menu
{
    padding: 4px 0px 4px 8px;
}

div.menu ul
{
    list-style: none;
    margin: 0px;
    padding: 0px;
    width: auto;
}

div.menu ul li a, div.menu ul li a:visited
{
    background-color: #465c71;
    border: 1px #4e667d solid;
    color: #dde4ec;
    display: block;
    line-height: 1.35em;
    padding: 4px 20px;
    text-decoration: none;
    white-space: nowrap;
}

div.menu ul li a:hover
{
    background-color: #bfcbd6;
    color: #465c71;
    text-decoration: none;
}

div.menu ul li a:active
{
    background-color: #465c71;
    color: #cfdbe6;
    text-decoration: none;
}

/* FORM ELEMENTS   
----------------------------------------------------------*/

fieldset
{
    margin: 1em 0px;
    padding: 1em;
    border: 1px solid #ccc;
}

fieldset p 
{
    margin: 2px 12px 10px 10px;
}

fieldset.login label, fieldset.register label, fieldset.changePassword label
{
    display: block;
}

fieldset label.inline 
{
    display: inline;
}

legend 
{
    font-size: 1.1em;
    font-weight: 600;
    padding: 2px 4px 8px 4px;
}

input.textEntry 
{
    width: 320px;
    border: 1px solid #ccc;
}

input.passwordEntry 
{
    width: 320px;
    border: 1px solid #ccc;
}

div.accountInfo
{
    width: 42%;
}

/* MISC  
----------------------------------------------------------*/

.clear
{
    clear: both;
}

.title
{
    display: block;
    float: left;
    text-align: left;
    width: auto;
}

.loginDisplay
{
    font-size: 1.1em;
    display: block;
    text-align: right;
    padding: 10px;
    color: White;
}

.loginDisplay a:link
{
    color: white;
}

.loginDisplay a:visited
{
    color: white;
}

.loginDisplay a:hover
{
    color: white;
}

.failureNotification
{
    font-size: 1.2em;
    color: Red;
}

.bold
{
    font-weight: bold;
}

.submitButton
{
    text-align: right;
    padding-right: 10px;
}

我上传了一个带有 db 示例的项目示例,链接如下:

https://www.wetransfer.com/downloads/add6db1cf706b3b044515342a0deb8ed20140521092303/3d5b86d6b747eddcc8861d858c32711d20140521092303/c08aab

这是一个带有示例数据库的示例项目 我使用 VS 2013 SQL 2008 Telerik DevCraft Ultimate 2013 年第三季度

1-即使在报告的预览选项卡中,文本框的文本也没有更新的主要问题 在设计模式文本框的值为“تقرير تفصيلى” 但在运行时或预览时,它查看了文本框的文本“Report1”

2-查看器不是页面的 100% 高度

【问题讨论】:

    标签: c# asp.net telerik report


    【解决方案1】:

    您能否发布母版页的代码,在我看来,BodyContent 对于报表查看器来说太小了,您可以在左侧看到报表的滚动条。

    【讨论】:

    • 好的,在母版页中看不到任何会限制页面大小的明显内容。至于未更新的报告,您在预览选项卡上看到的内容是您所期望的吗?
    • 是的,预览适用于报告大小,但它没有像之前所说的那样更新数据我问的主要问题是我在报告中更新了文本框的文本,但在运行时或预览选项卡上我没有看到我更改的任何内容,我尝试清理解决方案并使启用视图状态为 false,但也没有更新
    • 我想检查预览选项卡,因为将您的 Web 应用程序链接到报告 dll 可能存在问题。好的,只需检查第一行是组标题上的一行文本框,第二行是详细组上的一行文本框吗?
    • 报告设计有四行 1 页标题是报告 1,我将其设为“ادارة القوى الفنية” 2 报告标题是“报告 1”,我将其设为“تقرير تفصيلى بالقوي الفنية “ 3-组标题上的一行文本框是绑定属性所指的列名,我也尝试更改它的名称 4-s 绑定到数据库字段的详细信息组上的一行文本框和工作正常前 3 行只是我无法更新的文本框,代表数据库数据的第四行工作正常
    • 如何在不工作的文本框中分配值?这是在设计模式中的价值“تقرير تفصيلى بالقوي الفنية”还是在代码中?
    猜你喜欢
    • 1970-01-01
    • 2011-07-30
    • 1970-01-01
    • 2016-11-15
    • 2016-08-21
    • 2017-09-26
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多