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

      iReport

      • บ้าน
      • บล็อก
      • iReport
      • How to add subreport in jasper report using iReport

      How to add subreport in jasper report using iReport

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

      In this tutorial I will show you how to add sub reports in jasper report using iReport. Before adding subreport in our main report we need to discuss about subreport that what they are.

      What is Subreport

      A subreport is a report within our main report. Basically a subreport is nothing but a simple report which we want to show in our main report.

      Why we use subreport

      A subreprot is used when we have more then one set of data and we want to display that data or information in a single report. That’s why we need to create such kind of report. Or we can say that to display multiple data on multiple details band we need subreports.

      Steps to create Sub Reports

      1- First of all create your main report
      To create main report follow my previous article How to create a report in iReport. Before creating your main report you should need to know which type of data should be included in your report. In my case in my parent report or main report I want to show faculty name and the qualification details of that faculty should be comes from subreport. For that purpose I have created my main report named TestB.jrxml. In this report template I have three bands the first one is for report title and the other two is detail band. In detail band 1 I want to show name of the faculty and in detail band 2 I want to show qualification detail of that faculty and this detail or data comes from subreport.

      In this tutorial I will show you how to add sub reports in jasper report using iReport. Before adding subreport in our main report we need to discuss about subreport that what they are.

      What is Subreport

      A subreport is a report within our main report. Basically a subreport is nothing but a simple report which we want to show in our main report.

      Why we use subreport

      A subreprot is used when we have more then one set of data and we want to display that data or information in a single report. That’s why we need to create such kind of report. Or we can say that to display multiple data on multiple details band we need subreports.

      Steps to create Sub Reports

      1- First of all create your main report
      To create main report follow my previous article How to create a report in iReport. Before creating your main report you should need to know which type of data should be included in your report. In my case in my parent report or main report I want to show faculty name and the qualification details of that faculty should be comes from subreport. For that purpose I have created my main report named TestB.jrxml. In this report template I have three bands the first one is for report title and the other two is detail band. In detail band 1 I want to show name of the faculty and in detail band 2 I want to show qualification detail of that faculty and this detail or data comes from subreport.

      2- Create your subreport template.Creating a subreport is not a rocket science, its just a simple report as we have created in step number 1.

      3- Add parameter to the subreport.
      To connect our subreport to the main report we need to create parameter in our subreport. The purpose of creating parameter in subreport is that subreport report query will receive the guide from the main report via this parameter which we are going to create in this step. And we will link our main report to subreport via this parameter.

      To create parameter go to Report Inspector tab and right click on Parameter tree and choose Add parameter.

      Now go to properties of your created parameter and set name and type (parameter class) of parameter.

      4- Now define query for your subreport.
      Now that we have created our main report, subreport and parameter for subreport, Its time to create report query for subreport which we have created in step number 2. To fetch data from that query we use parameter in where clause to limit items in our subreport. To create query for that subreport open report query window add your query and in where clause use parameter which we have created in step number 3. In this process we are going to tell subreport that fetch only those data that are linked to our main report. Now click on OK button.

      5- Add subreport to you main report
      Now that our main report and subreport have been ready. Now its time to link both of the reports. Go to your main report and drag Subreport in your desired detail band of your main report. If you are unable to view Palette window than press Ctrl+Shif+8. After draging subreport you will see subreport wizard from that wizard select “use an existing report” and browse your subreport which we have created in step number 2 and click on Next button.

      Now select “Use the same connection used to fill the master report” and click on Next button.

      Now select “Store the directory name in a parameter” and click on Finish button.

      Now you have successfully add subreport in your main report, adjust its width and height according to your need.

      You are now ready to run your main report. Running (i.e. previewing) the main report will automatically run the subreport(s) as well, and the data from the main as well as from the subreport(s) will be included in the report.

      Tuesday, 28 November 2017

      How to add subreport in jasper report using iReport

      In this tutorial I will show you how to add sub reports in jasper report using iReport. Before adding subreport in our main report we need to discuss about subreport that what they are.

      What is Subreport

      A subreport is a report within our main report. Basically a subreport is nothing but a simple report which we want to show in our main report.

      Why we use subreport

      A subreprot is used when we have more then one set of data and we want to display that data or information in a single report. That’s why we need to create such kind of report. Or we can say that to display multiple data on multiple details band we need subreports.

      Steps to create Sub Reports

      1- First of all create your main report
      To create main report follow my previous article How to create a report in iReport. Before creating your main report you should need to know which type of data should be included in your report. In my case in my parent report or main report I want to show faculty name and the qualification details of that faculty should be comes from subreport. For that purpose I have created my main report named TestB.jrxml. In this report template I have three bands the first one is for report title and the other two is detail band. In detail band 1 I want to show name of the faculty and in detail band 2 I want to show qualification detail of that faculty and this detail or data comes from subreport.

      2- Create your subreport template.Creating a subreport is not a rocket science, its just a simple report as we have created in step number 1.

      3- Add parameter to the subreport.
      To connect our subreport to the main report we need to create parameter in our subreport. The purpose of creating parameter in subreport is that subreport report query will receive the guide from the main report via this parameter which we are going to create in this step. And we will link our main report to subreport via this parameter.

      To create parameter go to Report Inspector tab and right click on Parameter tree and choose Add parameter.

      Now go to properties of your created parameter and set name and type (parameter class) of parameter.

      4- Now define query for your subreport.
      Now that we have created our main report, subreport and parameter for subreport, Its time to create report query for subreport which we have created in step number 2. To fetch data from that query we use parameter in where clause to limit items in our subreport. To create query for that subreport open report query window add your query and in where clause use parameter which we have created in step number 3. In this process we are going to tell subreport that fetch only those data that are linked to our main report. Now click on OK button.

      5- Add subreport to you main report
      Now that our main report and subreport have been ready. Now its time to link both of the reports. Go to your main report and drag Subreport in your desired detail band of your main report. If you are unable to view Palette window than press Ctrl+Shif+8. After draging subreport you will see subreport wizard from that wizard select “use an existing report” and browse your subreport which we have created in step number 2 and click on Next button.

      Now select “Use the same connection used to fill the master report” and click on Next button.

      Now select “Store the directory name in a parameter” and click on Finish button.

      Now you have successfully add subreport in your main report, adjust its width and height according to your need.

      You are now ready to run your main report. Running (i.e. previewing) the main report will automatically run the subreport(s) as well, and the data from the main as well as from the subreport(s) will be included in the report.

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

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

      How to Bold the text inside the variable expression in Jasper Reports
      กันยายน 9, 2019

      โพสต์ถัดไป

      How to display images dynamically in jasper report using iReport
      กันยายน 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 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

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

      V16 Planned Date of Tasks are invisible.
      12ก.พ.2023
      Odoo Implement Methodology
      29พ.ย.2022
      Odoo Enterprise Subscription Agreement
      29พ.ย.2022
      (02) 430-2475
      info@odoothaidev.com
      Facebook Twitter Google-plus Pinterest

      Odoothaidev by OdooTeaM.

      • Privacy
      • Terms
      • Sitemap
      • Purchase

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

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

      Click to Copy