BMS-HOSxP Community
HOSxP => Report Exchange => ข้อความที่เริ่มโดย: panus_t ที่ มิถุนายน 20, 2012, 14:04:38 PM
-
if GetSQLIntegerData('select count(hn) as cc from ptcardno '+
' where hn="'+DBPipeline['name3']+'" ')>1 then
Value := GetSQLStringData('select cardno from ptcardno '+
' where cardtype="02" and hn="'+DBPipeline['name3']+'" ')
else if GetSQLIntegerData('select count(hn) as cc from ptcardno '+
' where hn="'+DBPipeline['name3']+'" ')=1 then
Value := GetSQLStringData('select cardno from ptcardno '+
' where cardtype="01" and hn="'+DBPipeline['name3']+'" ')
else
Value := '-';
เงื่อนไขแรก ให้แสดงเลขที่ต่างด้าว
เงื่อนไขที่สอง ให้แสดงเลขที่บัตรประชาชน
ปล.จากโค้ดด้านบน เงื่อนไขแรก ถ้าต้องการให้พิมพ์ข้อมูล "เลขที่ต่างด้าว" ด้วยต้องทำอย่างไรครับ
;D :D
-
ข้อมูลเลขที่ต่างด้าว หมายถึงให้พิมพ์ คำว่า "เลขที่ต่างด้าว" ออกมาด้วยใช่ไหมครับ
ถ้าใช่ก็
if GetSQLIntegerData('select count(hn) as cc from ptcardno '+
' where hn="'+DBPipeline['name3']+'" ')>1 then
Value := GetSQLStringData('select concat("เลขที่ต่างด้าว ",cardno) from ptcardno '+
' where cardtype="02" and hn="'+DBPipeline['name3']+'" ')
else if GetSQLIntegerData('select count(hn) as cc from ptcardno '+
' where hn="'+DBPipeline['name3']+'" ')=1 then
Value := GetSQLStringData('select cardno from ptcardno '+
' where cardtype="01" and hn="'+DBPipeline['name3']+'" ')
else
Value := '-';
ลองใช้แบบนี้ดูครับ
-
Run Report แล้ว Error แบบนี้จะแก้ไขอย่างไรดีครัีบ
???
-
ลองปริ๊นจริงออกมั้ยครับ
หรือไม่ ก็ลอง คลิกขวารันใน Variable ดูครับ ว่า Error ไหม
-
ลองปริ๊นจริงออกมั้ยครับ
หรือไม่ ก็ลอง คลิกขวารันใน Variable ดูครับ ว่า Error ไหม
ลองปริ้นท์จริง เป็นกระดาษเปล่า ว่าง ๆ เลยครับ
รัน Variable ก็ไม่มี Error ??? ???
-
งั้นขอตัวรายงานมาดูหน่อยครับ
-
;D ;D :D :D
-
งั้นขอตัวรายงานมาดูหน่อยครับ
ใช้ได้หรือเปล่าครับ ;D