【问题标题】:Report in .NET Flickering.NET 闪烁报告
【发布时间】:2011-07-14 16:01:23
【问题描述】:

我有一个 .NET 报告,它使用业务对象作为数据源绑定到 RDLC 文件。该报告采用我在 Page_Init 上设置的参数。我遇到的问题是视图不断刷新,发出连续的 AJAX 请求但什么也没显示。我在我的 DAL 方法上设置了断点,它们只被调用一次,但 AJAX 请求是不变的。我不知道为什么会这样。这是我的 reportviewer 定义:

<rsweb:ReportViewer ID="ReportViewer2" runat="server" Font-Names="Verdana" 
            Font-Size="8pt" Height="834px" InteractiveDeviceInfos="(Collection)" 
            WaitMessageFont-Names="Verdana" WaitMessageFont-Size="14pt" Width="910px">
        <LocalReport ReportPath="Report1.rdlc"/>

这个真的把我难住了,不知道还能尝试什么。

【问题讨论】:

    标签: c# asp.net reporting-services reporting rdlc


    【解决方案1】:

    如果您在 Page_Load 中提供了任何参数,请将它们移至 Page_Init。

    【讨论】:

      【解决方案2】:
      using Microsoft.Reporting.WebForms;
      
      public partial class ExportSoftware_Depb_Edi_Annex_B_Report : System.Web.UI.Page
      {
          protected void Page_Load(object sender, EventArgs e)
          {
              Bind();
          }
          private void Bind()
          {
              DataSet sd = new DataSet();
              ExecuteProcedures ex = new ExecuteProcedures(1, CommonStrings.ConnectionString);
              ex.Parameters.Add("@intAnnexure_B_Id", SqlDbType.Int, Session["id"]);
              sd  = ex.LoadDatasetWithProcedure("ProcDEPBAnnexureBBind_Report");
              ReportViewer1.LocalReport.ReportPath = Server.MapPath("~/ExportSoftware/Report/Depb_Edi_Annex_B.rdlc");
              ReportDataSource rds = new ReportDataSource();
              rds.Name = "Depb_Edi_Annex_B_DataTable1";
              rds.Value = sd.Tables[0];
              ReportViewer1.LocalReport.DataSources.Clear();
              ReportViewer1.LocalReport.DataSources.Add(rds);
              ReportViewer1.LocalReport.Refresh();
              ReportViewer1.Visible = true;
              ReportViewer1.Dispose();
          }
      
      }
      

      【讨论】:

      • 这应该意味着什么吗?
      猜你喜欢
      • 2011-03-27
      • 1970-01-01
      • 1970-01-01
      • 2023-03-22
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2017-03-08
      相关资源
      最近更新 更多