รบกวนหน่อย ครับถ้าอยากเปลี่ยนรายการยาตรงเปลี่ยน ตรงไหนครับ
procedure GlobalOnCreate;
begin
GetDateRangeDialog(date1, date2);
bdate := Formatdatetime('yyyy-mm-dd',date1);
edate := Formatdatetime('yyyy-mm-dd',date2);
sdrug := GetPickupList('select concat(name," ",strength," ",units) from drugitems where habit_forming="Y" order by name, strength, units');
sicode := GetSQLStringData('select icode from drugitems where concat(name," ",strength," ",units)="'+sdrug+'"');
ChangeReportSQL('select o.hn, o.rxdate, "'+sdrug+'" as drugname, o.qty, p.birthday,p.cid, p.occupation, if(p.hometel<>"",p.hometel,if(p.worktel<>"",p.worktel,if(p.informtel<>"",p.informtel,""))) as tel_no '+
'from opitemrece o '+
'join patient p on p.hn=o.hn '+
'where o.icode="'+sicode+'" and o.rxdate between "'+bdate+'" and "'+edate+'" '+
'order by o.rxdate, o.rxtime');
end;