This is a migrated thread and some comments may be shown as answers.

Getting the report data after filtering?

1 Answer 45 Views
General Discussions
This is a migrated thread and some comments may be shown as answers.
SUNIL
Top achievements
Rank 2
SUNIL asked on 17 Sep 2010, 12:27 AM
I have a report in which I need to know the report data for the detail section, but after filtering is applied.
How can I get this filtered report data, and in which event can I get it?

Thanks

1 Answer, 1 is accepted

Sort by
0
SUNIL
Top achievements
Rank 2
answered on 17 Sep 2010, 04:15 PM
I found a way of getting the filtered rows for a report, though there may be alternate ways. It seems very simple and is as in code below. The data source of my report is List<ForecastsMasterRow>. The trick is to keep adding a row to a private variable '_finalDataSource' which is also of List<ForecastsMasterRow> type,  as soon as a detail row is bound in Telerik Report. Only filtered rows from report's data source are going to be bound to detail rows.

private void detail_ItemDataBound(object sender, EventArgs e)
      {
          Processing.DetailSection section = sender as Processing.DetailSection;
          if (section != null)
          {
              ForecastsMasterRow row = section.DataObject.RawData as ForecastsMasterRow;
              if (row != null)
              {
                  _finalDataSource.Add(row);
              }
          }
}
Tags
General Discussions
Asked by
SUNIL
Top achievements
Rank 2
Answers by
SUNIL
Top achievements
Rank 2
Share this question
or