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)); }
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); } }
/// <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); } } }
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)); }
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)); }
void rptViewer_SubreportProcessing(object sender, Microsoft.Reporting.WinForms.SubreportProcessingEventArgs e) { int i = 0; i++; }