XtraReports Web Viewer未加载参数弹出窗口

时间:2010-03-10 15:45:25

标签: c# devexpress xtrareport

所以从保存的文件中加载一个报告(这似乎不是执行操作的一般方法),但报表查看器拒绝初始化参数弹出窗口。 WTF !!!

以下是代码:

protected void Page_Load(object sender, EventArgs e)
{
  string ReportName = Request["ReportName"];
  XtraReport newReport = CreateReportFromFile(ReportName);
  newReport.RequestParameters = true;
  ReportViewerControl1.Report = newReport;
}

private XtraReport CreateReportFromFile(string filePath)
{
  XtraReport report = new XtraReport();
  report = XtraReport.FromFile(filePath, true);
  return report;
}

1 个答案:

答案 0 :(得分:1)

仅在整页加载帮助时才这样做吗?

protected void Page_Load(object sender, EventArgs e)
{
  if( IsPostBack || Is IsCallBack )
  {
     return
  }

  string ReportName = Request["ReportName"];
  XtraReport newReport = CreateReportFromFile(ReportName);
  newReport.RequestParameters = true;
  ReportViewerControl1.Report = newReport;
}