private void InitializeReportDesigner()
        {
            string reportParameterName = "reportParameter1";
            // The data source parameter name should match the name of the variable passed to the data source constructor.
            string dataSourceParameterName = "p1";
            var    objectDS = GenerateObjectDataSource(reportParameterName, dataSourceParameterName);

            // Uncomment the following line to register the object data source
            // (if end-users are allowed to create new reports bound to this data source).
            // ASPxReportDesigner1.DataSources.Add("ObjectDataSource1", objectDS);
            ASPxReportDesigner1.OpenReport(GenerateReport("reportParameter1", objectDS));
        }
Ejemplo n.º 2
0
        protected void Page_Load(object sender, EventArgs e)
        {
            var name        = Request.QueryString["name"];
            var reportNames = ReportStorageWithAccessRules.GetEditableReportNamesForCurrentUser();

            if (reportNames.Contains(name))
            {
                ASPxReportDesigner1.OpenReport(name);
            }
            else
            {
                Response.Redirect("~/Authorization/Reports/ReportViewerPage.aspx");
            }
        }
        void BindToData()
        {
            // Create a SQL data source with the specified connection string.
            SqlDataSource ds = new SqlDataSource("NWindConnectionString");

            // Create a SQL query to access the Products data table.
            SelectQuery query = SelectQueryFluentBuilder.AddTable("Products").SelectAllColumnsFromTable().Build("Products");

            ds.Queries.Add(query);
            ds.RebuildResultSchema();

            // Add the created data source to the list of default data sources.
            ASPxReportDesigner1.DataSources.Add("Northwind", ds);
            ASPxReportDesigner1.OpenReport("Report");
        }
Ejemplo n.º 4
0
        protected void Page_Load(object sender, EventArgs e)
        {
            DevExpress.DataAccess.Sql.SqlDataSource sqlDataSource = GenerateSqlDataSource();
            DevExpress.DataAccess.ObjectBinding.ObjectDataSource objDataSource   = GenerateObjectDataSource();
            DevExpress.DataAccess.EntityFramework.EFDataSource   efDataSource    = GenerateEFDataSource();
            DevExpress.DataAccess.Excel.ExcelDataSource          excelDataSource = GenerateExcelDataSource();
            DevExpress.DataAccess.Json.JsonDataSource            jsonDataSource  = GenerateJsonDataSource();

            ASPxReportDesigner1.DataSources.Add(sqlDataSource.Name, sqlDataSource);
            ASPxReportDesigner1.DataSources.Add(objDataSource.Name, objDataSource);
            ASPxReportDesigner1.DataSources.Add(efDataSource.Name, efDataSource);
            ASPxReportDesigner1.DataSources.Add(excelDataSource.Name, excelDataSource);
            ASPxReportDesigner1.DataSources.Add(jsonDataSource.Name, jsonDataSource);

            ASPxReportDesigner1.OpenReport("XtraReportTest");
        }
Ejemplo n.º 5
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;
            }
        }
Ejemplo n.º 6
0
 protected void Page_Load(object sender, EventArgs e)
 {
     ASPxReportDesigner1.OpenReport(new XtraReport1());
 }
 protected void Page_Load(object sender, EventArgs e)
 {
     ASPxReportDesigner1.OpenReport("Invoice");
 }
Ejemplo n.º 8
0
        protected void Page_Init(object sender, EventArgs e)
        {
            if (!User.Identity.IsAuthenticated)
            {
                Response.Redirect("/Account/Giris");
            }
            //aqyery stringle tipe göre fatura makbuz vb bütün tasarım kayıtları burada yapılacak
            if (!IsPostBack)
            {
                string tip   = Request.QueryString["tip"];
                string firma = KullaniciIslem.firma();


                if (tip.Equals("fatura"))
                {
                    //fatura yolunu bulalım
                    bool?tek = false;
                    using (Radius.radiusEntities dc = Radius.MyContext.Context(KullaniciIslem.firma()))
                    {
                        AyarCurrent ay = new AyarCurrent(dc);
                        tek = ay.get().cift_taraf;
                    }
                    if (tek == true)
                    {
                        string     path   = "/Raporlar/" + KullaniciIslem.firma() + "fatura.repx";
                        string     yol    = Server.MapPath(path);
                        XtraReport report = new faturaX();
                        if (File.Exists(yol))
                        {
                            report.LoadLayout(yol);
                        }

                        ASPxReportDesigner1.OpenReport(report);
                    }
                    else
                    {
                        string     path   = "/Raporlar/" + KullaniciIslem.firma() + "faturaTek.repx";
                        string     yol    = Server.MapPath(path);
                        XtraReport report = new faturaTekX();
                        if (File.Exists(yol))
                        {
                            report.LoadLayout(yol);
                        }

                        ASPxReportDesigner1.OpenReport(report);
                    }
                }
                else if (tip.Equals("makbuz"))
                {
                    //fatura yolunu bulalım
                    string     path   = "/Raporlar/" + KullaniciIslem.firma() + "makbuz.repx";
                    string     yol    = Server.MapPath(path);
                    XtraReport report = new makbuzX();
                    if (File.Exists(yol))
                    {
                        report.LoadLayout(yol);
                    }

                    ASPxReportDesigner1.OpenReport(report);
                }
                else if (tip.Equals("servis"))
                {
                    //fatura yolunu bulalım
                    string     path   = "/Raporlar/" + KullaniciIslem.firma() + "servis.repx";
                    string     yol    = Server.MapPath(path);
                    XtraReport report = new baslamaX();
                    if (File.Exists(yol))
                    {
                        report.LoadLayout(yol);
                    }

                    ASPxReportDesigner1.OpenReport(report);
                }
                else if (tip.Equals("servis_maliyet"))
                {
                    //fatura yolunu bulalım
                    string path = "/Raporlar/" + KullaniciIslem.firma() + "servis_maliyet.repx";
                    string yol  = Server.MapPath(path);
                    ServisDAL.Raporlama.ServisMaliyetlerX report = new ServisDAL.Raporlama.ServisMaliyetlerX();
                    if (File.Exists(yol))
                    {
                        report.LoadLayout(yol);
                    }

                    ASPxReportDesigner1.OpenReport(report);
                }
                else if (tip.Equals("extre"))
                {
                    //fatura yolunu bulalım
                    string     path   = "/Raporlar/" + KullaniciIslem.firma() + "extre.repx";
                    string     yol    = Server.MapPath(path);
                    XtraReport report = new extreX();
                    if (File.Exists(yol))
                    {
                        report.LoadLayout(yol);
                    }

                    ASPxReportDesigner1.OpenReport(report);
                }


                else if (tip.Equals("gelirgider"))
                {
                    string     path   = "/Raporlar/" + KullaniciIslem.firma() + "gelirgider.repx";
                    string     yol    = Server.MapPath(path);
                    XtraReport report = new GelirGiderX();
                    if (File.Exists(yol))
                    {
                        report.LoadLayout(yol);
                    }

                    ASPxReportDesigner1.OpenReport(report);
                }
                else if (tip.Equals("gelirgiderozet"))
                {
                    string     path   = "/Raporlar/" + KullaniciIslem.firma() + "gelirgiderozet.repx";
                    string     yol    = Server.MapPath(path);
                    XtraReport report = new GelirGiderOzetX();
                    if (File.Exists(yol))
                    {
                        report.LoadLayout(yol);
                    }

                    ASPxReportDesigner1.OpenReport(report);
                }

                else if (tip.Equals("gelirgidergruplu"))
                {
                    string     path   = "/Raporlar/" + KullaniciIslem.firma() + "gelirgidergruplu.repx";
                    string     yol    = Server.MapPath(path);
                    XtraReport report = new GelirGiderGrupluX();
                    if (File.Exists(yol))
                    {
                        report.LoadLayout(yol);
                    }

                    ASPxReportDesigner1.OpenReport(report);
                }
                else if (tip.Equals("gelirgideraylik"))
                {
                    string     path   = "/Raporlar/" + KullaniciIslem.firma() + "gelirgideraylik.repx";
                    string     yol    = Server.MapPath(path);
                    XtraReport report = new GelirGiderAylikX();
                    if (File.Exists(yol))
                    {
                        report.LoadLayout(yol);
                    }

                    ASPxReportDesigner1.OpenReport(report);
                }
                else if (tip.Equals("makineanaliz"))
                {
                    string     path   = "/Raporlar/" + KullaniciIslem.firma() + "makine.repx";
                    string     yol    = Server.MapPath(path);
                    XtraReport report = new makineX();
                    if (File.Exists(yol))
                    {
                        report.LoadLayout(yol);
                    }

                    ASPxReportDesigner1.OpenReport(report);
                }
            }
        }
        protected void Page_Load(object sender, EventArgs e)
        {
            Session["MyVaraible"] = tbSessionVariableValue.Text;

            ASPxReportDesigner1.OpenReport("SampleReportUrl");
        }
        protected void Page_Load(object sender, EventArgs e)
        {
            XtraReport report = GetReport();

            ASPxReportDesigner1.OpenReport(report);
        }