Skip to content

Instantly share code, notes, and snippets.

What would you like to do?
Populate the results from the Query to populate the results table
public class PopulateSampleOrdersWithXdbData : ReportProcessorBase
public override void Process(ReportProcessorArgs args)
DataTable queryResult = args.QueryResult;
DataTable resultTableForView = args.ResultTableForView;
ProjectRawTableIntoResultTable(args, queryResult, resultTableForView);
private void ProjectRawTableIntoResultTable(ReportProcessorArgs args, DataTable rawTable, DataTable resultTable)
foreach (DataRow sourceRow in DataTableExtensions.AsEnumerable(rawTable))
DataRow dataRow = resultTable.NewRow();
TryFillData<Guid>(dataRow, new ViewField<Guid>("ContactId"), sourceRow, "ContactId");
TryFillData<Guid>(dataRow, new ViewField<Guid>("VisitId"), sourceRow, "_id");
TryFillData<int>(dataRow, new ViewField<int>("VisitIndex"), sourceRow, "LatestVisitIndex");
TryFillData<DateTime>(dataRow, new ViewField<DateTime>("VisitStartDateTime"), sourceRow, "StartDateTime");
TryFillData<string>(dataRow, new ViewField<string>("RangeId"), sourceRow, "RangeId");
TryFillData<string>(dataRow, new ViewField<string>("DecorId"), sourceRow, "DecorId");
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.