/// <summary>
    /// On PreRender override.
    /// </summary>
    protected override void OnPreRender(EventArgs e)
    {
        base.OnPreRender(e);

        DisplayReport1.ReloadData(false);
        reportHeader.ReportName       = DisplayReport1.ReportName;
        reportHeader.ReportParameters = DisplayReport1.ReportParameters;
    }
    /// <summary>
    /// Save click handler.
    /// </summary>
    protected void Save()
    {
        // Check 'SaveReports' permission
        if (!CMSContext.CurrentUser.IsAuthorizedPerResource("cms.reporting", "SaveReports"))
        {
            RedirectToAccessDenied("cms.reporting", "SaveReports");
        }

        if (!DisplayReport1.ParametersForm.ValidateData())
        {
            return;
        }

        isSaved = true;
        int savedReportId = DisplayReport1.SaveReport();

        if (savedReportId != 0)
        {
            URLHelper.Redirect("SavedReports/SavedReport_View.aspx?reportId=" + savedReportId.ToString() + "&view=1");
        }
    }