void OnValueOverride(ClassicReportDataEventArgs e) { if (ValueOverride != null) { ValueOverride(this, e); } }
void OnRowChanged(ClassicReportDataEventArgs e) { if (RowChanged != null) { RowChanged(this, e); } }
void OnReadData(object sender, ReportComposerEventArgs e) { // let the client process the data first ClassicReportDataEventArgs args = new ClassicReportDataEventArgs(target, e); if (ValueOverride != null) { ValueOverride(this, args); if (args.Handled) { e.Value = args.Value; return; } } // the client did not process the data object _ds; if (DataSource is BindingSource) { _ds = ((BindingSource)DataSource).DataSource; } else { _ds = DataSource; } if (_ds is System.Data.DataSet || _ds is System.Data.DataTable) { System.Data.DataRow row = (System.Data.DataRow)target; e.Value = row[e.ColumnName]; } else { PropertyInfo property = target.GetType().GetProperty(e.ColumnName); if (property != null) { e.Value = property.GetValue(target, null); } else { e.Value = null; } } }
void OnReadData(object sender, ReportComposerEventArgs e) { // let the client process the data first ClassicReportDataEventArgs args = new ClassicReportDataEventArgs(target, e); if (ValueOverride != null) { ValueOverride(this, args); if (args.Handled) { e.Value = args.Value; return; } } // the client did not process the data object _ds; if (DataSource is BindingSource) _ds = ((BindingSource)DataSource).DataSource; else _ds = DataSource; if (_ds is System.Data.DataSet || _ds is System.Data.DataTable) { System.Data.DataRow row = (System.Data.DataRow)target; e.Value = row[e.ColumnName]; } else { PropertyInfo property = target.GetType().GetProperty(e.ColumnName); if (property != null) e.Value = property.GetValue(target, null); else e.Value = null; } }