22
All Rights Reserved © Joget Inc Joget Workflow v4 Introduction to Reporting http://facebook.com/jogetworkflow http://twitter.com/jogetworkflow Last Revised on March 2015 Joget Inc Internal Use Only

Joget Workflow v4 Training - Module 14 - Introduction to Reporting

Embed Size (px)

Citation preview

Page 1: Joget Workflow v4 Training - Module 14 - Introduction to Reporting

All Rights Reserved © Joget Inc

Joget Workflow v4

Introduction to Reporting

http://facebook.com/jogetworkflowhttp://twitter.com/jogetworkflow

Last Revised on March 2015Joget Inc Internal Use Only

Page 2: Joget Workflow v4 Training - Module 14 - Introduction to Reporting

All Rights Reserved © Joget Inc

Prerequisites

1. Basic understanding of reporting means.2. Basic understanding of using SQL to generate report.3. Jaspersoft iReport Designer may be required to

complete one of the chapters.

Joget Inc Internal Use Only

Page 3: Joget Workflow v4 Training - Module 14 - Introduction to Reporting

All Rights Reserved © Joget Inc

Content

1. Introduction2. SQL Chart3. JasperReports

Joget Inc Internal Use Only

Page 4: Joget Workflow v4 Training - Module 14 - Introduction to Reporting

All Rights Reserved © Joget Inc

Chapter 1

Introduction

Joget Inc Internal Use Only

Page 5: Joget Workflow v4 Training - Module 14 - Introduction to Reporting

All Rights Reserved © Joget Inc

Introduction

• This module would introduce you to some of the basic reporting means available in Joget.

• We will be covering the SQL Chart and the JasperReports Userview Menu.

Joget Inc Internal Use Only

Page 6: Joget Workflow v4 Training - Module 14 - Introduction to Reporting

All Rights Reserved © Joget Inc

Chapter 2

SQL Chart

Joget Inc Internal Use Only

Page 7: Joget Workflow v4 Training - Module 14 - Introduction to Reporting

All Rights Reserved © Joget Inc

SQL Chart

• SQL Chart is a Userview Menu that’s generate graphs based on defined SQL string.

• Reference: http://dev.joget.org/community/display/KBv4/SQL+Chart+Userview+Menu

Joget Inc Internal Use Only

Page 8: Joget Workflow v4 Training - Module 14 - Introduction to Reporting

All Rights Reserved © Joget Inc

Exercise

• Import the base app, 13.zip into your Joget.• Edit the Userview, add a SQL Chart. Configure accordingly.

– Label: Application Approval Chart– Chart Title: Application Approval Chart– X-axis Label: Status– Y-axis Label: No of Applications– Datasource: Default Datasource– SQL Query: SELECT c_approval as 'status', COUNT(c_approval)

as 'count' FROM app_fd_leave_applications WHERE c_approval IS NOT NULL GROUP BY c_approval

Joget Inc Internal Use Only

Page 9: Joget Workflow v4 Training - Module 14 - Introduction to Reporting

All Rights Reserved © Joget Inc

Exercise

• This is how the chart should look like in the runtime.

Joget Inc Internal Use Only

Page 10: Joget Workflow v4 Training - Module 14 - Introduction to Reporting

All Rights Reserved © Joget Inc

Materials

• “Leave Portal” definition can be obtained at 14.2.1.txt

Joget Inc Internal Use Only

Page 11: Joget Workflow v4 Training - Module 14 - Introduction to Reporting

All Rights Reserved © Joget Inc

Chapter Review

• Able to use the SQL Chart.

Joget Inc Internal Use Only

Page 12: Joget Workflow v4 Training - Module 14 - Introduction to Reporting

All Rights Reserved © Joget Inc

Chapter 3

JasperReports

Joget Inc Internal Use Only

Page 13: Joget Workflow v4 Training - Module 14 - Introduction to Reporting

All Rights Reserved © Joget Inc

JasperReports

• JasperReports offers better reporting means through integration with JasperReports report definition.

• Reference: http://dev.joget.org/community/display/KBv4/JasperReports+Reporting+Integration+Userview+Menu

Joget Inc Internal Use Only

Page 14: Joget Workflow v4 Training - Module 14 - Introduction to Reporting

All Rights Reserved © Joget Inc

Exercise

• Import the base app, 13.zip into your Joget or you may continue to use the app from the previous chapter.

• Add a JasperReports element into the Userview.• Configure the newly added element.

– Label: JasperReports Application Approval Chart– Jasper Reports Definition (JRXML): (Obtain from the file

14.3.1.txt)– Datasource: Default Datasource

Joget Inc Internal Use Only

Page 15: Joget Workflow v4 Training - Module 14 - Introduction to Reporting

All Rights Reserved © Joget Inc

Just in case – For iReport beginner

1. When opening iReport Designer for the first time, you will need to set up the datasource.

2. Create a new “Database JDBC Connection”, use the following settings.– JDBC Driver: MySQL (com.mysql.jdbc.Driver)– JDBC URL: jdbc:mysql://localhost:3307/jwdb– Username: root– Password: (blank)

Joget Inc Internal Use Only

Page 16: Joget Workflow v4 Training - Module 14 - Introduction to Reporting

All Rights Reserved © Joget Inc

Just in case – For iReport beginner

3. Create a new report, select any template.4. Click on XML view, overwrite with the definition earlier.

Joget Inc Internal Use Only

Page 17: Joget Workflow v4 Training - Module 14 - Introduction to Reporting

All Rights Reserved © Joget Inc

Exercise

• This is how your report should look like in iReport Designer.

Joget Inc Internal Use Only

Page 18: Joget Workflow v4 Training - Module 14 - Introduction to Reporting

All Rights Reserved © Joget Inc

Exercise

• This is how the chart should look like in the runtime.

Joget Inc Internal Use Only

Page 19: Joget Workflow v4 Training - Module 14 - Introduction to Reporting

All Rights Reserved © Joget Inc

Materials

• Completed App from both chapters’ exercises can be obtained at 14.zip

Joget Inc Internal Use Only

Page 20: Joget Workflow v4 Training - Module 14 - Introduction to Reporting

All Rights Reserved © Joget Inc

Chapter Review

• Able to add a JasperReports element into Joget app.

Joget Inc Internal Use Only

Page 21: Joget Workflow v4 Training - Module 14 - Introduction to Reporting

All Rights Reserved © Joget Inc

Module Review

1. Introduction2. SQL Chart3. JasperReports

Joget Inc Internal Use Only

Page 22: Joget Workflow v4 Training - Module 14 - Introduction to Reporting

All Rights Reserved © Joget Inc

Stay Connected with Joget Workflow

• www.joget.org• community.joget.org• twitter.com/jogetworkflow• facebook.com/jogetworkflow• youtube.com/jogetworkflow• slideshare.net/joget

Joget Inc Internal Use Only