Online Documentation for Advanced Excel Report for RAD Studio
OnBeforeBuild event - Example
procedure TReportContainer.GrouppingBeforeBuild(Sender: TObject);
begin
// Add an index for the groupping
try
MasterTable.Close;
MasterTable.Exclusive := True;
MasterTable.Open;
MasterTable.AddIndex('ByDate', 'Event_date;Event_name', [ixCaseInsensitive]);
except
end;
MasterTable.Close;
MasterTable.Exclusive := False;
MasterTable.Open;
try
MasterTable.IndexName := 'ByDate';
except
end;
end;