Esempio n. 1
0
        private void ImprimirBoletasdeInventario()
        {
            DevExpress.XtraReports.UI.XtraReport report = DevExpress.XtraReports.UI.XtraReport.FromFile("./Reportes/rptBoletasInv.repx", true);

            SqlDataSource sqlDataSource = report.DataSource as SqlDataSource;

            SqlDataSource ds = report.DataSource as SqlDataSource;

            ds.ConnectionName = "sqlDataSource1";
            String sNameConexion = (Security.Esquema.Compania == "CEDETSA") ? "StringConCedetsa" : "StringConDasa";

            System.Data.SqlClient.SqlConnectionStringBuilder builder = new System.Data.SqlClient.SqlConnectionStringBuilder(System.Configuration.ConfigurationManager.ConnectionStrings[sNameConexion].ConnectionString);
            ds.ConnectionParameters = new DevExpress.DataAccess.ConnectionParameters.MsSqlConnectionParameters(builder.DataSource, builder.InitialCatalog, builder.UserID, builder.Password, MsSqlAuthorizationType.SqlServer);

            // Obtain a parameter, and set its value.
            report.Parameters["IDBodega"].Value            = Convert.ToInt32(GetDefaultValue(this.slkupBodega));
            report.Parameters["IDProducto"].Value          = Convert.ToInt32(GetDefaultValue(this.slkupProducto));
            report.Parameters["Clasif1"].Value             = Convert.ToInt32(GetDefaultValue(this.slkupClasif1));
            report.Parameters["Clasif2"].Value             = Convert.ToInt32(GetDefaultValue(this.slkupClasif2));
            report.Parameters["Clasif3"].Value             = Convert.ToInt32(GetDefaultValue(this.slkupClasif3));
            report.Parameters["Clasif4"].Value             = Convert.ToInt32(GetDefaultValue(this.slkupClasif4));
            report.Parameters["Clasif5"].Value             = Convert.ToInt32(GetDefaultValue(this.slkupClasif5));
            report.Parameters["Clasif6"].Value             = Convert.ToInt32(GetDefaultValue(this.slkupClasif6));
            report.Parameters["ConsolidaByProducto"].Value = Convert.ToBoolean(swichtAgrupa.EditValue);


            // Show the report's print preview.
            DevExpress.XtraReports.UI.ReportPrintTool tool = new DevExpress.XtraReports.UI.ReportPrintTool(report);

            tool.ShowPreview();
        }
Esempio n. 2
0
        void ofrmListarFormatos_FormClosed(object sender, FormClosedEventArgs e)
        {
            frmSeleccionFormatoCheque ofrm = (frmSeleccionFormatoCheque)sender;
            String path = Path.Combine(Directory.GetCurrentDirectory(), "FormatosCheques", string.Format("Formato-{0}.repx", ofrm.IDFormato)).ToString();

            DevExpress.XtraReports.UI.XtraReport report = DevExpress.XtraReports.UI.XtraReport.FromFile(path, true);


            SqlDataSource sqlDataSource = report.DataSource as SqlDataSource;

            SqlDataSource ds = report.DataSource as SqlDataSource;

            ds.ConnectionName = "sqlDataSource1";
            String sNameConexion = (Security.Esquema.Compania == "CEDETSA") ? "StringConCedetsa" : "StringConDasa";

            System.Data.SqlClient.SqlConnectionStringBuilder builder = new System.Data.SqlClient.SqlConnectionStringBuilder(System.Configuration.ConfigurationManager.ConnectionStrings[sNameConexion].ConnectionString);
            ds.ConnectionParameters = new DevExpress.DataAccess.ConnectionParameters.MsSqlConnectionParameters(builder.DataSource, builder.InitialCatalog, builder.UserID, builder.Password, MsSqlAuthorizationType.SqlServer);

            // Obtain a parameter, and set its value.
            report.Parameters["Numero"].Value        = Convert.ToInt32(_currentRow["Numero"]);
            report.Parameters["IDCuentaBanco"].Value = Convert.ToInt32(_currentRow["IDCuentaBanco"]);;
            report.Parameters["IDTipo"].Value        = Convert.ToInt32(_currentRow["IDTipo"]);;
            report.Parameters["IDSubTipo"].Value     = Convert.ToInt32(_currentRow["IDSubTipo"]);;

            // Show the report's print preview.
            DevExpress.XtraReports.UI.ReportPrintTool tool = new DevExpress.XtraReports.UI.ReportPrintTool(report);

            tool.ShowPreview();
            SetChequeImpreso();
        }
Esempio n. 3
0
        private void btnImprimir_ItemClick_1(object sender, DevExpress.XtraBars.ItemClickEventArgs e)
        {
            String path = "";

            if (_currentRow["Asiento"].ToString() != "")
            {
                //Obtener el listado de formatos
                DataSet dsFormatos = CuentaFormatoChequeDAC.GetData(Convert.ToInt32(_currentRow["IDCuentaBanco"]), -1);
                if (dsFormatos.Tables.Count > 0)
                {
                    if (dsFormatos.Tables[0].Rows.Count > 0)
                    {
                        DataTable tmpTable = new DataTable();
                        DataView  dv       = new DataView(dsFormatos.Tables[0]);
                        dv.RowFilter = "Activo=1";
                        tmpTable     = dv.ToTable();
                        if (tmpTable.Rows.Count == 1)
                        {
                            //cargar el formato por defecto
                            path = Path.Combine(Directory.GetCurrentDirectory(), "FormatosCheques", string.Format("Formato-{0}.repx", tmpTable.Rows[0]["IDFormato"].ToString())).ToString();
                            DevExpress.XtraReports.UI.XtraReport report = DevExpress.XtraReports.UI.XtraReport.FromFile(path, true);


                            SqlDataSource sqlDataSource = report.DataSource as SqlDataSource;

                            SqlDataSource ds = report.DataSource as SqlDataSource;
                            ds.ConnectionName = "sqlDataSource1";
                            String sNameConexion = (Security.Esquema.Compania == "CEDETSA") ? "StringConCedetsa" : "StringConDasa";
                            System.Data.SqlClient.SqlConnectionStringBuilder builder = new System.Data.SqlClient.SqlConnectionStringBuilder(System.Configuration.ConfigurationManager.ConnectionStrings[sNameConexion].ConnectionString);
                            ds.ConnectionParameters = new DevExpress.DataAccess.ConnectionParameters.MsSqlConnectionParameters(builder.DataSource, builder.InitialCatalog, builder.UserID, builder.Password, MsSqlAuthorizationType.SqlServer);

                            // Obtain a parameter, and set its value.
                            report.Parameters["Numero"].Value        = Convert.ToInt32(_currentRow["Numero"]);
                            report.Parameters["IDCuentaBanco"].Value = Convert.ToInt32(_currentRow["IDCuentaBanco"]);
                            report.Parameters["IDTipo"].Value        = Convert.ToInt32(_currentRow["IDTipo"]);
                            report.Parameters["IDSubTipo"].Value     = Convert.ToInt32(_currentRow["IDSubTipo"]);

                            // Show the report's print preview.
                            DevExpress.XtraReports.UI.ReportPrintTool tool = new DevExpress.XtraReports.UI.ReportPrintTool(report);
                            tool.ShowPreview();
                            SetChequeImpreso();
                        }
                        else
                        {
                            //Seleccionar de la lista de formatos
                            frmSeleccionFormatoCheque ofrmListarFormatos = new frmSeleccionFormatoCheque(tmpTable);
                            ofrmListarFormatos.FormClosed += ofrmListarFormatos_FormClosed;
                            ofrmListarFormatos.ShowDialog();
                        }
                    }
                }
            }
        }
Esempio n. 4
0
        private void btnAceptar_Click(object sender, EventArgs e)
        {
            try
            {
                //Mostrar el reporte de Balance General
                String sMensaje = "";
                if (this.dtpFechaInicial.EditValue == null)
                {
                    sMensaje = "  •Seleccione la fecha Inicial del Reporte \n\r ";
                }
                if (this.dtpFechaFinal.EditValue == null)
                {
                    sMensaje = "  •Seleccione la fecha final del Reporte \n\r ";
                }
                if (sMensaje != "")
                {
                    MessageBox.Show("Han ocurrido los siguientes errores: \n\r " + sMensaje);
                    return;
                }



                DevExpress.XtraReports.UI.XtraReport report = DevExpress.XtraReports.UI.XtraReport.FromFile("./Reporte/ReportesFinancieros/Plantilla/rptBalanceGeneral.repx", true);
                //Reporte.Asiento.rptAsiento report = new Reporte.Asiento.rptAsiento();

                SqlDataSource sqlDataSource = report.DataSource as SqlDataSource;



                SqlDataSource ds = report.DataSource as SqlDataSource;

                ds.ConnectionName = "sqlDataSource1";
                String sNameConexion = (Security.Esquema.Compania == "CEDETSA") ? "StringConCedetsa" : "StringConDasa";
                System.Data.SqlClient.SqlConnectionStringBuilder builder = new System.Data.SqlClient.SqlConnectionStringBuilder(System.Configuration.ConfigurationManager.ConnectionStrings[sNameConexion].ConnectionString);
                ds.ConnectionParameters = new DevExpress.DataAccess.ConnectionParameters.MsSqlConnectionParameters(builder.DataSource, builder.InitialCatalog, builder.UserID, builder.Password, MsSqlAuthorizationType.SqlServer);



                // Obtain a parameter, and set its value.
                report.Parameters["PFechaInicial"].Value = Convert.ToDateTime(this.dtpFechaInicial.EditValue);
                report.Parameters["PFechaFinal"].Value   = Convert.ToDateTime(this.dtpFechaFinal.EditValue);
                report.Parameters["Moneda"].Value        = (this.rgMoneda.SelectedIndex == 0) ? "L" : "D";

                // Show the report's print preview.
                DevExpress.XtraReports.UI.ReportPrintTool tool = new DevExpress.XtraReports.UI.ReportPrintTool(report);

                tool.ShowPreview();
            }
            catch (Exception ex) {
                MessageBox.Show(ex.Message);
            }
        }
Esempio n. 5
0
 public static void PrintBarcodes(List <int> rolls)
 {
     DevExpress.XtraReports.UI.XtraReport rpt = new DevExpress.XtraReports.UI.XtraReport();
     rpt.CreateDocument();
     rpt.PrintingSystem.ContinuousPageNumbering = false;
     foreach (int r in rolls)
     {
         Models.Stock.Reports.rptStockRollBarcode frm = new Models.Stock.Reports.rptStockRollBarcode();
         frm.Parameters["StockRollID"].Value = r;
         frm.CreateDocument();
         rpt.Pages.AddRange(frm.Pages);
     }
     DevExpress.XtraReports.UI.ReportPrintTool print = new DevExpress.XtraReports.UI.ReportPrintTool(rpt);
     print.ShowPreview();
 }
Esempio n. 6
0
        private void btnPrint_Click(object sender, EventArgs e)
        {
            List <Trademark> tm_list = new List <Trademark>();

            if (rbPrintChoosen.Checked)
            {
                if (gridView1.SelectedRowsCount > 0)
                {
                    int Id = Convert.ToInt32(gridView1.GetRowCellValue(gridView1.GetSelectedRows()[0], gridView1.Columns["Id"]).ToString());
                    tm_list = tempRecList.Where(i => i.Id == Id).ToList(); //.First()
                }
            }
            else if (rbPrintAll.Checked)
            {
                //tm_list = filteredRecs;
                for (int m = 0; m < gridView1.RowCount; m++)
                {
                    int Id = Convert.ToInt32(gridView1.GetRowCellValue(m, "Id").ToString());
                    tm_list.Add(tempRecList.Where(i => i.Id == Id).First());
                }
            }


            List <Trademark_Full> TM_Full_List = new List <Trademark_Full>();

            foreach (Trademark tm in tm_list)
            {
                TM_Full_List.Add(new Trademark_Full(tm));
            }

            if (TM_Full_List.Count > 0)
            {
                BindingList <Trademark_Full> tmBList = new BindingList <Trademark_Full>(TM_Full_List);

                //send tm_list to report
                Report_TmBasic rep_tmBasic = new Report_TmBasic(tmBList);

                DevExpress.XtraReports.UI.ReportPrintTool RepPrintTool = new DevExpress.XtraReports.UI.ReportPrintTool(rep_tmBasic);

                //rep_tmBasic.ShowPreviewMarginLines = false;
                RepPrintTool.PreviewForm.AllowFormSkin = false;

                RepPrintTool.ShowPreview();
            }
        }
Esempio n. 7
0
        private void btnImprimir_ItemClick(object sender, DevExpress.XtraBars.ItemClickEventArgs e)
        {
            DevExpress.XtraReports.UI.XtraReport report = DevExpress.XtraReports.UI.XtraReport.FromFile("./Reportes/rptSolicitudCompra.repx", true);

            SqlDataSource ds = report.DataSource as SqlDataSource;

            ds.ConnectionName = "DataSource";
            String sNameConexion = (Security.Esquema.Compania == "CEDETSA") ? "StringConCedetsa" : "StringConDasa";

            System.Data.SqlClient.SqlConnectionStringBuilder builder = new System.Data.SqlClient.SqlConnectionStringBuilder(System.Configuration.ConfigurationManager.ConnectionStrings[sNameConexion].ConnectionString);
            ds.ConnectionParameters = new DevExpress.DataAccess.ConnectionParameters.MsSqlConnectionParameters(builder.DataSource, builder.InitialCatalog, builder.UserID, builder.Password, MsSqlAuthorizationType.SqlServer);

            // Obtain a parameter, and set its value.
            report.Parameters["IDSolicitudCompra"].Value = Convert.ToInt32(this.txtIDSolicitud.Tag.ToString().Trim());

            // Show the report's print preview.
            DevExpress.XtraReports.UI.ReportPrintTool tool = new DevExpress.XtraReports.UI.ReportPrintTool(report);

            tool.ShowPreview();
        }
Esempio n. 8
0
        private void btnAceptar_Click(object sender, EventArgs e)
        {
            //Obtener todas las variables
            int BaseReporte = 0;
            int Moneda      = 1;

            BaseReporte = Convert.ToInt32(this.rgBaseReporte.EditValue);
            Moneda      = Convert.ToInt32(this.rgMoneda.EditValue);


            //guarar los parametros de centros y Cuentas
            if (ReportesDAC.SetCuentaCentroReporte("", sCentrosSelected, 1, sUsuario))
            {
                //Mostrar el reporte
                DevExpress.XtraReports.UI.XtraReport report = DevExpress.XtraReports.UI.XtraReport.FromFile("./Reporte/ReportesFinancieros/Plantilla/rptEstadoResultado.repx", true);

                SqlDataSource sqlDataSource = report.DataSource as SqlDataSource;



                SqlDataSource ds = report.DataSource as SqlDataSource;

                ds.ConnectionName = "sqlDataSource1";
                String sNameConexion = (Security.Esquema.Compania == "CEDETSA") ? "StringConCedetsa" : "StringConDasa";
                System.Data.SqlClient.SqlConnectionStringBuilder builder = new System.Data.SqlClient.SqlConnectionStringBuilder(System.Configuration.ConfigurationManager.ConnectionStrings[sNameConexion].ConnectionString);
                ds.ConnectionParameters = new DevExpress.DataAccess.ConnectionParameters.MsSqlConnectionParameters(builder.DataSource, builder.InitialCatalog, builder.UserID, builder.Password, MsSqlAuthorizationType.SqlServer);


                // Obtain a parameter, and set its value.

                report.Parameters["FechaInicial"].Value = Convert.ToDateTime(this.dtFechaDesde.EditValue);
                report.Parameters["FechaFinal"].Value   = Convert.ToDateTime(this.dtFechaHasta.EditValue);
                report.Parameters["Moneda"].Value       = Moneda;
                report.Parameters["BaseReporte"].Value  = BaseReporte;

                // Show the report's print preview.
                DevExpress.XtraReports.UI.ReportPrintTool tool = new DevExpress.XtraReports.UI.ReportPrintTool(report);

                tool.ShowPreview();
            }
        }
Esempio n. 9
0
        private void btnPrint_Click(object sender, EventArgs e)
        {
            List <Trademark> tm_list = new List <Trademark>();

            if (rbPrintChoosen.Checked)
            {
                if (dgvTempRecs.SelectedRows.Count > 0)
                {
                    int Id = Convert.ToInt32(dgvTempRecs.SelectedRows[0].Cells["tmp_Id"].Value.ToString());
                    tm_list = tempRecList.Where(i => i.Id == Id).ToList(); //.First()
                }
            }
            else if (rbPrintAll.Checked)
            {
                tm_list = filteredRecs;
            }

            List <Trademark_Full> TM_Full_List = new List <Trademark_Full>();

            foreach (Trademark tm in tm_list)
            {
                TM_Full_List.Add(new Trademark_Full(tm));
            }

            if (TM_Full_List.Count > 0)
            {
                BindingList <Trademark_Full> tmBList = new BindingList <Trademark_Full>(TM_Full_List);

                //send tm_list to report
                Report_TmBasic rep_tmBasic = new Report_TmBasic(tmBList);

                DevExpress.XtraReports.UI.ReportPrintTool RepPrintTool = new DevExpress.XtraReports.UI.ReportPrintTool(rep_tmBasic);

                //rep_tmBasic.ShowPreviewMarginLines = false;
                RepPrintTool.PreviewForm.AllowFormSkin = false;

                RepPrintTool.ShowPreview();
            }
        }
Esempio n. 10
0
 public void PrintListBarcode(DataTable listBarcode)
 {
     try
     {
         View.RegistBarcodes.rptListBarcode _report = new View.RegistBarcodes.rptListBarcode();
         _report.DataSource = listBarcode;
         if (GeneralHelper.ValidPrinter(GlobalConstants.printerName))
         {
             _report.PrinterName = GlobalConstants.printerName;
             DevExpress.XtraReports.UI.ReportPrintTool rpt = new DevExpress.XtraReports.UI.ReportPrintTool(_report);
             rpt.AutoShowParametersPanel = false;
             rpt.Print();
         }
         else
         {
             DevExpress.XtraReports.UI.ReportPrintTool rpt = new DevExpress.XtraReports.UI.ReportPrintTool(_report);
             rpt.AutoShowParametersPanel = false;
             rpt.ShowPreview();
         }
     }
     catch { }
 }
Esempio n. 11
0
        private void btnExportar_ItemClick(object sender, DevExpress.XtraBars.ItemClickEventArgs e)
        {
            if (this.slkupProducto.EditValue != null || this.slkupProducto.EditValue.ToString() != "")
            {
                if (this.TabControl.SelectedTabPageIndex == 0 || this.TabControl.SelectedTabPageIndex == 1 || this.TabControl.SelectedTabPageIndex == 2)
                {
                    DevExpress.XtraReports.UI.XtraReport report = DevExpress.XtraReports.UI.XtraReport.FromFile("./Reportes/rptFichaProducto.repx", true);


                    SqlDataSource sqlDataSource = report.DataSource as SqlDataSource;

                    SqlDataSource ds = report.DataSource as SqlDataSource;
                    ds.ConnectionName = "sqlDataSource1";
                    String sNameConexion = (Security.Esquema.Compania == "CEDETSA") ? "StringConCedetsa" : "StringConDasa";
                    System.Data.SqlClient.SqlConnectionStringBuilder builder = new System.Data.SqlClient.SqlConnectionStringBuilder(System.Configuration.ConfigurationManager.ConnectionStrings[sNameConexion].ConnectionString);
                    ds.ConnectionParameters = new DevExpress.DataAccess.ConnectionParameters.MsSqlConnectionParameters(builder.DataSource, builder.InitialCatalog, builder.UserID, builder.Password, MsSqlAuthorizationType.SqlServer);

                    // Obtain a parameter, and set its value.
                    report.Parameters["IDProducto"].Value = Convert.ToInt32(this.slkupProducto.EditValue);
                    report.Parameters["Descr"].Value      = "*";

                    // Show the report's print preview.
                    DevExpress.XtraReports.UI.ReportPrintTool tool = new DevExpress.XtraReports.UI.ReportPrintTool(report);

                    tool.ShowPreview();
                }
                else if (this.TabControl.SelectedTabPageIndex == 3)
                {
                    ExportarToExcel(this.gridView1, "Existencias Inventario", "Existencias");
                }
                else if (this.TabControl.SelectedTabPageIndex == 4)
                {
                    ExportarToExcel(this.gridView2, "Transacciones Inventario", "Transacciones");
                }
            }
        }
Esempio n. 12
0
 private void Print()
 {
     var P = new DevExpress.XtraReports.UI.ReportPrintTool(new XtraReport1()
         {
             DataSource = new BindingSource()
             {
                 DataSource = GetData()
             }
         });
     P.Report.CreateDocument(false);
     P.ShowPreview();
 }
        private void btnRpt_ItemClick(object sender, DevExpress.XtraBars.ItemClickEventArgs e)
        {
            if (pATIENT_MachineScheduleBindingSource.Current == null)
            {
                XtraMessageBox.Show("请选择需要生成报表的患者基本记录.");
                return;
            }
            if (lstBloodCleanup.Count() < 1)
            {
                XtraMessageBox.Show("未找到血液净化相关记录.");
                return;
            }

            PATIENT_REGIST p = db.FirstOrDefault<PATIENT_REGIST>("where id = @0", new object[] { ((MACHINE_SCHEDULE)pATIENT_MachineScheduleBindingSource.Current).REG_ID });

            if (p != null)
            {
                Rpt_bloodCleanup rpt = new Rpt_bloodCleanup(p.NAME,
                    Convert.ToInt32(p.AGE),
                    p.SEX,
                    lstProcess, lstBloodCleanup[0],
                    db.Fetch<VALUE_CODE>(""));

                DevExpress.XtraReports.UI.ReportPrintTool rptPrint = new DevExpress.XtraReports.UI.ReportPrintTool(rpt);

                rptPrint.ShowPreview();
                rpt.SetDspMember();
            }
            else
            {
                XtraMessageBox.Show("未找到该患者的挂号登记信息.", "错误提示");
            }
        }
Esempio n. 14
0
        private void btnAceptar_Click(object sender, EventArgs e)
        {
            //Obtener todas las variables
            int ConsolidadPorcuenta     = 0;
            int IncluirAsientosDeDiario = 0;
            int SoloCuentasMayor        = 0;
            int CuentasSinMovimientos   = 0;
            int Moneda = 1;

            if (this.chkConsilidarByCuenta.Checked == true)
            {
                ConsolidadPorcuenta = 1;
            }
            if (this.chkIncluirAsientosdeDiario.Checked == true)
            {
                IncluirAsientosDeDiario = 1;
            }
            if (this.chkSoloCuentadeMayor.Checked == true)
            {
                SoloCuentasMayor = 1;
            }
            else
            {
                SoloCuentasMayor = -1;
            }
            CuentasSinMovimientos = Convert.ToInt32(this.rgCuentasSinMovimientos.EditValue);
            Moneda = Convert.ToInt32(this.rgMonedas.EditValue);

            //guarar los parametros de centros y Cuentas
            if (ReportesDAC.SetCuentaCentroReporte(sCuentasSelected, sCentrosSelected, 1, sUsuario))
            {
                //Mostrar el reporte
                DevExpress.XtraReports.UI.XtraReport report = DevExpress.XtraReports.UI.XtraReport.FromFile("./Reporte/ReportesFinancieros/Plantilla/rptBalanceComprobacion.repx", true);

                SqlDataSource sqlDataSource = report.DataSource as SqlDataSource;



                SqlDataSource ds = report.DataSource as SqlDataSource;

                ds.ConnectionName = "sqlDataSource1";
                String sNameConexion = (Security.Esquema.Compania == "CEDETSA") ? "StringConCedetsa" : "StringConDasa";
                System.Data.SqlClient.SqlConnectionStringBuilder builder = new System.Data.SqlClient.SqlConnectionStringBuilder(System.Configuration.ConfigurationManager.ConnectionStrings[sNameConexion].ConnectionString);
                ds.ConnectionParameters = new DevExpress.DataAccess.ConnectionParameters.MsSqlConnectionParameters(builder.DataSource, builder.InitialCatalog, builder.UserID, builder.Password, MsSqlAuthorizationType.SqlServer);


                // Obtain a parameter, and set its value.
                report.Parameters["ConsolidadoByCuenta"].Value    = ConsolidadPorcuenta;
                report.Parameters["FechaInicial"].Value           = Convert.ToDateTime(dtpFechaInicial.EditValue);
                report.Parameters["FechaFinal"].Value             = Convert.ToDateTime(dtpFechaFinal.EditValue);
                report.Parameters["IDReporte"].Value              = 1;
                report.Parameters["IncluyeAsientoDeDiario"].Value = IncluirAsientosDeDiario;
                report.Parameters["Moneda"].Value                  = Moneda;
                report.Parameters["SoloCuentaMayor"].Value         = SoloCuentasMayor;
                report.Parameters["TipoCuentaSinMovimiento"].Value = CuentasSinMovimientos;
                report.Parameters["Usuario"].Value                 = sUsuario;
                // Show the report's print preview.
                DevExpress.XtraReports.UI.ReportPrintTool tool = new DevExpress.XtraReports.UI.ReportPrintTool(report);

                tool.ShowPreview();
            }
        }
Esempio n. 15
0
 private void печатьToolStripMenuItem_Click(object sender, EventArgs e)
 {
     if (textBox1.Text != string.Empty && textBox2.Text != string.Empty)
     {
         switch (comboBox1.Text)
         {
             case "Квартира":
                 {
                     Rep = new DevExpress.XtraReports.UI.ReportPrintTool(new FReport()
                     {
                         DataSource = new BindingSource()
                         {
                             DataSource = GetDataFlat()
                         }
                     });
                     Rep.Report.CreateDocument(false);
                     Rep.ShowPreview();
                 }; break;
             case "Дом":
                 {
                     Rep = new DevExpress.XtraReports.UI.ReportPrintTool(new HReport()
                     {
                         DataSource = new BindingSource()
                         {
                             DataSource = GetDataHouse()
                         }
                     });
                     Rep.Report.CreateDocument(false);
                     Rep.ShowPreview();
                 }; break;
             case "Земельный участок":
                 {
                     Rep = new DevExpress.XtraReports.UI.ReportPrintTool(new LReport()
                     {
                         DataSource = new BindingSource()
                         {
                             DataSource = GetDataLand()
                         }
                     });
                     Rep.Report.CreateDocument(false);
                     Rep.ShowPreview();
                 }; break;
             case "Коммерческая недвижимость":
                 {
                     Rep = new DevExpress.XtraReports.UI.ReportPrintTool(new LbReport()
                     {
                         DataSource = new BindingSource()
                         {
                             DataSource = new Land() { Name = textBox1.Text, Phone = textBox2.Text, S = textBox7.Text, Far = textBox8.Text, Type = comboBox4.Text, Emid = checkBox1.Checked, Q = checkBox2.Checked, P = textBox6.Text, PForm = comboBox9.Text }
                         }
                     });
                     Rep.Report.CreateDocument(false);
                     Rep.ShowPreview();
                 }; break;
             default: return;
         }
     }
 }
Esempio n. 16
0
 private void button4_Click(object sender, EventArgs e)
 {
     var R = new XtraReport1();
     R.Filling(LR);
     var RPT = new DevExpress.XtraReports.UI.ReportPrintTool(R);
     RPT.ShowPreview();
 }