Jaspersoft and Clarity PPM - Advanced Reporting with Data Warehouse
1. JASPERSOFT and CLARITY PPM
Advanced Reporting with Data Warehouse
Solutions Consultant
linkedin.com/in/thiagobottoni
Thiago Bottoni
2. Advanced Reporting Overview
Platform
Capabilities
Ad-Hoc Views Studio Reports Dashboards
- Pixel perfect
- Robust reporting features
- Scheduling capability
- Quick to create
- Technical background not needed
- Self-Service reporting
- Combine multiple reports
- Easy to create
- Auto-refresh feature
- Centralized repository
- Creation of interactive reports
- Designed for business users
- Eclipse-based environment
- Creation of precision reports
- Designed for devs and technical users
3. Advanced Reporting Overview
Data Sources
CLARITY
CA PPM BEAN
Real-Time Reporting
Production Database
ALL tables
DATA WAREHOUSE
CA PPM DWH BEAN
Job Processing
Recommended for reporting
ONLY selected tables
Domains
- Virtual Views
- Created and stored in Jasper Server
- Do not modify the data sources
- Can be joined, filtered and labeled for
business needs
- Business users don’t need to know the
data model to create reports
Project
Tables
Resource
Tables
Financial
Tables
- Can connect to about any data source
- Jasper Server comes standard with
connection wizards for JDBC, JDNI
and Bean (Java Bean) data sources
Out-of-the-box Domains
Application Management
Custom Master Object
Financial Management
Idea Management
Investment Management
Project Management
Resource Management
Time Management
4. Clarity Data Warehouse Overview
Data Warehouse
- Better performance
- Can be separate database
- Simpler data model
- Columns are consistently named across tables
- Includes custom fields
- Potential uses
- Rewrite poor performing reports and portlets
- Use external tools like Tableau, QlikView, etc.
Common Terms
• Dimension: Descriptive fields on an object (Examples: Investment name, manager,
description, etc.)
• Fact tables: Metrics on an object (Examples: Total Cost, Actual Hours, Planned Benefit,
etc.)
• Star Schema: Database design. A simpler Star would have a fact table liked to a few
dimension tables.
Fact TableDimension
STAR SCHEMA
5. Clarity Data Warehouse Overview
Clarity Jobs
Full Load
Incremental Load
Jaspersoft Users
Access Rights
Job Name: Load Data Warehouse
- Flag the option “Full Load”
Loads the entire DWH database
New custom attributes and objects require a full load
Run it periodically (once a week)
Job Name: Load Data Warehouse
- Unflag the option “Full Load”
Runs a differential load
Captures the changes you’ve made, except new custom attributes/objects
Run it frequently (twice a day)
Job Name: Load Data Warehouse Access Rights
Addresses user security privileges in the data warehouse
Job Name: Create and Update Jaspersoft Users
Gives your users access to the Jasper Server if they have permission
Updates Jasper Server if you change any user rights
6. Clarity DWH Sizing and Loading
Data Warehouse size may vary by industry and type of implementation, however it will typically be
15% to 25% of the Clarity production database size.
DWH Sizing
Load Times
PPM DWH Full Load Job (approx.)
5 GB 1 GB 10 min
65 GB 7 GB 35 min
223 GB 33 GB 5 hours
Source: Rego Consulting
9. Example: Team Query (Clarity Database)
• Inconsistent joins
• Inconsistent column names
• Need to know lookup types
• Multiple joins to the same table
• Not intuitive
10. Example: Team Query (Data Warehouse Database)
• No need to join to lookup tables
• Consistent joins
• Consistent column names
• Intuitive
11. What you can do
• Embed reports to Clarity portlets
• Customize OOTB reports
• Create your own views
• Schedule and send reports by email
• Schedule DWH jobs
• Control access rights to the repository
• Rewrite poor performing portlets
• Use external BI tools (Tableau, etc.)
• Save new views to a private folder
• Project dashboard to a TV (With auto-
refresh)
• Include your custom attributes to the DWH
• Access Jasper Server directly from Clarity
Advanced Reporting Architecture
20. 1
2
3
4
Instructions:
1) You can also drag and drop some fields to the Filter column, so they will be available to filter your data
2) You can choose which kind of filter you want: is one of, equals, contains, etc
3) You can enter custom expressions to rule your filters
4) Apply
21. A AND B AND C
OR D
Info:
This is just an example of how custom expressions work
22. 1
2
3
info
Instructions:
1) Let’s sort our data
2) Choose a field to sort on
3) Click on Add
Info:
Notice that there’s a little arrow next to the chosen fields. You can alter
from ASC to DESC clicking on them.
25. 1
2 info
Instructions:
1) Try other table options
2) Choose Totals Data
Info:
Notice that your table shows only totals now.
26. 1
2
info
Instructions:
1) Try other table options
2) Choose Details and Totals
Info:
Notice that your table shows details, sub-totals and totals now
28. 1
2
3
4
Instructions:
1) Give a name to your field
2) Build your formula
3) Validate it when you’re done
4) Click on Create Field
info
Info:
Here’s the Jaspersoft Calculated Fields Reference
https://community.jaspersoft.com/documentation/tibco-jasperreports-server-user-guide/v62/calculated-fields-reference
Here’s the formula I used:
CaseWhen(“Business Alignment” <=30, ‘Low Alignment’, “Business Alignment” > 80, ‘High Alignment’, ‘Medium Alignment’)
30. 1
2
3
Instructions:
1) Right click on the column you just added
2) Navigate to Change Summary Calculations
3) Choose None, because it doesn’t make sense to count that field
39. 1
2
3 4 5
6
Instructions:
1) Navigate to Conditional Formatting
2) Click Add
3) Choose an operator
4) Write a condition
5) Format the field as you want
6) Click OK
41. 1
3
4 5 6
7
2
Instructions:
1) Navigate to Conditional Formatting
2) Choose the Sub-Total field only (Notice that in
the first time we’ve formatted only the details
rows)
3) Click Add
4) Choose an operator (Let’s try a range)
5) Type the conditions
6) Format the field as you want
7) Click OK
48. 1
2
3
4
Instructions:
1) Drag a field to the Filters panel. By doing this, you’ll start your report with this filter already applied.
2) Choose a value for your filter
3) Navigate to Display
50. 1
2
Instructions:
1) Give a name to your topic
2) Click OK
This will save your choices above (fields, pre-filters and display). If you pick out this topic the next time you create an Ad Hoc View, you won’t need to choose
everything again.
51. Instructions:
Let’s create a crosstab now
info
Info:
Notice that the fields appear with the display label you chose
52. Instructions:
Choose Full Data.
- Sample data only shows a limited number of rows. If you have a huge amount of records, prefer working with Sample Data. Otherwise, you may have
performance issues.
- Full Data shows everything. If you don’t have a huge amount of records, you can work with Full Data.
54. 1
2
Instructions:
1) If you chose more than one row, expand all
2) Hover the pointer over the small icon at the Measures section and choose Create Calculated Measure…
55. 1
2
3
4
Instructions:
1) Give a name to the new measure
2) Build a formula
3) Validate it
4) Click Create Measure
Here’s the formula used:
“Total Planned Cost” - “Total Actual Cost”
64. Instructions:
Let’s create a chart now
info
Info:
Notice that you didn’t need to choose anything after picking your topic instead of a
domain and that your previous configurations (Fields, pre-filters and display) were
automatically applied)
68. 1
2
3
4
Instructions:
1) Slide the Columns to the right (This will ungroup the values)
2) Slide the Rows to the right (This will ungroup the values)
3) Choose a filter
4) Apply
69. 2
1
3
4
5
Instructions:
1) Hover the pointer over the chart configuration icon
2) Choose Chart Format…
3) Navigate to Advanced
4) Take a time to read the Advanced Chart Formatting article from Jaspersoft. It will show you
everything that can be formatted in a graph.
5) Click on Add New Property
70. 1
2
3
4
Instructions:
1) Type the property you want to format
2) Type the property value
3) Click Add
4) Click OK
Here’s the Jaspersoft article on advanced chart formatting. You
may copy the property and configure how you want:
https://community.jaspersoft.com/wiki/advanced-chart-formatting
Here’s the Highcharts JS API Reference. Some properties
described there also works here:
https://api.highcharts.com/highcharts/
Here are the properties I used:
yAxis.plotLines [{“color”:”red”,”value”:”50”,”width”:”2”,”dashStyle”:”longdashdot”}]
xAxis.plotLines [{“color”:”red”,”value”:”250000”,”width”:”2”,”dashStyle”:”longdashdot”}]
77. 1
2
info
Instructions:
1) Drag and drop new content to your dashboard
2) Drag and drop existing content to your dashboard
Info:
If you drag and drop a not existing content chart, crosstab or table to the dashboard, the Ad
Hoc creation page will pop-up on the screen.
79. 1
2
3
4
5
6
Instructions:
1) Flag Show refresh button
2) Flag Show export button
3) Try different Scales to Fit (Choosing Dashlet, the report
or view will fit to the dashlet dimensions)
4) Flag Auto-refresh dashlet contents
5) Type an auto-refresh interval
Notice that you’re doing this at the report/view level, you’re not
applying auto-refresh to the entire dashboard yet.
80. 1
2
Instructions:
1) Drag and drop a filter to the dashboard which exists in more than one report or view
2) Click on the dashboard configuration icon
81. 1
2
3
4
5
6
7
8
Instructions:
1) Pick a background color
2) Flag Show Filter Dashlet as pop-up window (it will make
the filter dashlet disappear from the dashboard)
3) Pick a color to the title bars
4) Pick a color to the title bar background
5) Flag Show Export button
6) Flag Auto-refresh dashboard contents
7) Type an auto-refresh interval (Now you’re applying auto-refresh to the entire dashboard)
8) Click OK
83. 12
3
4
Instructions:
1) Click Add
2) Choose another dashlet that also has the same
filter option (In this case, all the dashlets can be filtered
by Portfolio Name)
3) Choose the parameter affected
4) Click OK
You’ve created a group filter, so when you apply a filter to the dashboard (In this
case Portfolio Name) all dashlets that have Portfolio Name as an available filter
will be filtered simultaneously.
92. Instructions:
Open the Jaspersoft Studio
If you haven’t installed yet, please follow this guide on how to install the Jaspersoft Studio client, install a license and create a data adapter:
https://docops.ca.com/ca-ppm/15-6-1/en/advanced-reporting-with-jaspersoft/install-jaspersoft-studio-professional-7-1-and-ca-jdbc-adapter/
94. 2
7
1
3
4
5
6
Instructions:
1) Give a name to your connection
2) Type the jasper URL following the pattern: https://<your_server>:<port>/reportservice/
3) Enter the Organization ID
4) Enter an active jaspersoft user
5) Enter the user’s password
6) Test Connection
7) Click Finish
101. Here’s the query I used:
SELECT inv.investment_name "Project Name",
inv.investment_manager "Project Manager",
prj.objective "Objective",
inv.schedule_start "Start Date",
inv.schedule_finish "End Date",
inv.business_alignment "Business Alignment",
inv.risk "Risk Score",
smr.plan_cost "Planned Cost",
smr.plan_actual_cost_var "Planned Cost Variance",
smr.plan_benefit "Planned Benefit",
smr.plan_actual_benefit "Actual Benefit"
FROM dwh_inv_investment inv
INNER JOIN dwh_inv_summary_facts smr
ON inv.investment_key = smr.investment_key
INNER JOIN dwh_inv_project prj
ON inv.investment_key = prj.investment_key
WHERE inv.is_template = 0
AND inv.is_active = 1
AND inv.investment_type_key = 'project'
AND UPPER(inv.investment_name) = UPPER('eCommerce Portal')
102. 1
3
4
5
2
Instructions:
1) Click Add to create a new parameter
2) Give a name to it
3) Drag the new parameter and drop in the query
4) Click on Read Fields. It will load the fields in your query to the jasper report.
5) OK
103. Here’s the new query (With the parameter):
SELECT inv.investment_name "Project Name",
inv.investment_manager "Project Manager",
prj.objective "Objective",
inv.schedule_start "Start Date",
inv.schedule_finish "End Date",
inv.business_alignment "Business Alignment",
inv.risk "Risk Score",
smr.plan_cost "Planned Cost",
smr.plan_actual_cost_var "Planned Cost Variance",
smr.plan_benefit "Planned Benefit",
smr.plan_actual_benefit "Actual Benefit"
FROM dwh_inv_investment inv
INNER JOIN dwh_inv_summary_facts smr
ON inv.investment_key = smr.investment_key
INNER JOIN dwh_inv_project prj
ON inv.investment_key = prj.investment_key
WHERE inv.is_template = 0
AND inv.is_active = 1
AND inv.investment_type_key = 'project'
AND UPPER(inv.investment_name) = UPPER($P{ProjectName})
117. 1 2
3
Instructions:
1) Click on your table
2) On the right panel (Table properties) click on Table
3) Flag Fit columns to table element, so the fields will fit the table size you chose
118. 1
2
3
4
5
6
7
Instructions:
1) Click on Dataset
2) Choose Parameters
3) Add a new parameter
4) Choose the sub-dataset parameter
5) Select the master-dataset parameter
6) OK
7) Finish
After configuring this, when you filter your report, jaspersoft will pass the
same filter both to the master report and to the sub-dataset
122. 2
1
Instructions:
1) Navigate to Linear Gauge Options and configure your widget as you want (Background color, pointer color, etc.)
2) Let’s try some advanced properties. Click on Show Advanced Properties
123. 1
2
3
4
5
Instructions:
1) Click Add to create a new property
2) Take a time to read the available parameters here: https://www.fusioncharts.com/dev/chart-guide/gauges-and-widgets/linear-gauge
3) Enter the value to the parameter you chose
4) OK
5) Navigate to Widget Data
125. 2
1
3
4
5
Instructions:
1) Click on the previously created parameter
2) Choose Modify
3) Choose the field that will determine the pointer position
4) OK
5) Navigate to Color Ranges
126. 1
6
2
3
4
5
7
Instructions:
1) Add a new range
2) Choose a color to the range
3) Enter the label to the range
4) Type the min value
5) Type the max value
6) OK
7) OK
128. 1
2
3
info
Instructions:
1) Click on the table fields
2) Choose Static Text and format the fields as you want
3) Navigate back to the main report
Info:
Tip: To create a pattern to a date field, go to the field properties, navigate to Text Field
and click on (…) on the right of Pattern property, then choose the pattern you want like
YYYY-MM-DD, MM-DD-YYYY, etc.
129. 1
2
3
Instructions:
1) Drag and drop the page number element to the report
2) Click on the report fields and format them as you want
3) Right click to the unused bands and delete them
131. 1
2
Instructions:
1) Type the expression
2) Click Finish
Here’s the expression I used:
(($F{Objective}.length() > 140) ? CONCATENATE($F{Objective}.substring(0,140)," (...)") : $F{Objective})
It will print the entire objective field if its length is less than 140 characters. If not, it will print 140
characters plus “(…)”
132. info
Instructions:
Let’s add an image to the report.
Info:
Keep in mind that the image you’ll choose must be inside the workspace, jasper
server or available in the internet.
137. info
Info:
If you have any issue to visualize the Widget Pro, download Phantom JS here: http://phantomjs.org/
Extract the content to a local folder
In Studio, navigate to Window > Preferences > Jaspersoft Studio > Properties and add the following
properties:
com.jaspersoft.jasperreports.fusion.phantomjs.executable.path=C:phantomjs-2.1.1-windowsbinphantomjs.exe
com.jaspersoft.jasperreports.fusion.charts.render.type=html5
com.jaspersoft.jasperreports.fusion.maps.render.type=html5
com.jaspersoft.jasperreports.fusion.widgets.render.type=html5
154. 1
2
3
Instructions:
1) Select SQL
2) Enter a query to retrieve the project names
3) Save
Here’s the query I used:
SELECT investment_name
FROM dwh_inv_investment
WHERE is_template = 0 AND is_active = 1 AND investment_type_key = ‘project’
156. 1
2
3
Instructions:
1) Change the display mode to In Page, so the filter will not appear as a pop-up window on the screen
2) Submit
3) Navigate to the jaspersoft repository
157. 1
2
Instructions:
1) Notice that now the filter is no longer a simple input string, it’s an auto-populated lookup
2) Apply the filter and see the results on the right
159. 2
1
Instructions:
1) Navigate to the jaspersoft repository and right click on the report you’d like to embed into a Clarity portlet
2) Choose Properties…
163. 1
2
3
Use this code to embed a REPORT:
<iframe width="1300" height="1100" src="http://cappm15-
na02/reportservice/flow.html?_flowId=viewReportFlow&stand
Alone=true&ParentFolderUri=/users&reportUnit=/users/Project
_Info___Studio_Report&decorate=no" />
Use this code to embed a DASHBOARD:
<iframe width="1300" height=“1200" src="http://cappm15-
na02/reportservice/dashboard/viewer.html#/users/A_Very_Imp
ortant_Dashboard&decorate=no" />
Instructions:
1) Give a name to the portlet
2) Paste the iframe code
3) Save and Return