BMS-HOSxP Community
HOSxP => Report Exchange => ข้อความที่เริ่มโดย: wiphusit ที่ สิงหาคม 14, 2009, 15:16:03 PM
-
ขอคำแนะนำในการประกาศตัวแปรวันที่หน่อยครับ
-
ใน variable แต่ละตัวต้องใส่ตัวแปรวันที่เข้าไป แทนที่วันที่ที่เรากำหนดไว้ในคำสั่ง sql ดังนี้
Value := getsqlintegerdata('select count(a.hn) as cc '+
' from ovstdiag a'+
' left outer join opdscreen b on a.vn=b.vn'+
' where a.vstdate = "'+ds1+'" '+
' and a.icd10 ="J029" '+
'and b.temperature>=38');
เพื่อให้ผลลัพธ์ของคำสั่ง sql ออกมาตามวันที่ ที่ผู้ดูรายงานเลือก
ลองดูนะคะ
-
แล้วประกาศค่าตัวแปรใน Declarations,Events ยังไงครับ
-
var
ds1 : string;
date1: TDateTime; // TDateTime variables
begin
date1 := Date; // Set to the start of the current day
ds1 := formatdatetime('yyyy-mm-dd', date1);
end;
-
ขอบคุณครับ
-
var
ds1 : string;
date1: TDateTime; // TDateTime variables
begin
date1 := Date; // Set to the start of the current day
ds1 := formatdatetime('yyyy-mm-dd', date1);
end;
ยังไม่ได้ครับรบกวนขอรายงานตัวอย่าง สักตัวได้ไหมครับ