Exemplo n.º 1
0
        private void btnOpenEditor_Click(object sender, EventArgs e)
        {
            var report = CreateReportInstance();

            if (report == null)
            {
                return;
            }

            using (ReportDesignTool designerTool = new ReportDesignTool(report))
            {
                designerTool.ShowRibbonDesignerDialog(UserLookAndFeel.Default);
            }
        }
Exemplo n.º 2
0
        private void Form1_Load(object sender, EventArgs e)
        {
            // Enables security protocol versions to access the JSON web data source.
            ServicePointManager.SecurityProtocol = SecurityProtocolType.Tls
                                                   | SecurityProtocolType.Tls11
                                                   | SecurityProtocolType.Tls12
                                                   | SecurityProtocolType.Ssl3;

            XtraReport       report     = CreateReport();
            ReportDesignTool designTool = new ReportDesignTool(report);

            designTool.ShowRibbonDesignerDialog();
            Application.Exit();
        }
Exemplo n.º 3
0
        private void toolStripButton1_Click(object sender, EventArgs e)
        {
            Factura factura = bsFactura.Current as Factura;

            if (factura != null)
            {
                XtraReportFactura xtraReport = new XtraReportFactura
                {
                    Factura = factura
                };
                ReportDesignTool dt = new ReportDesignTool(xtraReport);

                // Invoke the Ribbon End-User Designer form modally.
                dt.ShowRibbonDesignerDialog();
            }
        }
        static void Main()
        {
            Application.EnableVisualStyles();
            Application.SetCompatibleTextRenderingDefault(false);

            var report = new XtraReport();

            report.ScriptsSource  = "// write code here\r\n";
            report.ScriptLanguage = DevExpress.XtraReports.ScriptLanguage.CSharp;
            using (report)
                using (var tool = new ReportDesignTool(report)) {
                    var form = tool.DesignRibbonForm;
                    form.DesignMdiController.AddService(typeof(DevExpress.XtraReports.Design.IScriptEditorService), new ScriptEditorService());
                    form.DesignDockManager.Load += (s, e) => form.DesignMdiController.ActiveDesignPanel.ExecCommand(DevExpress.XtraReports.UserDesigner.ReportCommand.ShowScriptsTab);
                    tool.ShowRibbonDesignerDialog();
                }
        }
Exemplo n.º 5
0
        public void Disenyar()
        {
            Factura factura = bsFactura.Current as Factura;

            if (factura != null)
            {
                var cliente = Cliente ?? new Cliente();

                XtraReportFactura xtraReport = new XtraReportFactura
                {
                    Factura = factura
                };

                try
                {
                    using (var ms = new MemoryStream(cliente.ModeloDocumento))
                    {
                        ms.Position = 0;

                        xtraReport.LoadLayout(ms);
                    }
                }
                catch (Exception)
                {
                }


                ReportDesignTool dt = new ReportDesignTool(xtraReport);

                // Invoke the Ribbon End-User Designer form modally.
                dt.ShowRibbonDesignerDialog();

                using (var ms = new MemoryStream())
                {
                    xtraReport.SaveLayout(ms);

                    ms.Position = 0;

                    cliente.ModeloDocumento = ms.ToArray();
                }
            }
        }
 private void showDesignerBarItem_ItemClick(object sender, XtraBars.ItemClickEventArgs e)
 {
     using (var tool = new ReportDesignTool(ViewModel.Report)) {
         tool.ShowRibbonDesignerDialog();
     }
 }
        // Use a ReportDesignTool, to show a report in a Ribbon End-User Designer form.
        private void button4_Click(object sender, EventArgs e)
        {
            ReportDesignTool dt = new ReportDesignTool(new XtraReport1());

            dt.ShowRibbonDesignerDialog();
        }
        public void Disenyar()
        {
            Factura factura = bsFactura.Current as Factura;

            if (factura != null)
            {
                var cliente = Cliente ?? new Cliente();

                XtraReportFactura xtraReport = new XtraReportFactura
                {
                    Factura = factura
                };

                try
                {
                    using (var ms = new MemoryStream(cliente.ModeloDocumento))
                    {
                        ms.Position = 0;

                        xtraReport.LoadLayout(ms);
                    }
                }
                catch (Exception)
                {
                }

                ReportDesignTool dt = new ReportDesignTool(xtraReport);

                // Invoke the Ribbon End-User Designer form modally.
                dt.ShowRibbonDesignerDialog();

                using (var ms = new MemoryStream())
                {
                    xtraReport.SaveLayout(ms);

                    ms.Position = 0;

                    cliente.ModeloDocumento = ms.ToArray();
                }
            }
        }
Exemplo n.º 9
0
        private void toolStripButton1_Click(object sender, EventArgs e)
        {
            Factura factura = bsFactura.Current as Factura;

            if (factura != null)
            {
                XtraReportFactura xtraReport = new XtraReportFactura
                {
                    Factura = factura
                };
                ReportDesignTool dt = new ReportDesignTool(xtraReport);

                // Invoke the Ribbon End-User Designer form modally.
                dt.ShowRibbonDesignerDialog();
            }
        }
Exemplo n.º 10
0
 private void simpleButton1_Click(object sender, EventArgs e)
 {
     designer = new ReportDesignTool(new XtraReport1());
     designer.DesignRibbonForm.DesignMdiController.DesignPanelLoaded += DesignMdiController_DesignPanelLoaded;
     designer.ShowRibbonDesignerDialog();
 }