Example #1
0
 protected void NewReportButton_Click(object sender, EventArgs e)
 {
     Session["DesignerTask"] = new DesignerTask {
         mode = ReportEdditingMode.NewReport,
     };
     Response.Redirect("Designer.aspx");
 }
Example #2
0
        protected void Page_Load(object sender, EventArgs e)
        {
            DesignerTask task = (DesignerTask)Session["DesignerTask"];

            if (task != null)
            {
                InitDesignerPage(task);
            }
            else if (!Page.IsCallback)
            {
                Response.Redirect("Default.aspx");
            }
        }
Example #3
0
        protected void EditButton_Click(object sender, EventArgs e)
        {
            ListItem selected = reportsList.SelectedItem;

            if (selected != null)
            {
                Session["DesignerTask"] = new DesignerTask {
                    mode     = ReportEdditingMode.ModifyReport,
                    reportID = selected.Value
                };
                Session["ReportID"] = selected.Value;
                Response.Redirect("Designer.aspx");
            }
        }
Example #4
0
        private void InitDesignerPage(DesignerTask task)
        {
            BindToData();

            switch (task.mode)
            {
            case ReportEdditingMode.NewReport:
                // Create a new report from the template.
                ASPxReportDesigner1.OpenReport(new ReportTemplate());
                break;

            case ReportEdditingMode.ModifyReport:
                // Load a report from the report storage.
                ASPxReportDesigner1.OpenReport(task.reportID);
                break;
            }
        }