Search code examples
c#devexpressxtrareport

XtraReports Web Viewer not loading Parameters Popup


So were loading a a report from a saved file (this seems to not be the general way to do things), but the report viewer refuses to initialise the parameters popup. WTF!!!

Here's the code:

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;
}

Solution

  • Does doing this only on a full page load help?

    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;
    }