BMS-HOSxP Community
HOSxP => แจ้งปัญหา / ขอความช่วยเหลือ => ข้อความที่เริ่มโดย: Apiruk_Jbhos ที่ พฤศจิกายน 29, 2011, 18:07:18 PM
-
CheckBox11.visible:= (DBPipeline['ovstist'] <> '07') or (DBPipeline['ovstist'] <> '08') or (DBPipeline['ovstist'] <> '09')
เขียนไม่ถูกครับ คือ จะให้แสดง CheckBox11.visible:= (DBPipeline['ovstist'] ที่ไม่เท่า กับ 01,08,09 ถึงจะขึ้นเครื่องหมายครับ ไม่ทราบว่า จะเขียน รุปแบบคำสั่ง ไหนครับ ... ???
-
CheckBox11.visible:= (DBPipeline['ovstist'] <> '07') or (DBPipeline['ovstist'] <> '08') or (DBPipeline['ovstist'] <> '09')
เขียนไม่ถูกครับ คือ จะให้แสดง CheckBox11.visible:= (DBPipeline['ovstist'] ที่ไม่เท่า กับ 01,08,09 ถึงจะขึ้นเครื่องหมายครับ ไม่ทราบว่า จะเขียน รุปแบบคำสั่ง ไหนครับ ... ???
ลองแบบนี้ครับ
if (DBPipeline['ovstist'] <> '07') or (DBPipeline['ovstist'] <> '08') or (DBPipeline['ovstist'] <> '09') then
CheckBox11.visible := true
else
CheckBox11.visible := false ;
ยังไม่ได้ทดสอบครับถ้าได้ผลยังไงรบกวนแจ้งด้วยครับ
-
การใส่ checkbox การซ่อนแสดงข้อมุลในรายงาน
ใช้ LABEL
Label42.Visible := DBPipeline['an'] > '0';
(ถ้า an > 0 ให้มองเห็น label42)
ใช้ Variable (if ...then... else if)
procedure Variable2OnCalc(var Value: Variant);
begin
Label12.visible:=False;
Label21.visible:=False;
Label23.visible:=False;
Label29.visible:=False;
if DBPipeline['spclty']='09' then Label12.visible:=True
else if DBPipeline['spclty']='08' then Label21.visible:=True
else if DBPipeline['spclty']='02' then Label23.visible:=True
else Label29.visible:=True;
end;
อีกแบบหนึ่ง
If getsqlintegerdata(' select count(vn) as cc from opdscreen where (hpi like "%ให้ทานยา%" or hpi like "%ส่ง ER%" or hpi like "%ให้ ทานยา%") and vn="'+dbpipeline['vn']+'" ')>0 then
CheckBox1.checked:=false
else
CheckBox1.checked:=true;
จากโจทย์ น่าะประมาณนี้
If getsqlintegerdata(' select count(vn) as cc from ovst where (ovstist <> "07" or ovstist <> "08" or ovstist <> "09") and vn="'+dbpipeline['vn']+'" ')>0 then
CheckBox11.checked:=false
else
CheckBox11.checked:=true;
-
เงือนไข มันออกหมด คือมันติก ทุกคนเลย ของ golf น่ะ กำลังลองแก้ ดู
ใช้กับ Report Designer
procedure CheckBox11OnPrint;
begin
if (DBPipeline['ovstist'] <> '07') or (DBPipeline['ovstist'] <> '08') or (DBPipeline['ovstist'] <> '09') then
CheckBox11.visible := true
else
CheckBox11.visible := false ;
end;
ออกหมด
แก้ไขใหม่ ออกแล้วครบ
procedure CheckBox11OnPrint;
begin
if (DBPipeline['ovstist'] <> '07') and (DBPipeline['ovstist'] <> '08') and (DBPipeline['ovstist'] <> '09') then
CheckBox11.checked := true
else
CheckBox11.checked := false ;
end;
-
If getsqlintegerdata(' select count(vn) as cc from ovst where ovstist not in ("07","08","09") and vn="'+dbpipeline['vn']+'" ')>0 then
CheckBox11.checked:=false
else
CheckBox11.checked:=true;