Getting the report data after filtering?

2 posts, 0 answers
  1. Sunil
    Sunil avatar
    230 posts
    Member since:
    Jan 2004

    Posted 16 Sep 2010 Link to this post

    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
  2. Sunil
    Sunil avatar
    230 posts
    Member since:
    Jan 2004

    Posted 17 Sep 2010 Link to this post

    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);
                  }
              }
    }
  3. DevCraft banner
Back to Top