Ejemplo n.º 1
0
        void LocalReport_SubreportProcessing(object sender, Microsoft.Reporting.WinForms.SubreportProcessingEventArgs e)
        {
            var id    = int.Parse(e.Parameters["IdPai"].Values[0].ToString());
            var filho = new Filho();
            var dt    = filho.ExecutarSelect("SELECT * FROM Filhos WHERE IdPai=" + id);

            e.DataSources.Add(new Microsoft.Reporting.WinForms.ReportDataSource("FilhosDataSet", dt));
        }
Ejemplo n.º 2
0
 private void LocalReport_SubreportProcessing(object sender, Microsoft.Reporting.WinForms.SubreportProcessingEventArgs e)
 {
     try
     {
         if (e.ReportPath == "rptCOM007CotizacionFlete")
         {
             e.DataSources.Clear();
             e.DataSources.Add(this.Presenter.RepDataSourceFlete);
         }
         else if (e.ReportPath == "rptCOM007CotizacionServicios")
         {
             e.DataSources.Clear();
             e.DataSources.Add(this.Presenter.RepDataSourceService);
         }
     }
     catch (Exception ex)
     { Infrastructure.WinForms.Controls.Dialogos.MostrarMensajeError(Presenter.Title, "Ha ocurrido un error cargando los subreportes.", ex); }
 }
Ejemplo n.º 3
0
        /// <summary>
        /// The local sub-report process event handler
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        void LocalReport_SubreportProcessing(object sender, Microsoft.Reporting.WinForms.SubreportProcessingEventArgs e)
        {
            if (_bindingSourceSubreport != null)
            {
                // For each data binding source
                for (int i = 0; i < _bindingSourceSubreport.Length; i++)
                {
                    // Create a new generic report data source
                    Microsoft.Reporting.WinForms.ReportDataSource reportDataSource = new Microsoft.Reporting.WinForms.ReportDataSource();

                    // Add the report data source to the report viewer
                    reportDataSource.Name  = _reportDataSourceNameSubreport[i];
                    reportDataSource.Value = _bindingSourceSubreport[i];

                    // Add the sub-report bindings
                    e.DataSources.Add(reportDataSource);
                }
            }
        }
Ejemplo n.º 4
0
        void LocalReport_SubreportProcessing(object sender, Microsoft.Reporting.WinForms.SubreportProcessingEventArgs e)
        {
            DBProjetoFinalEntities db = new DBProjetoFinalEntities();



            //   var ret = db.Apolices.AsNoTracking()
            //.Where(b => b.ClienteId.Equals(main.id_cliente_finaliza))
            //.ToList()
            //.Select(x => new Apolices
            //{
            //    ValorApolice = x.ValorApolice,
            //    ValorDoBem = x.ValorDoBem,
            //    ValorFranquia = x.ValorFranquia,
            //    ValorPremio = x.ValorPremio,
            //    Placa = x.Placa,
            //    Chassi = x.Chassi,

            //}).ToList();
            //   e.DataSources.Add(new Microsoft.Reporting.WinForms.ReportDataSource("DadosRelatorio", ret));

            var retCliente = db.Clientes.AsNoTracking()
                             .Where(b => b.Id.Equals(main.id_cliente_finaliza))
                             .ToList()
                             .Select(x => new Clientes
            {
                Nome          = x.Nome,
                CPF           = x.CPF,
                Email         = x.Email,
                CartMotorista = x.CartMotorista,
                CategoriaMot  = x.CategoriaMot,
                Celular       = x.Celular,
            }).ToList();

            e.DataSources.Add(new Microsoft.Reporting.WinForms.ReportDataSource("DadosCliente", retCliente));
        }
Ejemplo n.º 5
0
 void LocalReport_SubreportProcessing(object sender, Microsoft.Reporting.WinForms.SubreportProcessingEventArgs e)
 {
     e.DataSources.Clear();
     e.DataSources.Add(new Microsoft.Reporting.WinForms.ReportDataSource("CuahangNongduoc_BusinessObject_ChiTietPhieuBan", m_PhieuBan.ChiTiet));
 }
Ejemplo n.º 6
0
        void rptViewer_SubreportProcessing(object sender, Microsoft.Reporting.WinForms.SubreportProcessingEventArgs e)
        {
            int i = 0;

            i++;
        }