• หน้าแรก
  • หลักสูตร
  • บทความ
  • ร้านค้า
  • ติดต่อเรา
    มีคำถามเกี่ยวกับ odoo ?
    (02) 4302475
    info@odoothaidev.com
    Login
    Odoothaidev - We are Odoo professional in Thailand
    • หน้าแรก
    • หลักสูตร
    • บทความ
    • ร้านค้า
    • ติดต่อเรา

      iReport

      • บ้าน
      • บล็อก
      • iReport
      • How to display images dynamically in jasper report using iReport

      How to display images dynamically in jasper report using iReport

      • โพสโดย admin
      • หมวดหมู่ iReport, Jasper Server & Server, Reporting ระบบรายงาน
      • วันที่ กันยายน 9, 2019

      This article is all about displaying dynamic images in jasper report using iReport. I will show you step by step how to show images dynamically in iReport. Here dynamic images mean your images are stored in database like (PostgreSQL, MySQL, SQL etc) and we want to show that image or picture in our jasper report using iReport Designer.

      Before going deep into this tutorial we need to know that images are stored in the Database in Blob or bytea etc format and before using these images we need to convert or encode these images into text or string format.

      Bytea type image stored in PostgreSQL

      
      select image_field from table_name where id = 1           

       

       

      Encode Image Field

       

      
      select encode(image_field,'escape') from table_name where id = 1          

      The reason for encoding these images into text is that we are going to use these (text/string) field in jasper report Image. To do so we use encode function of PostgreSQL, which takes two parameter the first one is image field with bytea type and the second is escape. This function converts bytea type image field into encode text type field.

      Now that we have encoded our image field to use in jasper report using iReport. Now its time to use this field in report. To use this field create a new report in iReport Designer.

      1- And add Report Query to fetch data for your report. Here we will use above query that we have encoded in above steps.

      2- After that drag and drop Image property from Palette area. If you don’t view this palette area than go to Window menu and select Palette or press Ctrl+Shift+8.

      3- Now select image that you have drag and drop in step no 2, and click on Image Expression from properties window.

      4- Copy below code and paste in Image Expression window and change name of image field as per your field name and click on OK.

      
      new java.io.ByteArrayInputStream(org.apache.commons.codec.binary.Base64.decodeBase64($F{your_image_field}.getBytes()))           

      You have done!!! Save your changes and preview your report.

      https://www.youtube.com/watch?v=IzQFKwU3IUo

      แท็ก:images

      • Share:
      อวตารของผู้เขียน
      admin

      โพสต์ก่อนหน้า

      How to add subreport in jasper report using iReport
      กันยายน 9, 2019

      โพสต์ถัดไป

      iReport Dynamically changing font size
      กันยายน 9, 2019

      คุณอาจชอบ

      ตัวอย่างเอกสารจาก Odoo
      11 กันยายน, 2021
      ตัวอย่างเอกสาร Odoo
      21 มีนาคม, 2020
      ตัวอย่างเอกสารจากระบบ Odoo
      21 มีนาคม, 2020

      ค้นหาบทความ

      หมวดหมู่

      หมวดหมู่

      • Accounting
      • Adobe XD
      • API
      • Blog
      • Business
      • Buttons
      • CRM
      • Custom Fields
      • Design / Branding
      • Django
      • Ecommerce
      • ERP
      • ERP Flow
      • Express
      • Flectra
      • Form View
      • Frontend
      • Github
      • Github
      • Grant Chart
      • Header
      • iReport
      • Jasper Server & Server
      • Jaspersoft Studio
      • Java
      • JSON-RPC
      • Lazada
      • Linux
      • MLM
      • MRP
      • Nignx Proxy
      • NodeJS
      • Odoo 10
      • Odoo 12 Module
      • Odoo 13
      • Odoo 14 Development
      • Odoo 16
      • Odoo 8
      • Odoo 9
      • Odoo API
      • Odoo Certification
      • Odoo Developer
      • Odoo Ebook
      • Odoo Enterprise
      • Odoo ERP
      • Odoo Event
      • Odoo Implement
      • Odoo Inventory
      • Odoo Report
      • Odoo Security
      • Odoo V15
      • Open Source
      • Open-office
      • OpenERP 7.0
      • PhantomJS
      • Postgres SQL
      • Programming Language
      • Project Management
      • Python
      • Python3
      • Qweb
      • Reporting ระบบรายงาน
      • RML Report
      • Search View and Filters
      • Social Network
      • Statusbar
      • Ubuntu
      • Uncategorized
      • Voip & Call Center
      • Warehouse Management
      • WMS
      • Woocommerce
      • Workflow
      • XML-RPC
      • การ Implement
      • การเก็บข้อมูล Pre-Requirement
      • การเตรียมตัวเพื่อใช้งาน erp
      • ความรู้ด้านการตลาด CRM
      • ธีมเว็บไซต์ Odoo
      • ธุรกิจบริการ
      • ธุรกิจประเภทจัดอบรมสัมมนา
      • ธุรกิจสิ่งพิมพ์
      • นักพัฒนา
      • ประเภทธุรกิจที่เหมาะกับ Odoo
      • ระบบบัญชี
      • ระบบเคลม
      • ลิขสิทธิ์ – License
      Introduction LearnPress – LMS plugin

      Introduction LearnPress – LMS plugin

      Free
      From Zero to Hero with Nodejs

      From Zero to Hero with Nodejs

      Free
      Learn Python – Interactive Python

      Learn Python – Interactive Python

      $69.00

      บทความล่าสุด

      Securing Odoo logins with fail2ban
      22พ.ค.2023
      V16 Planned Date of Tasks are invisible.
      12ก.พ.2023
      Odoo Implement Methodology
      29พ.ย.2022
      (02) 430-2475
      info@odoothaidev.com
      Facebook Twitter Google-plus Pinterest

      Odoothaidev by OdooTeaM.

      • Privacy
      • Terms
      • Sitemap
      • Purchase

      เข้าสู่ระบบด้วยบัญชีเว็บไซต์ของคุณ

      ลืมรหัสผ่าน?

      Click to Copy