UNIT Bangsay;
procedure main;
begin
zquery.close;
zquery.sql.text:='delete from tempreport where reportname="CUSTOM-Yindee"';
zquery.execsql;
zquery.close;
fcds.close;
fcds.datarequest('select * from tempreport where reportname="CUSTOM-Yindee"');
fcds.open;
fcds2.close;
fcds2.datarequest('select * from pttype ');
fcds2.open;
fcds2.first;
while not fcds2.eof do
begin
fcds.insert;
fcds['reportname']:='CUSTOM-Yindee';
fcds['id']:='CUSTOM-Yindee';
fcds['name1']:=fcds2['pttype'];
fcds['name2']:=fcds2['name'];
fcds.post;
fcds2.next;
end;
fcds2.close;
fcds.datarequest('select * from tempreport where reportname="CUSTOM-Yindee"');
applyupdate_fcds();
end;
end.