anchor.diff:          aggrBuilder |> addElement (BeginTable(true, aggrHeader))
           (!>) "Starting Duplicate detection report generation using file %s" request.SourceFileName
           let mutable count = 0
  -        while not reader.EndOfData do
  -            let record = reader.ReadFields()
  +        for record in data do
               stats.TotalRecords <- stats.TotalRecords + 1
               let (reportRes, aggrResult) = performDedupe (record, headers, request, stats)
               builder.AppendLine(reportRes) |> ignore
  
positive.code:             if results.Meta.RecordsReturned > 1 then 
                  !>"Duplicate Found"
                  let header = 
                      new SourceRecord(session.SessionId, SourceRecordId = record.[Constants.IdField], SourceDisplayName = record.[session.DisplayFieldName])
                  let docs = results |> toFlatResults
                  let mutable i = 1
                  for result in docs.Documents do
  
negative.code:                         let score = resultScore / docs.Meta.BestScore * 100.0f
                          let targetRecord = 
                              new TargetRecord(session.SessionId, header.SourceId, TargetId = i, 
                                               TargetDisplayName = result.[session.DisplayFieldName], TargetScore = score, 
                                               TargetRecordId = result.[Constants.IdField])
                          i <- i + 1
                          header.TargetRecords.Add(targetRecord)
  