working with pivot tables - genero report writer...working with pivot tables. objectives after this...
TRANSCRIPT
![Page 1: WORKING WITH PIVOT TABLES - Genero Report Writer...WORKING WITH PIVOT TABLES. Objectives After this instruction, you will be able to: •Process multi-dimensional data with Pivot Tables](https://reader033.vdocuments.mx/reader033/viewer/2022052104/603ebf8717b7fa1f02067d8a/html5/thumbnails/1.jpg)
© 2010 Four J's Development Tools
Using Genero Report WriterGRS 3.00
WORKING WITH PIVOT TABLES
![Page 2: WORKING WITH PIVOT TABLES - Genero Report Writer...WORKING WITH PIVOT TABLES. Objectives After this instruction, you will be able to: •Process multi-dimensional data with Pivot Tables](https://reader033.vdocuments.mx/reader033/viewer/2022052104/603ebf8717b7fa1f02067d8a/html5/thumbnails/2.jpg)
Objectives
After this instruction, you will be able to:
• Process multi-dimensional data with Pivot Tables
• Know how to structure a Pivot Table and its components
• Know about Pivot Table specific properties
February 15 Pivot Tables 2
![Page 3: WORKING WITH PIVOT TABLES - Genero Report Writer...WORKING WITH PIVOT TABLES. Objectives After this instruction, you will be able to: •Process multi-dimensional data with Pivot Tables](https://reader033.vdocuments.mx/reader033/viewer/2022052104/603ebf8717b7fa1f02067d8a/html5/thumbnails/3.jpg)
• Table element with fixed roles and types for its columns, suitable for processing multi-dimensional data
• Performs grouping, sorting, and summarizing operations
• Display multiple measures according to multiple key values
– Ex: For each Customer & Ordercode, display unit price, list price, unit cost, item price, zip code
What are Pivot Tables?
February 15 Pivot Tables 3
![Page 4: WORKING WITH PIVOT TABLES - Genero Report Writer...WORKING WITH PIVOT TABLES. Objectives After this instruction, you will be able to: •Process multi-dimensional data with Pivot Tables](https://reader033.vdocuments.mx/reader033/viewer/2022052104/603ebf8717b7fa1f02067d8a/html5/thumbnails/4.jpg)
Relationship to Charts
• Pivot Table is a generalization of the Chart objects
• No limitation in dimensions and measures when rendered as a Table
February 15 Pivot Tables 4
![Page 5: WORKING WITH PIVOT TABLES - Genero Report Writer...WORKING WITH PIVOT TABLES. Objectives After this instruction, you will be able to: •Process multi-dimensional data with Pivot Tables](https://reader033.vdocuments.mx/reader033/viewer/2022052104/603ebf8717b7fa1f02067d8a/html5/thumbnails/5.jpg)
Pivot Table elements and structure
• PIVOTTABLE
– The table which is a parent for all other elements
• 2 Types of columns
– HYERARCHY (or DIMENSION)• Specify the columns data is
sorted by
– MEASURE• The values are aggregated
• If numeric, aggregation can be average, sum, maximum, minimum
• Grouped in FACT elements
February 15 Pivot Tables 5
![Page 6: WORKING WITH PIVOT TABLES - Genero Report Writer...WORKING WITH PIVOT TABLES. Objectives After this instruction, you will be able to: •Process multi-dimensional data with Pivot Tables](https://reader033.vdocuments.mx/reader033/viewer/2022052104/603ebf8717b7fa1f02067d8a/html5/thumbnails/6.jpg)
Pivot table Column definition
• Select dimensions and measures to define the columns of the table
– Select dimensions on the PIVOTTABLE element
– Select measures in FACT elements
• Define title for columns on dimension and measure elements
February 15 Pivot Tables 6
![Page 7: WORKING WITH PIVOT TABLES - Genero Report Writer...WORKING WITH PIVOT TABLES. Objectives After this instruction, you will be able to: •Process multi-dimensional data with Pivot Tables](https://reader033.vdocuments.mx/reader033/viewer/2022052104/603ebf8717b7fa1f02067d8a/html5/thumbnails/7.jpg)
Pivot table Row definition
• A Row is the entity of dimension declaration followed by 1 FACT element
• Typically one define 1 row and place it in a trigger
February 15 Pivot Tables 7
![Page 8: WORKING WITH PIVOT TABLES - Genero Report Writer...WORKING WITH PIVOT TABLES. Objectives After this instruction, you will be able to: •Process multi-dimensional data with Pivot Tables](https://reader033.vdocuments.mx/reader033/viewer/2022052104/603ebf8717b7fa1f02067d8a/html5/thumbnails/8.jpg)
Pivot table properties
• Title
• Draw As
– Typically ‘Table’
• Compute aggregates on the innermost dimension
• Hierarchies input order
– Order by which data is presorted
• Display selection
– What columns to display
• Display recurring dimension values
February 15 Pivot Tables 8
![Page 9: WORKING WITH PIVOT TABLES - Genero Report Writer...WORKING WITH PIVOT TABLES. Objectives After this instruction, you will be able to: •Process multi-dimensional data with Pivot Tables](https://reader033.vdocuments.mx/reader033/viewer/2022052104/603ebf8717b7fa1f02067d8a/html5/thumbnails/9.jpg)
Dimension/hierarchy properties
• Value– Column name for the dimension
• Numeric column– Default is String
• Enum Values– List of strings representing ordinal
numeric values
• Aggregate options– Compute Totals, Count, Distinct Count,
Average, Minimum & Maximum
• Title– Column title
• Format
February 15 Pivot Tables 9
![Page 10: WORKING WITH PIVOT TABLES - Genero Report Writer...WORKING WITH PIVOT TABLES. Objectives After this instruction, you will be able to: •Process multi-dimensional data with Pivot Tables](https://reader033.vdocuments.mx/reader033/viewer/2022052104/603ebf8717b7fa1f02067d8a/html5/thumbnails/10.jpg)
Measure properties
• Value
– Column name for the measure
• Numeric Column
– Specify if numeric or not
• Title
– Title of the column
• Format
February 15 Pivot Tables 10
![Page 11: WORKING WITH PIVOT TABLES - Genero Report Writer...WORKING WITH PIVOT TABLES. Objectives After this instruction, you will be able to: •Process multi-dimensional data with Pivot Tables](https://reader033.vdocuments.mx/reader033/viewer/2022052104/603ebf8717b7fa1f02067d8a/html5/thumbnails/11.jpg)
FACT properties
• Display Selection
– Specifies dimensions or measures to be displayed
• Output Order
– Specifies the order by which the data should be presented
• Top N
– Number of records to display
• Display Fact Rows
February 15 Pivot Tables 11
![Page 12: WORKING WITH PIVOT TABLES - Genero Report Writer...WORKING WITH PIVOT TABLES. Objectives After this instruction, you will be able to: •Process multi-dimensional data with Pivot Tables](https://reader033.vdocuments.mx/reader033/viewer/2022052104/603ebf8717b7fa1f02067d8a/html5/thumbnails/12.jpg)
Arrange hierarchies
• Ship hierarchies sparsely to minimize the volume of the data stream
– Send values only when changed
– Improves performance
February 15 Pivot Tables 12
![Page 13: WORKING WITH PIVOT TABLES - Genero Report Writer...WORKING WITH PIVOT TABLES. Objectives After this instruction, you will be able to: •Process multi-dimensional data with Pivot Tables](https://reader033.vdocuments.mx/reader033/viewer/2022052104/603ebf8717b7fa1f02067d8a/html5/thumbnails/13.jpg)
Summary: Create a static Pivot Table
• Add a new Pivot Table element to the report
– Typically under the Page Root of an empty report
• Add dimensions (hierarchy elements)
• Add measures under the FACT node
• Arrange dimensions and measures in the Structure view
• Set additional properties for all elements
February 15 Pivot Tables 13
![Page 14: WORKING WITH PIVOT TABLES - Genero Report Writer...WORKING WITH PIVOT TABLES. Objectives After this instruction, you will be able to: •Process multi-dimensional data with Pivot Tables](https://reader033.vdocuments.mx/reader033/viewer/2022052104/603ebf8717b7fa1f02067d8a/html5/thumbnails/14.jpg)
Dynamic Pivot Tables
• Specific Java class ‘PivotTable’ with 2 nested classes
– PivotTable.PivotHierarchy
– PivotTable.PivotMeasure
• Methods to get information about Pivot Tables present in a 4RP file
February 15 Pivot Tables 14
![Page 15: WORKING WITH PIVOT TABLES - Genero Report Writer...WORKING WITH PIVOT TABLES. Objectives After this instruction, you will be able to: •Process multi-dimensional data with Pivot Tables](https://reader033.vdocuments.mx/reader033/viewer/2022052104/603ebf8717b7fa1f02067d8a/html5/thumbnails/15.jpg)
Dynamic Pivot Tables
• Get information about the hierarchies
– Methods of a ‘PivotTable.PivotHierarchy’ object
• Get information about the measures
– Methods of a ‘PivotTable.PivotMeasure’ object
February 15 Pivot Tables 15
![Page 16: WORKING WITH PIVOT TABLES - Genero Report Writer...WORKING WITH PIVOT TABLES. Objectives After this instruction, you will be able to: •Process multi-dimensional data with Pivot Tables](https://reader033.vdocuments.mx/reader033/viewer/2022052104/603ebf8717b7fa1f02067d8a/html5/thumbnails/16.jpg)
February 15 Pivot Tables 16
![Page 17: WORKING WITH PIVOT TABLES - Genero Report Writer...WORKING WITH PIVOT TABLES. Objectives After this instruction, you will be able to: •Process multi-dimensional data with Pivot Tables](https://reader033.vdocuments.mx/reader033/viewer/2022052104/603ebf8717b7fa1f02067d8a/html5/thumbnails/17.jpg)
Exercise
• Open the ‘OrderReportJava’ demo project
• Check the static pivot table example ‘StaticPivotTable.4rp’
• Check the dynamic pivot table example ‘DynamicPivotTable.4rp’ and the corresponding source code ‘PivotTableDialog.java’ and ‘OrderReportJava.java’
• Run the demo and choose ‘DynamicPivotTable’ as design
February 15 Pivot Tables 17