เนื่องจากมีเพื่อน สมาชิก นำไปใช้แล้วติดปัญหา พิมพ์สติกเกอร์แล้ว รูป QR-Code ไม่ออก
– จากคลิปนี้นะครับ

  • วันนี้ผมเลยมา แจ้ง แก้ไขเพิ่มเติมนะครับ
  • อย่างแรกเลยจุดที่ 1 มาแก้ไขจุดนี้นะครับ



    – เปลี่ยน มาใช้ event ของ Detail  ที่ชื่อ BeforPrint  แทนอันเดิมนะครับ
    – แล้วเช็คว่าเครื่องคอมพิวเตอร์ เราเป็น  32 bit  หรือ 64  bit นะครับ  เพราะตำแหน่งจะไม่เหมือนกัน (ตำแหน่งของไฟล์ icode.bmp)   จะต้องมีไฟล์  bmp ที่เป็นรูปภาพ  qr-code อยู่ด้วยนะครับ
    – และเพิ่มเงื่อนไข  ว่ามีไฟล์  xxx.bmp นี้อยู่หรือไม่ ถ้ามีค่อย LoadFromFile มาแสดงนะครับ





    ************
    if strtoint (GetSQLStringData(‘select count(*) as cc from drugitems_picture ‘+
    ‘ where icode=” ‘ +DBPipeline1 [‘icode’]+’ ” ‘)) > 0 then
    begin
    Image4.Picture := nil;
    if fileexists(‘C:\Program Files\HOSxP_PCU\’+DBPipeline1 [‘icode ‘]+’.bmp’) then
    begin
    Image4.Picture.LoadFromFile(‘C:\Program Files\HOSxP_PCU\’+DBPipeline1 [‘icode ‘]+’.bmp’) ; // for 32 bit
    //Image4.Picture.LoadFromFile(‘C:\Program Files (x86)\HOSxP_PCU\’+DBPipeline1 [‘icode ‘]+’.bmp’) ; // for 64 bit
    end;
    Image4.Stretch := true;
    end
    else
    begin
    Image4.Picture := nil;
    end;
    ************
    – ตรวจสอบว่ามีไฟล์  icode.bmp อยู่ใน  C:\Program Files (x86)\HOSxP_PCU  แล้วหรือยังนะครับ
  • เท่านี้ก็น่าจะได้แล้ว
  • และก็กลับไปดูคลิป ทบทวนอีกทีนะครับ  ถ้าติดปัญหาอะไรก็แจ้งมาหาผมได้นะครับ  จะช่วยดูให้ครับ
  • ขอบคุณที่ติดตาม
  • แล้วพบกันใหม่ครับ

 

Loading

You May Also Like

More From Author

+ There are no comments

Add yours

This site uses Akismet to reduce spam. Learn how your comment data is processed.