Creating Report Book in Jaspersoft Studio

Posted on by By Ramu Vudugula, in Jaspersoft | 0

Report books are multiple reports or subreports combined into a single report. It combines several sections like cover pages, table of contents, reports, subreports into a book.

Make data easy with Helical Insight.
Helical Insight is the world’s best open source business intelligence tool.

This blog provides a walkthrough of the report book creation process, using the sample food mart database.

  1. Create a new report book by selecting File -> New -> Jasper Report. In the window on the left side, we have the categories, select the Report Books and select Abstract Book and click on Next
  2. Select the folder and enter the report book name. Select empty data adapter.
  3. In the next section, all the sections I.e cover page, table of content and back cover page present in the report book will be displayed. Select all the sections and click on finish.
  4. In the above image, we can see the book, cover page, toc and back cover jrxmls

  5. Open country wise orders book and see the report book structure.
  6. The first section contains the cover page and table of contents, Second section contains content and the third section contains back cover page.
  7. In the report book open the dataset and query section, select the food mart database and write a simple query like “Select ‘One’ as one”
  8. Open the table of contents content section and here we have pre defined labels. We have a maximum of 3 levels.
  9. Make data easy with Helical Insight.
    Helical Insight is the world’s best open source business intelligence tool.

    Get your 30 Days Trail Version

  10. The cover page and back cover page reports have some images attached to show on first and last page of the report.
  11. Do not update any report properties in the report book jrxml like evaluation time.
  12. Now create a content report.
  13. It has two reports

    1. Quarter-wise sales – Data are shown in a pie chart
    2. Query: select td.quarter, sum(store_sales) sales from sales_fact_1998 sf
      join time_by_day TD on sf.time_id = td.time_id
      join store st on st.store_id = sf.store_id and st.store_country = 'USA'
      group by td.quarter
    3. Sales by Store type and Store type – in a bar chart
    4. Query: select st.store_state,st.store_type, sum(store_sales) sales from sales_fact_1998 sf
      join store st on st.store_id = sf.store_id and st.store_country = 'USA'
      group by st.store_state,st.store_type

  14. Add bookmarks to titles which can be used as a reference in the table of contents.
    1. Click on textfield ‘Quarter-wise sales’, select the hyperlink section, open anchors and bookmarks.
    2. Enter the expression which needs to be displayed on the toc page

      Enter the bookmark level (By default jasper toc report has 3 levels)

    3. Repeat the above process for another text field.
  15. Add the report content in the report book. Open report book and go to the content section. Right click and click on ‘Add new book part’. Select an existing report and enter content report either in .jrxml or .jasper
  16. Use the same data source and add the parameters in the next section if parameters are present.
  17. Save the report and Preview. The report displayed with cover page, toc, and content.
  18. Make data easy with Helical Insight.
    Helical Insight is the world’s best open source business intelligence tool.

    Lets Register For Live Demo

  19. In toc, we have two sections.
  20. Click on Sales by store type and store sales. It should open the report with that section.
  21. Click on ‘Quarter-wise sales’ and It will open the pie charts.
  22. Report book is done. Now we can publish this report book into jasper server like a normal report.

To format the table of contents page refer to the blog: Table of Content Design Format in Jasper Report

In case if you have any queries please get us at support@helicaltech.com

Thank You
Ramu Vudugula
Helical IT Solutions Pvt Ltd

logo

Best Open Source Business Intelligence Software Helical Insight Here

logo

A Business Intelligence Framework


logo

Best Open Source Business Intelligence Software Helical Insight is Here

logo

A Business Intelligence Framework

3 1 vote
Article Rating
Subscribe
Notify of
0 Comments
Inline Feedbacks
View all comments