I have been given this code which is currently in use in a part of our program. The programmer who developed this is no longer with us and this code does not seem to be working anymore. Im assuming that this is a DynaSet setup?
Anyone give me pointers on this?
Anyone give me pointers on this?
Code:
with AttendData do
begin
// for all options
if TCBInd2.IsOpen then
TCBInd2.Close;
TCBInd2.FileNameOverride := CBDataBaseU.DataPath+'CSATTEND.UDB';
TCBInd2.FileAlias := 'CSATTEND';
TCBInd2.FileExt := 'UDB';
TCBInd2.Children.Clear;
NewChild := TCBInd2.Children.Add; // add First Child[0]
with NewChild do
begin
FileAlias := 'CSREFTBL';
FileExt := 'UDB';
FileNameOverride := CBDataBaseU.DataPath+'CSREFTBL.UDB';
RelationType := rtExact;
FieldPrefix := 'Lookup->';
ErrorAction := eaSkip;
TagName := 'TBL_ID';
MasterExpr := 'Class_ID';
end; // with NewChild 0
// end -- for all options
if NOT RBPrintAllAttended.Checked then
begin
if GGroupID <> 'All Records' then // choose a group file
...
else
begin // if GGroupID = 'All Records'
NewChild := TCBInd2.Children.Add; // Add default Table child 1
with NewChild do
begin
FileAlias := 'CSIND';
FileExt := 'UDB';
FileNameOverride := CBDataBaseU.DataPath+'CSIND.UDB';
RelationType := rtExact;
FieldPrefix := 'Ind->';
ErrorAction := eaSkip;
TagName := 'IND_ID';
MasterExpr := 'IND_ID';
end;
end; // if GGroupID = 'All Records'
end; // if NOT RBPrintAllAttended.Checked
TCBInd2.SortExpr := 'ATTD_TYPE+Lookup->DESC';
if TQEvent <> '' then
TQuery := TQuery + ' .and. ' + TQEvent;
TCBInd2.QueryExpr := TQuery;
ProcessingFrm := TProcessingFrm.Create(Application);
ProcessingFrm.Show;
Application.ProcessMessages;
TCBInd2.Open;
TCBInd2.GoTop;
TotalRecords := 0;