BMS-HOSxP Community
HOSxP => แจ้งปัญหา / ขอความช่วยเหลือ => ข้อความที่เริ่มโดย: udomchok ที่ กรกฎาคม 16, 2010, 23:32:41 PM
-
ใน Report designer มี Function HospitalDirector ซึ่งมี x:string เป็น parameter
อยากทราบว่าต้องใส่อะไรแทน x ครับ เพื่อให้ออกมาเป็นชื่อ ผอ. (จากตาราง stockconfig)
-
function GetHospitalDirector: string;
begin
with kskdm.fcds do
begin
close;
data := HOSxP_GetDataset('select hospitaldirector as hn from stockconfig');
// open;
if recordcount > 0 then
result := fieldbyname('hn').asstring
else
result := '';
close;
end;
end;
-
HospitalName; อ.ชัยพร คงจะทำแบบนี้ แต่คง ไม่ได้ปรับให้ครับ
HospitalDirector: string ก็คงใช้ได้เลยครับ
-
Function ของ อ.mn เป็นแบบนี้
HospitalDirector(x);
เวลาใช้ก็แบบนี้
Text := HospitalDirector(x);
แต่ไม่สามารถใช้ได้ และไม่สามารถใช้แบบไม่มี parameter ได้
ตอนนี้เลยใช้แบบนี้ไปก่อน
Text := GetSQLStringData('select hospitaldirector from stockconfig');