コード例 #1
0
        public void ShowReporte(Int32 x_CAJA_Codigo)
        {
            try
            {
                RptImpresion.LocalReport.ReleaseSandboxAppDomain();
                RptImpresion.Reset();

                RptImpresion.ProcessingMode = ProcessingMode.Local;
                RptImpresion.LocalReport.DataSources.Clear();

                ReportDataSource RptDataSource;

                DataTable _dt;

                _dt = Presenter.GetComprobante(x_CAJA_Codigo);

                _dt.Rows[0]["MontoLetras"] = Utilitarios.NumeroALetras(_dt.Rows[0]["RCImporte"].ToString(), "");
                _dt.Rows[0]["Usuario"]     = Presenter.Session.UserName + "-" + DateTime.Now.ToString();
                RptDataSource = new ReportDataSource("DTPagos", _dt);
                RptImpresion.LocalReport.DataSources.Clear();
                RptImpresion.LocalReport.DataSources.Add(RptDataSource);
                RptImpresion.LocalReport.ReportPath = Application.StartupPath + @"\Reportes\RptComprobante.rdlc";
                RptImpresion.LocalReport.Refresh();
                RptImpresion.DocumentMapCollapsed = true;
                RptImpresion.RefreshReport();
            }
            catch (Exception ex)
            { Dialogos.MostrarMensajeError(Presenter.Title, "Ha ocurrido un error de al mostrar el reporte.", ex); }
        }
コード例 #2
0
ファイル: PRO005RView.cs プロジェクト: ferarell/DelfinGroup
 void PRO005RView_FormClosing(object sender, FormClosingEventArgs e)
 {
     try
     { RptImpresion.LocalReport.ReleaseSandboxAppDomain();
       RptImpresion.LocalReport.Dispose();
       RptImpresion.Reset(); }
     catch (Exception ex) { Dialogos.MostrarMensajeError(Presenter.Titulo, "Ha ocurrido un error al cerrar el formulario.", ex); }
 }
コード例 #3
0
 public void ShowReporte()
 {
     try
     {
         RptImpresion.LocalReport.ReleaseSandboxAppDomain();
         RptImpresion.Reset();
         RptImpresion.ProcessingMode = ProcessingMode.Local;
         RptImpresion.LocalReport.DataSources.Clear();
         RptImpresion.LocalReport.DataSources.Add(Presenter.RepDataSourceCotizacion);
         RptImpresion.LocalReport.ReportPath = Presenter.ReportPath;
         RptImpresion.LocalReport.Refresh();
         RptImpresion.RefreshReport();
     }
     catch (Exception ex)
     { Dialogos.MostrarMensajeError(Presenter.Title, "Ha ocurrido un error de al mostrar el reporte.", ex); }
 }
コード例 #4
0
ファイル: PRO005RView.cs プロジェクト: ferarell/DelfinGroup
        public void ShowReporte()
        {
            try
            {
                RptImpresion.LocalReport.ReleaseSandboxAppDomain();
                RptImpresion.Reset();

                RptImpresion.ProcessingMode = ProcessingMode.Local;
                RptImpresion.LocalReport.DataSources.Clear();
                if (!String.IsNullOrEmpty(Presenter.TipoReporte) && Presenter.TipoReporte.Equals("Liquidacion"))
                {
                    RptImpresion.LocalReport.DataSources.Add(Presenter.RepDataSourceCabecera);
                    RptImpresion.LocalReport.DataSources.Add(Presenter.RepDataSourceDetalleOtrosServicios);
                    RptImpresion.LocalReport.DataSources.Add(Presenter.RepDataSourceDetalle);
                    RptImpresion.LocalReport.DataSources.Add(Presenter.RepDataSourceDetalleTransporte);
                    RptImpresion.LocalReport.DataSources.Add(Presenter.RepDataSourceDetalleAduana);
                    RptImpresion.LocalReport.DataSources.Add(Presenter.RepDataSourceServicioFox);
                }
                else if (!String.IsNullOrEmpty(Presenter.TipoReporte) && Presenter.TipoReporte.Equals("ConServicioLogistico")) // Con Servicio Logistico
                {
                    RptImpresion.LocalReport.DataSources.Add(Presenter.RepDataSourceDetalle);                                  // Servicio Logistico
                    RptImpresion.LocalReport.DataSources.Add(Presenter.RepDataSourceCabecera);
                    RptImpresion.LocalReport.DataSources.Add(Presenter.RepDataSourceDetalleTransporte);
                    RptImpresion.LocalReport.DataSources.Add(Presenter.RepDataSourceDetalleAduana);
                    RptImpresion.LocalReport.DataSources.Add(Presenter.RepDataSourceDetalleOtrosServicios);
                }
                else if (!String.IsNullOrEmpty(Presenter.TipoReporte) && Presenter.TipoReporte.Equals("SinServicioLogistico"))// Sin Servicio Logistico
                {
                    RptImpresion.LocalReport.DataSources.Add(Presenter.RepDataSourceCabecera);
                    RptImpresion.LocalReport.DataSources.Add(Presenter.RepDataSourceDetalleTransporte);
                    RptImpresion.LocalReport.DataSources.Add(Presenter.RepDataSourceDetalleAduana);
                    RptImpresion.LocalReport.DataSources.Add(Presenter.RepDataSourceDetalleOtrosServicios);
                }
                RptImpresion.LocalReport.ReportPath = Presenter.ReportPath;
                RptImpresion.LocalReport.SetParameters(Presenter.Parameters);
                RptImpresion.LocalReport.Refresh();
                RptImpresion.DocumentMapCollapsed = true;
                RptImpresion.RefreshReport();
            }
            catch (Exception ex)
            { Dialogos.MostrarMensajeError(Presenter.Titulo, "Ha ocurrido un error de al mostrar el reporte.", ex); }
        }
コード例 #5
0
ファイル: PRO006RView.cs プロジェクト: ferarell/DelfinGroup
 public void ShowReporte()
 {
     try
     {
         RptImpresion.LocalReport.ReleaseSandboxAppDomain();
         RptImpresion.Reset();
         RptImpresion.ProcessingMode = ProcessingMode.Local;
         RptImpresion.LocalReport.DataSources.Clear();
         if (Presenter.RepDataSourceTarjas != null)
         {
             RptImpresion.LocalReport.DataSources.Add(Presenter.RepDataSourceTarjas);
         }
         if (Presenter.RepDataSourceReBate != null)
         {
             RptImpresion.LocalReport.DataSources.Add(Presenter.RepDataSourceReBate);
         }
         RptImpresion.LocalReport.ReportPath = Presenter.ReportPath;
         RptImpresion.LocalReport.SetParameters(Presenter.Parameters);
         RptImpresion.LocalReport.Refresh();
         RptImpresion.RefreshReport();
     }
     catch (Exception ex)
     { Dialogos.MostrarMensajeError(Presenter.Titulo, "Ha ocurrido un error de al mostrar el reporte.", ex); }
 }