Пример #1
0
        public void Imprimir()
        {
            try
            {
                System.Data.DataTable dtReporte = new System.Data.DataTable();
                ObservableCollection <Infrastructure.Aspect.DataAccess.DataAccessFilterSQL> _listFilters = new ObservableCollection <Infrastructure.Aspect.DataAccess.DataAccessFilterSQL>();
                _listFilters.Add(new Infrastructure.Aspect.DataAccess.DataAccessFilterSQL()
                {
                    FilterName = "@psinEMPR_Codigo", FilterValue = Delfin.Controls.Entorno.ItemEmpresa.EMPR_Codigo, FilterType = Infrastructure.Aspect.DataAccess.DataAccessFilterTypes.Int16, FilterSize = 2
                });
                //_listFilters.Add(new Infrastructure.Aspect.DataAccess.DataAccessFilterSQL() { FilterName = "@pchrCUBA_Codigo", FilterValue = F_CUBA_Codigo, FilterType = Infrastructure.Aspect.DataAccess.DataAccessFilterTypes.Char, FilterSize = 3 });
                _listFilters.Add(new Infrastructure.Aspect.DataAccess.DataAccessFilterSQL()
                {
                    FilterName = "@FecIni", FilterValue = F_FecIni, FilterType = Infrastructure.Aspect.DataAccess.DataAccessFilterTypes.DateTime, FilterSize = 8
                });
                _listFilters.Add(new Infrastructure.Aspect.DataAccess.DataAccessFilterSQL()
                {
                    FilterName = "@FecFin", FilterValue = F_FecFin, FilterType = Infrastructure.Aspect.DataAccess.DataAccessFilterTypes.DateTime, FilterSize = 8
                });
                //_listFilters.Add(new Infrastructure.Aspect.DataAccess.DataAccessFilterSQL() { FilterName = "@pchrMOVI_EstadoCheque", FilterValue = F_MOVI_EstadoCheque, FilterType = Infrastructure.Aspect.DataAccess.DataAccessFilterTypes.Char, FilterSize = 1 });
                //_listFilters.Add(new Infrastructure.Aspect.DataAccess.DataAccessFilterSQL() { FilterName = "@TipoCheque", FilterValue = F_TipoCheque, FilterType = Infrastructure.Aspect.DataAccess.DataAccessFilterTypes.Char, FilterSize = 1 });

                dtReporte = Client.GetDTCuentasBancarias("CAJ_REPOSS_Cheques", _listFilters);

                if (dtReporte != null && dtReporte.Rows.Count > 0)
                {
                    String ReportPath = null;
                    dtReporte.TableName = "DSDetalle";
                    ReportPath          = Application.StartupPath + @"\Reportes\REP002Cheques.rdlc";
                    ReportDataSource RepDetalle = new ReportDataSource("DSDetalle", dtReporte);

                    Microsoft.Reporting.WinForms.ReportParameter[] Parameters = new Microsoft.Reporting.WinForms.ReportParameter[8];

                    String _fecha = Fecha.ToString("dd/MM/yyyy HH:mm");
                    Parameters[0] = new Microsoft.Reporting.WinForms.ReportParameter("Titulo", Title);
                    Parameters[1] = new Microsoft.Reporting.WinForms.ReportParameter("FechaHora", _fecha);
                    Parameters[2] = new Microsoft.Reporting.WinForms.ReportParameter("CuentaCorriente", "-");
                    Parameters[3] = new Microsoft.Reporting.WinForms.ReportParameter("FechaDesde", F_FecIni.Value.ToString("dd/MM/yyyy"));
                    Parameters[4] = new Microsoft.Reporting.WinForms.ReportParameter("FechaHasta", F_FecFin.Value.ToString("dd/MM/yyyy"));
                    Parameters[5] = new Microsoft.Reporting.WinForms.ReportParameter("Estado", "-");
                    Parameters[6] = new Microsoft.Reporting.WinForms.ReportParameter("EntidadBancaria", "-");
                    Parameters[7] = new Microsoft.Reporting.WinForms.ReportParameter("Tipo", "-");

                    Visualizador rpt = new Visualizador("Reporte de Cheques", ReportPath, RepDetalle, Parameters);
                    rpt.StartPosition = FormStartPosition.CenterScreen;
                    rpt.Imprimir();
                    rpt.ShowDialog();
                }
                else
                {
                    Infrastructure.WinForms.Controls.Dialogos.MostrarMensajeInformacion(Title, "No se encontraron registros");
                }
            }
            catch (Exception)
            { throw; }
        }
Пример #2
0
        public void Imprimir()
        {
            try
            {
                System.Data.DataTable dtReporte = new System.Data.DataTable();
                ObservableCollection <Infrastructure.Aspect.DataAccess.DataAccessFilterSQL> _listFilters = new ObservableCollection <Infrastructure.Aspect.DataAccess.DataAccessFilterSQL>();
                _listFilters.Add(new Infrastructure.Aspect.DataAccess.DataAccessFilterSQL()
                {
                    FilterName = "@psinEMPR_Codigo", FilterValue = Delfin.Controls.Entorno.ItemEmpresa.EMPR_Codigo, FilterType = Infrastructure.Aspect.DataAccess.DataAccessFilterTypes.Int16, FilterSize = 2
                });
                _listFilters.Add(new Infrastructure.Aspect.DataAccess.DataAccessFilterSQL()
                {
                    FilterName = "@pchrPLAN_Tipo", FilterValue = Item.PLAN_Tipo, FilterType = Infrastructure.Aspect.DataAccess.DataAccessFilterTypes.Char, FilterSize = 3
                });
                _listFilters.Add(new Infrastructure.Aspect.DataAccess.DataAccessFilterSQL()
                {
                    FilterName = "@pvchPLAN_Codigo", FilterValue = Item.PLAN_Codigo, FilterType = Infrastructure.Aspect.DataAccess.DataAccessFilterTypes.Varchar, FilterSize = 20
                });

                dtReporte = Client.GetDTCuentasBancarias("CAJ_REPOSS_EgresosPorPlanilla", _listFilters);

                if (dtReporte != null && dtReporte.Rows.Count > 0)
                {
                    String ReportPath = null;
                    dtReporte.TableName = "DSDetalle";
                    ReportPath          = Application.StartupPath + @"\Reportes\REP003PlanillaExportacion.rdlc";
                    ReportDataSource RepDetalle = new ReportDataSource("DSDetalle", dtReporte);

                    Microsoft.Reporting.WinForms.ReportParameter[] Parameters = new Microsoft.Reporting.WinForms.ReportParameter[2];
                    Fecha = Client.GetFecha();
                    String _fecha = Fecha.ToString("dd/MM/yyyy HH:mm");
                    Parameters[0] = new Microsoft.Reporting.WinForms.ReportParameter("Titulo", "Reporte de " + Title);
                    Parameters[1] = new Microsoft.Reporting.WinForms.ReportParameter("FechaHora", _fecha);
                    //Parameters[3] = new Microsoft.Reporting.WinForms.ReportParameter("FechaDesde", F_FecIni.Value.ToString("dd/MM/yyyy"));
                    //Parameters[4] = new Microsoft.Reporting.WinForms.ReportParameter("FechaHasta", F_FecFin.Value.ToString("dd/MM/yyyy"));

                    Visualizador rpt = new Visualizador("Reporte de Planilla de Exportación a Bancos", ReportPath, RepDetalle, Parameters);
                    rpt.StartPosition = FormStartPosition.CenterScreen;
                    rpt.Imprimir();
                    rpt.ShowDialog();
                }
                else
                {
                    Infrastructure.WinForms.Controls.Dialogos.MostrarMensajeInformacion(Title, "No se encontraron registros");
                }
            }
            catch (Exception)
            { throw; }
        }
        public void Imprimir()
        {
            try
            {
                System.Data.DataTable dtReporte = new System.Data.DataTable();
                ObservableCollection <Infrastructure.Aspect.DataAccess.DataAccessFilterSQL> _listFilters = new ObservableCollection <Infrastructure.Aspect.DataAccess.DataAccessFilterSQL>();
                _listFilters.Add(new Infrastructure.Aspect.DataAccess.DataAccessFilterSQL()
                {
                    FilterName = "@psinEMPR_Codigo", FilterValue = Delfin.Controls.Entorno.ItemEmpresa.EMPR_Codigo, FilterType = Infrastructure.Aspect.DataAccess.DataAccessFilterTypes.Int16, FilterSize = 2
                });
                _listFilters.Add(new Infrastructure.Aspect.DataAccess.DataAccessFilterSQL()
                {
                    FilterName = "@pintENTC_Codigo", FilterValue = F_Entidad, FilterType = Infrastructure.Aspect.DataAccess.DataAccessFilterTypes.Int32, FilterSize = 24
                });
                _listFilters.Add(new Infrastructure.Aspect.DataAccess.DataAccessFilterSQL()
                {
                    FilterName = "@FecIni", FilterValue = F_FecIni, FilterType = Infrastructure.Aspect.DataAccess.DataAccessFilterTypes.DateTime, FilterSize = 8
                });
                _listFilters.Add(new Infrastructure.Aspect.DataAccess.DataAccessFilterSQL()
                {
                    FilterName = "@FecFin", FilterValue = F_FecFin, FilterType = Infrastructure.Aspect.DataAccess.DataAccessFilterTypes.DateTime, FilterSize = 8
                });
                _listFilters.Add(new Infrastructure.Aspect.DataAccess.DataAccessFilterSQL()
                {
                    FilterName = "@UnidadNegocio", FilterValue = UnidadNegocio, FilterType = Infrastructure.Aspect.DataAccess.DataAccessFilterTypes.Char, FilterSize = 1
                });
                _listFilters.Add(new Infrastructure.Aspect.DataAccess.DataAccessFilterSQL()
                {
                    FilterName = "@HBL", FilterValue = F_HBL, FilterType = Infrastructure.Aspect.DataAccess.DataAccessFilterTypes.Varchar, FilterSize = 20
                });
                _listFilters.Add(new Infrastructure.Aspect.DataAccess.DataAccessFilterSQL()
                {
                    FilterName = "@MBL", FilterValue = F_MBL, FilterType = Infrastructure.Aspect.DataAccess.DataAccessFilterTypes.Varchar, FilterSize = 20
                });
                _listFilters.Add(new Infrastructure.Aspect.DataAccess.DataAccessFilterSQL()
                {
                    FilterName = "@ConsiderarDiferidos", FilterValue = F_ConsiderarAnulados, FilterType = Infrastructure.Aspect.DataAccess.DataAccessFilterTypes.Boolean, FilterSize = 1
                });

                dtReporte = Client.GetDTCuentasBancarias("CAJ_REPOSS_EstadoCuenta", _listFilters);

                if (dtReporte != null && dtReporte.Rows.Count > 0)
                {
                    String ReportPath = null;
                    dtReporte.TableName = "REP001AuxiliarBancos";
                    ReportPath          = Application.StartupPath + @"\Reportes\REP008EstadoCliente.rdlc";
                    ReportDataSource RepDetalle = new ReportDataSource("CAJ_REPOSS_EstadoCuenta", dtReporte);

                    Microsoft.Reporting.WinForms.ReportParameter[] Parameters = new Microsoft.Reporting.WinForms.ReportParameter[10];

                    Parameters[0] = new Microsoft.Reporting.WinForms.ReportParameter("Titulo", "Reporte de Estado Cliente");
                    Parameters[1] = new Microsoft.Reporting.WinForms.ReportParameter("Entidad", F_Entidad.ToString());
                    Parameters[2] = new Microsoft.Reporting.WinForms.ReportParameter("FechaDesde", F_FecIni.Value.ToString("dd/MM/yyyy"));
                    Parameters[3] = new Microsoft.Reporting.WinForms.ReportParameter("FechaHasta", F_FecFin.Value.ToString("dd/MM/yyyy"));
                    Parameters[4] = new Microsoft.Reporting.WinForms.ReportParameter("UnidadNegocio", UnidadNegocioText);
                    Parameters[5] = new Microsoft.Reporting.WinForms.ReportParameter("MBL", (F_MBL == null ? "-" : F_MBL));
                    Parameters[6] = new Microsoft.Reporting.WinForms.ReportParameter("HBL", (F_HBL == null ? "-" : F_HBL));
                    Parameters[7] = new Microsoft.Reporting.WinForms.ReportParameter("ConsiderarAnulados", F_ConsiderarAnulados ? "Considerar Anulados" : "No Considerar Anulados");
                    Parameters[8] = new Microsoft.Reporting.WinForms.ReportParameter("EntidadText", F_EntidadText);
                    Parameters[9] = new Microsoft.Reporting.WinForms.ReportParameter("FechaHora", DateTime.Now.ToString("dd/MM/yyyy HH:mm"));

                    Visualizador rpt = new Visualizador("Reporte de Estado Cliente", ReportPath, RepDetalle, Parameters);
                    rpt.StartPosition = FormStartPosition.CenterScreen;
                    rpt.Imprimir();
                    rpt.ShowDialog();
                }
                else
                {
                    Infrastructure.WinForms.Controls.Dialogos.MostrarMensajeInformacion(Title, "No se encontraron registros");
                }
            }
            catch (Exception)
            { throw; }
        }
        /// <summary>
        /// Imprimir el listado de documentos de una liquidación
        /// </summary>
        public void Imprimir()
        {
            try
            {
                if (Item.ListCtaCte.Count > 0)
                {
                    Liquidar();
                    System.Data.DataTable dtReporte        = new System.Data.DataTable();
                    System.Data.DataTable dtReporteTotales = new System.Data.DataTable();
                    dtReporte = Item.ListCtaCte.Where(O => O.Seleccionar).ToObservableCollection().ToDataTable();

                    ObservableCollection <Entities.CtaCte> x_ListGroup = new ObservableCollection <CtaCte>();
                    x_ListGroup = (from CCCT in Item.ListCtaCte.Where(O => O.Seleccionar).ToObservableCollection()
                                   group CCCT by new { CCCT.TIPO_CodMND, CCCT.TIPO_MND } into LCCCT
                                   select new CtaCte
                    {
                        CCCT_Pendiente = LCCCT.Sum(x => x.CCCT_Pendiente),
                        CCCT_Pendiente_Cargo = LCCCT.Sum(y => y.CCCT_Pendiente_Cargo),
                        CCCT_Pendiente_Abono = LCCCT.Sum(z => z.CCCT_Pendiente_Abono),
                        TIPO_CodMND = LCCCT.Key.TIPO_CodMND,
                        TIPO_MND = LCCCT.Key.TIPO_MND
                    }
                                   ).ToObservableCollection();
                    dtReporteTotales = x_ListGroup.ToDataTable();


                    R_Codigo       = Item.LIQU_Codigo;
                    R_FechaEmision = Item.LIQU_Fecha.Value.ToString("dd/MM/yyyy");
                    R_Glosa        = Item.LIQU_Glosa;

                    if (dtReporte != null && dtReporte.Rows.Count > 0)
                    {
                        String ReportPath = null;
                        dtReporte.TableName = "CtaCte";
                        ReportPath          = Application.StartupPath + @"\Reportes\CAJ006LiquidacionAgentes.rdlc";
                        //ReportDataSource RepDetalle = new ReportDataSource("LiquidacionAgentesDS", dtReporte);

                        Microsoft.Reporting.WinForms.ReportDataSource rds = new Microsoft.Reporting.WinForms.ReportDataSource();
                        rds.Name  = "LiquidacionAgentesDS";
                        rds.Value = dtReporte;

                        Microsoft.Reporting.WinForms.ReportDataSource rdsDet = new Microsoft.Reporting.WinForms.ReportDataSource();
                        rdsDet.Name  = "DSTotales";
                        rdsDet.Value = dtReporteTotales;

                        Dictionary <String, Microsoft.Reporting.WinForms.ReportDataSource> x_subreports = new Dictionary <string, Microsoft.Reporting.WinForms.ReportDataSource>();
                        x_subreports.Add("CAJ006LiquidacionAgentesTotal", rdsDet);

                        Microsoft.Reporting.WinForms.ReportParameter[] Parameters = new Microsoft.Reporting.WinForms.ReportParameter[7];
                        Fecha = Client.GetFecha();
                        String _fecha  = Fecha.ToString("dd/MM/yyyy HH:mm");
                        String _agente = F_ENTC_Codigo.ToString();
                        Parameters[0] = new Microsoft.Reporting.WinForms.ReportParameter("Titulo", "Reporte de " + Title);
                        Parameters[1] = new Microsoft.Reporting.WinForms.ReportParameter("FechaHora", _fecha);
                        Parameters[2] = new Microsoft.Reporting.WinForms.ReportParameter("Agente", R_Agente);
                        Parameters[3] = new Microsoft.Reporting.WinForms.ReportParameter("Codigo", R_Codigo);
                        Parameters[4] = new Microsoft.Reporting.WinForms.ReportParameter("Glosa", R_Glosa);
                        Parameters[5] = new Microsoft.Reporting.WinForms.ReportParameter("FechaEmision", R_FechaEmision);
                        Parameters[6] = new Microsoft.Reporting.WinForms.ReportParameter("Estado", R_Estado);

                        //Visualizador rpt = new Visualizador("Reporte de Liquidación de Agentes", ReportPath, RepDetalle, Parameters);
                        //rpt.StartPosition = FormStartPosition.CenterScreen;
                        //rpt.Imprimir();
                        //rpt.ShowDialog();
                        Visualizador _impresion = new Visualizador("", ReportPath, rds, Parameters, x_subreports, null)
                        {
                            StartPosition = System.Windows.Forms.FormStartPosition.CenterScreen
                        };
                        _impresion.Imprimir();
                        _impresion.ShowDialog();
                    }
                    else
                    {
                        Infrastructure.WinForms.Controls.Dialogos.MostrarMensajeInformacion(Title, "No se encontraron registros");
                    }
                }
            }
            catch (Exception)
            { throw; }
        }
Пример #5
0
        public void Imprimir()
        {
            try
            {
                System.Data.DataTable dtReporte = new System.Data.DataTable();
                ObservableCollection <Infrastructure.Aspect.DataAccess.DataAccessFilterSQL> _listFilters = new ObservableCollection <Infrastructure.Aspect.DataAccess.DataAccessFilterSQL>();
                _listFilters.Add(new Infrastructure.Aspect.DataAccess.DataAccessFilterSQL()
                {
                    FilterName = "@psinEMPR_Codigo", FilterValue = Delfin.Controls.Entorno.ItemEmpresa.EMPR_Codigo, FilterType = Infrastructure.Aspect.DataAccess.DataAccessFilterTypes.Int16, FilterSize = 2
                });
                _listFilters.Add(new Infrastructure.Aspect.DataAccess.DataAccessFilterSQL()
                {
                    FilterName = "@pchrCUBA_Codigo", FilterValue = F_CUBA_Codigo, FilterType = Infrastructure.Aspect.DataAccess.DataAccessFilterTypes.Char, FilterSize = 3
                });
                _listFilters.Add(new Infrastructure.Aspect.DataAccess.DataAccessFilterSQL()
                {
                    FilterName = "@FecIni", FilterValue = F_FecIni, FilterType = Infrastructure.Aspect.DataAccess.DataAccessFilterTypes.DateTime, FilterSize = 8
                });
                _listFilters.Add(new Infrastructure.Aspect.DataAccess.DataAccessFilterSQL()
                {
                    FilterName = "@FecFin", FilterValue = F_FecFin, FilterType = Infrastructure.Aspect.DataAccess.DataAccessFilterTypes.DateTime, FilterSize = 8
                });
                _listFilters.Add(new Infrastructure.Aspect.DataAccess.DataAccessFilterSQL()
                {
                    FilterName = "@pchrTIPO_CodMOV", FilterValue = F_TIPO_CodMOV, FilterType = Infrastructure.Aspect.DataAccess.DataAccessFilterTypes.Varchar, FilterSize = 1024
                });
                _listFilters.Add(new Infrastructure.Aspect.DataAccess.DataAccessFilterSQL()
                {
                    FilterName = "@HBL", FilterValue = F_HBL, FilterType = Infrastructure.Aspect.DataAccess.DataAccessFilterTypes.Varchar, FilterSize = 20
                });
                _listFilters.Add(new Infrastructure.Aspect.DataAccess.DataAccessFilterSQL()
                {
                    FilterName = "@MBL", FilterValue = F_MBL, FilterType = Infrastructure.Aspect.DataAccess.DataAccessFilterTypes.Varchar, FilterSize = 20
                });
                _listFilters.Add(new Infrastructure.Aspect.DataAccess.DataAccessFilterSQL()
                {
                    FilterName = "@ConsiderarAnulados", FilterValue = F_ConsiderarAnulados, FilterType = Infrastructure.Aspect.DataAccess.DataAccessFilterTypes.Boolean, FilterSize = 1
                });

                dtReporte = Client.GetDTCuentasBancarias("CAJ_REPOSS_AuxiliarBancos", _listFilters);

                if (dtReporte != null && dtReporte.Rows.Count > 0)
                {
                    Decimal _saldo = 0;
                    foreach (System.Data.DataRow item in dtReporte.Rows)
                    {
                        _saldo       += Decimal.Parse(item["Debe"].ToString()) - Decimal.Parse(item["Haber"].ToString());
                        item["Saldo"] = _saldo;
                    }

                    String ReportPath = null;
                    dtReporte.TableName = "REP001AuxiliarBancos";
                    ReportPath          = Application.StartupPath + @"\Reportes\REP001AuxiliarBancos.rdlc";
                    ReportDataSource RepDetalle = new ReportDataSource("REP001AuxiliarBancos", dtReporte);

                    Microsoft.Reporting.WinForms.ReportParameter[] Parameters = new Microsoft.Reporting.WinForms.ReportParameter[10];

                    String _fecha = Fecha.ToString("dd/MM/yyyy HH:mm");
                    Parameters[0] = new Microsoft.Reporting.WinForms.ReportParameter("Titulo", "Reporte de Auxiliar de Bancos");
                    Parameters[1] = new Microsoft.Reporting.WinForms.ReportParameter("FechaHora", _fecha);
                    Parameters[2] = new Microsoft.Reporting.WinForms.ReportParameter("CuentaCorriente", F_CUBA_NroCuenta);
                    Parameters[3] = new Microsoft.Reporting.WinForms.ReportParameter("FechaDesde", F_FecIni.Value.ToString("dd/MM/yyyy"));
                    Parameters[4] = new Microsoft.Reporting.WinForms.ReportParameter("FechaHasta", F_FecFin.Value.ToString("dd/MM/yyyy"));
                    Parameters[5] = new Microsoft.Reporting.WinForms.ReportParameter("TipoMovimiento", F_TipoMovimiento);
                    Parameters[6] = new Microsoft.Reporting.WinForms.ReportParameter("MBL", (F_MBL == null ? "-" : F_MBL));
                    Parameters[7] = new Microsoft.Reporting.WinForms.ReportParameter("HBL", (F_HBL == null ? "-" : F_HBL));
                    Parameters[8] = new Microsoft.Reporting.WinForms.ReportParameter("ConsiderarAnulados", F_ConsiderarAnulados ? "Considerar Anulados" : "No Considerar Anulados");
                    Parameters[9] = new Microsoft.Reporting.WinForms.ReportParameter("EntidadBancaria", F_EntidadBancaria);

                    Visualizador rpt = new Visualizador("Reporte de Auxiliar de Bancos", ReportPath, RepDetalle, Parameters);
                    rpt.StartPosition = FormStartPosition.CenterScreen;
                    rpt.Imprimir();
                    rpt.ShowDialog();
                }
                else
                {
                    Infrastructure.WinForms.Controls.Dialogos.MostrarMensajeInformacion(Title, "No se encontraron registros");
                }
            }
            catch (Exception)
            { throw; }
        }
Пример #6
0
        public void Imprimir()
        {
            try
            {
                System.Data.DataTable dtReporte        = new System.Data.DataTable();
                System.Data.DataTable dtReporteTotales = new System.Data.DataTable();
                ObservableCollection <Infrastructure.Aspect.DataAccess.DataAccessFilterSQL> _listFilters = new ObservableCollection <Infrastructure.Aspect.DataAccess.DataAccessFilterSQL>();
                _listFilters.Add(new Infrastructure.Aspect.DataAccess.DataAccessFilterSQL()
                {
                    FilterName = "@psinEMPR_Codigo", FilterValue = Delfin.Controls.Entorno.ItemEmpresa.EMPR_Codigo, FilterType = Infrastructure.Aspect.DataAccess.DataAccessFilterTypes.Int16, FilterSize = 2
                });
                _listFilters.Add(new Infrastructure.Aspect.DataAccess.DataAccessFilterSQL()
                {
                    FilterName = "@psinTIPE_Codigo", FilterValue = F_TIPE_Codigo, FilterType = Infrastructure.Aspect.DataAccess.DataAccessFilterTypes.Int16, FilterSize = 2
                });
                _listFilters.Add(new Infrastructure.Aspect.DataAccess.DataAccessFilterSQL()
                {
                    FilterName = "@pintENTC_Codigo", FilterValue = F_ENTC_Codigo, FilterType = Infrastructure.Aspect.DataAccess.DataAccessFilterTypes.Int32, FilterSize = 4
                });
                _listFilters.Add(new Infrastructure.Aspect.DataAccess.DataAccessFilterSQL()
                {
                    FilterName = "@pchrTIPO_CodDetrac", FilterValue = F_TIPO_CodDetrac, FilterType = Infrastructure.Aspect.DataAccess.DataAccessFilterTypes.Char, FilterSize = 3
                });
                _listFilters.Add(new Infrastructure.Aspect.DataAccess.DataAccessFilterSQL()
                {
                    FilterName = "@HBL", FilterValue = F_HBL, FilterType = Infrastructure.Aspect.DataAccess.DataAccessFilterTypes.Varchar, FilterSize = 20
                });
                _listFilters.Add(new Infrastructure.Aspect.DataAccess.DataAccessFilterSQL()
                {
                    FilterName = "@MBL", FilterValue = F_MBL, FilterType = Infrastructure.Aspect.DataAccess.DataAccessFilterTypes.Varchar, FilterSize = 20
                });
                _listFilters.Add(new Infrastructure.Aspect.DataAccess.DataAccessFilterSQL()
                {
                    FilterName = "@TipoFecha", FilterValue = F_TipoFecha, FilterType = Infrastructure.Aspect.DataAccess.DataAccessFilterTypes.Char, FilterSize = 2
                });
                _listFilters.Add(new Infrastructure.Aspect.DataAccess.DataAccessFilterSQL()
                {
                    FilterName = "@FecIni", FilterValue = F_FecIni, FilterType = Infrastructure.Aspect.DataAccess.DataAccessFilterTypes.DateTime, FilterSize = 8
                });
                _listFilters.Add(new Infrastructure.Aspect.DataAccess.DataAccessFilterSQL()
                {
                    FilterName = "@FecFin", FilterValue = F_FecFin, FilterType = Infrastructure.Aspect.DataAccess.DataAccessFilterTypes.DateTime, FilterSize = 8
                });
                _listFilters.Add(new Infrastructure.Aspect.DataAccess.DataAccessFilterSQL()
                {
                    FilterName = "@pintNVIA_Codigo", FilterValue = F_NVIA_Codigo, FilterType = Infrastructure.Aspect.DataAccess.DataAccessFilterTypes.Int32, FilterSize = 4
                });

                _listFilters.Add(new Infrastructure.Aspect.DataAccess.DataAccessFilterSQL()
                {
                    FilterName = "@SoloPendientes", FilterValue = F_SoloMostrarPendientes, FilterType = Infrastructure.Aspect.DataAccess.DataAccessFilterTypes.Boolean, FilterSize = 1
                });
                _listFilters.Add(new Infrastructure.Aspect.DataAccess.DataAccessFilterSQL()
                {
                    FilterName = "@ConDetraccion", FilterValue = F_ConDetraccion, FilterType = Infrastructure.Aspect.DataAccess.DataAccessFilterTypes.Boolean, FilterSize = 1
                });
                _listFilters.Add(new Infrastructure.Aspect.DataAccess.DataAccessFilterSQL()
                {
                    FilterName = "@TipoRegistro", FilterValue = F_TipoRegistro, FilterType = Infrastructure.Aspect.DataAccess.DataAccessFilterTypes.Char, FilterSize = 1
                });
                if (TipoReporte == TReporte.Agente)
                {
                    _listFilters.Add(new Infrastructure.Aspect.DataAccess.DataAccessFilterSQL()
                    {
                        FilterName = "@MonedaOriginal", FilterValue = true, FilterType = Infrastructure.Aspect.DataAccess.DataAccessFilterTypes.Boolean, FilterSize = 1
                    });
                }

                System.Data.DataSet DSDatos = Client.GetDSDocsVta("CAJ_REPOSS_TodosDocumentos", _listFilters);
                dtReporte        = DSDatos.Tables[0];
                dtReporteTotales = DSDatos.Tables[1];

                if (dtReporte != null && dtReporte.Rows.Count > 0)
                {
                    String ReportPath = null;
                    dtReporte.TableName = "DSDetalle";

                    if (F_ConDetraccion)
                    {
                        ReportPath = Application.StartupPath + @"\Reportes\REP006DetraccionPendientes.rdlc";
                    }
                    else
                    {
                        ReportPath = Application.StartupPath + @"\Reportes\REP004DocRecepcionados.rdlc";
                    }

                    Microsoft.Reporting.WinForms.ReportDataSource rds = new Microsoft.Reporting.WinForms.ReportDataSource();
                    rds.Name  = "DSDetalle";
                    rds.Value = dtReporte;

                    Microsoft.Reporting.WinForms.ReportDataSource rdsDet = new Microsoft.Reporting.WinForms.ReportDataSource();
                    rdsDet.Name  = "DSTotales";
                    rdsDet.Value = dtReporteTotales;

                    Dictionary <String, Microsoft.Reporting.WinForms.ReportDataSource> x_subreports = new Dictionary <string, Microsoft.Reporting.WinForms.ReportDataSource>();

                    String _titulo = "";
                    switch (TipoReporte)
                    {
                    case TReporte.Agente: // "Agente":
                        if (!F_ENTC_Codigo.HasValue)
                        {
                            ReportPath = Application.StartupPath + @"\Reportes\REP004DocRecepcionadosAgenteTodos.rdlc";
                        }
                        else
                        {
                            ReportPath = Application.StartupPath + @"\Reportes\REP004DocRecepcionadosAgente.rdlc";
                        }
                        x_subreports.Add("REP004DocRecepcionadosAgenteTotal", rdsDet);
                        break;

                    case TReporte.Proveedor: //"Proveedor"
                        if (!F_ENTC_Codigo.HasValue)
                        {
                            ReportPath = Application.StartupPath + @"\Reportes\REP004DocRecepcionadosProveedorTodos.rdlc";
                        }
                        else
                        {
                            ReportPath = Application.StartupPath + @"\Reportes\REP004DocRecepcionadosProveedor.rdlc";
                        }
                        x_subreports.Add("REP004DocRecepcionadosLineasTotal", rdsDet);
                        break;

                    case TReporte.Todos: // "Cliente":
                        if (!F_ENTC_Codigo.HasValue)
                        {
                            ReportPath = Application.StartupPath + @"\Reportes\REP004DocRecepcionadosClientesTodos.rdlc";
                        }
                        else
                        {
                            ReportPath = Application.StartupPath + @"\Reportes\REP004DocRecepcionadosClientes.rdlc";
                        }
                        x_subreports.Add("REP004DocRecepcionadosClientesTotal", rdsDet);
                        break;

                    case TReporte.Transportista: // "Transportista":
                        if (!F_ENTC_Codigo.HasValue)
                        {
                            ReportPath = Application.StartupPath + @"\Reportes\REP004DocRecepcionadosLineasTodos.rdlc";
                        }
                        else
                        {
                            ReportPath = Application.StartupPath + @"\Reportes\REP004DocRecepcionadosLineas.rdlc";
                        }
                        x_subreports.Add("REP004DocRecepcionadosLineasTotal", rdsDet);
                        break;

                    default:
                        if (!F_ENTC_Codigo.HasValue)
                        {
                            ReportPath = Application.StartupPath + @"\Reportes\REP004DocRecepcionadosClientesTodos.rdlc";
                        }
                        else
                        {
                            ReportPath = Application.StartupPath + @"\Reportes\REP004DocRecepcionadosClientes.rdlc";
                        }
                        x_subreports.Add("REP004DocRecepcionadosClientesTotal", rdsDet);
                        break;
                    }
                    //ReportDataSource RepDetalle = new ReportDataSource("DSDetalle", dtReporte);


                    Microsoft.Reporting.WinForms.ReportParameter[] Parameters = new Microsoft.Reporting.WinForms.ReportParameter[14];

                    String _fecha = Fecha.ToString("dd/MM/yyyy HH:mm");
                    String _tfdesde = "{0} desde :", _tfhasta = "{0} hasta :";
                    if (F_ConDetraccion)
                    {
                        _titulo = "Reporte de Detracciones Pendientes";
                    }
                    else if (F_SoloMostrarPendientes)
                    {
                        _titulo = "Reporte de Documentos Pendientes";
                    }
                    else
                    {
                        _titulo = "Reporte de Documentos Recepcionados";
                    }

                    Parameters[0] = new Microsoft.Reporting.WinForms.ReportParameter("Titulo", _titulo);
                    Parameters[1] = new Microsoft.Reporting.WinForms.ReportParameter("FechaHora", _fecha);
                    Parameters[2] = new Microsoft.Reporting.WinForms.ReportParameter("FechaDesde", (F_FecIni.HasValue ? F_FecIni.Value.ToString("dd/MM/yyyy") : "-"));
                    Parameters[3] = new Microsoft.Reporting.WinForms.ReportParameter("FechaHasta", F_FecFin.Value.ToString("dd/MM/yyyy"));
                    Parameters[4] = new Microsoft.Reporting.WinForms.ReportParameter("MBL", (F_MBL == null ? "-" : F_MBL));
                    Parameters[5] = new Microsoft.Reporting.WinForms.ReportParameter("HBL", (F_HBL == null ? "-" : F_HBL));

                    Parameters[6] = new Microsoft.Reporting.WinForms.ReportParameter("TipoEntidad", F_TIPE_Codigo_Text);
                    Parameters[7] = new Microsoft.Reporting.WinForms.ReportParameter("Entidad", String.IsNullOrEmpty(F_ENTC_Codigo_Text) ? "-" : F_ENTC_Codigo_Text);
                    Parameters[8] = new Microsoft.Reporting.WinForms.ReportParameter("MostrarPendientes", F_SoloMostrarPendientes ? "Mostrar Solo Pendientes" : "-");

                    Parameters[9]  = new Microsoft.Reporting.WinForms.ReportParameter("lblFechaDesde", String.Format(_tfdesde, F_lblFecha));
                    Parameters[10] = new Microsoft.Reporting.WinForms.ReportParameter("lblFechaHasta", String.Format(_tfhasta, F_lblFecha));
                    Parameters[11] = new Microsoft.Reporting.WinForms.ReportParameter("TipoDetraccion", F_TIPO_CodDetrac_Text);

                    String _TRegistro = "";
                    if (String.IsNullOrEmpty(F_TipoRegistro))
                    {
                        _TRegistro = "Por Cobrar";
                    }
                    else
                    {
                        _TRegistro = F_TipoRegistro.Equals("I") ? "Por Cobrar" : "Por Pagar";
                    }

                    Parameters[12] = new Microsoft.Reporting.WinForms.ReportParameter("Por", _TRegistro);
                    Parameters[13] = new Microsoft.Reporting.WinForms.ReportParameter("Viaje", F_NVIA_NroViaje != null ? F_NVIA_NroViaje : "-");

                    //Visualizador rpt = new Visualizador(_titulo, ReportPath, RepDetalle, Parameters);
                    //rpt.StartPosition = FormStartPosition.CenterScreen;
                    //rpt.Imprimir();
                    //rpt.ShowDialog();
                    Visualizador _impresion = new Visualizador("", ReportPath, rds, Parameters, x_subreports, null)
                    {
                        StartPosition = System.Windows.Forms.FormStartPosition.CenterScreen
                    };
                    _impresion.Imprimir();
                    _impresion.ShowDialog();
                }
                else
                {
                    Infrastructure.WinForms.Controls.Dialogos.MostrarMensajeInformacion(Title, "No se encontraron registros");
                }
            }
            catch (Exception)
            { throw; }
        }