Skip to content

Instantly share code, notes, and snippets.

@islaytitans
Created May 30, 2016 13:57
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save islaytitans/3f619d900f4139fea6bd0c8df5babe5e to your computer and use it in GitHub Desktop.
Save islaytitans/3f619d900f4139fea6bd0c8df5babe5e to your computer and use it in GitHub Desktop.
Pulls apart a Sitecore DataSourceQuery to enter the data into the DataTable for the Experience Profile
public class FillGoalDescription : ReportProcessorBase
{
public override void Process(ReportProcessorArgs args)
{
DataTable resultTableForView = args.ResultTableForView;
Assert.IsNotNull(resultTableForView, "Result table for {0} could not be found.", new object[] { args.ReportParameters.ViewName });
int i = 0;
foreach (DataRow row in resultTableForView.AsEnumerable())
{
var goalData = args.QueryResult.Rows[i].ItemArray[4];
if (goalData != null)
{
row[Schemas.GoalDescription.Name] = goalData;
}
i++;
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment