530 likes | 539 Views
Learn about the different report styles and types in Oracle Reports, including tabular, master-detail, cross-tabulation, and drill-down reports.
E N D
Week 6March 1 Oracle Reports: Master-Detail Report
Report Styles A tabular report is the most basic type of report. Each column corresponds to a column selected from the database. A form-like report displays one record per page, inserting field values to the right of field labels. A mailing label report prints mailing labels in multiple columns on each page. You can print the labels across the page and then down, or down and then across. A form letter report contains database values embedded in boilerplate text. (Boilerplate text is any text that you enter or import into a Report Editor.)
Report Styles A group left report divides the rows of a table into "sets," based on a common value in one of the columns. Use this type of report to restrict a column from repeating the same value several times while values of related columns change. A group above report contains two or more groups of data. For every value of the master group, the related values of the detail group(s) are fetched from the database. A matrix (cross-tabulation) report contains one row of labels, one column of labels, and information in a grid format that is related to the row and column labels. A distinguishing feature of matrix reports is that the number of columns is not known until the data is fetched from the database. A matrix with group report is a group above report with a separate matrix for each value of the master group.
Types of Reports • Tabular • Master-detail • Cross-tabulation • Drill-down (and roll-up)
Tabular Report Columns
Group (Master-Detail) Report Master Detail Group totals
Matrix Report Category 2 Category 1 Row totals Column totals
Drill-Down Report Highest Level Report Drill-down
Drill-Down Report Next Highest Level Report Drill-down
Drill-Down Report Lowest Level Report Drill-down Year Quarter Months
Oracle Reports Object Navigator Data Model Layout Model
Basic Report Objects • Data Model • Layout Model • Triggers
Data Model SQL
Data Model Objects • Component objects: • Queries • SQL statements • Links • Establishes the relationship between the data of two queries (e.g., master/detail) • Groups • Similar to control groups in control break reports • Columns • Data on the report (vertical arrangement) • Summary, formulas or placeholders
Report Layout Model Header Frame Field Body
Layout Model Objects • Frames - contains groups of data and objects (similar to a block) • Repeating frames - represent one record in a group • Fields -placeholders for data • Boilerplate - labels, lines or graphics • Anchors - used for relative positioning of child to parent • Buttons • OLE2 objects
Reports • Purpose - Format a large amount of data in a reasonable fashion in a very timely manner • Components Page Header Appears only at the beginning of the report 1 Body 1 Logical pages reside within a component 2 Margin Data Model 3 4 Appears only at the end of the report 1 Trailer
Creating A Report • Build the data model • Assign the fields to the report • Arrange the report in the layout model editor • Test the report • Use the report layout editor to format the report
Data Model Build the query in SQL Plus and paste it into the data model
Working with Frames Page Heading Page Field Repeating Group
Master-Detail Report Page heading Control heading Control group Control footing
Data Model Two Queries Master group Host variable
Data Model Data link Detail group
Data Model Queries Master group Detail group Data link
Layout Model Editor Repeating Frame Frames cannot overlap! Body
Live Previewer Run
Steps • Create the data model • Master query • Detail query • Link the queries • Create the report layout • Use the Report Wizard • Test • Format the report layout • Test
Basic Report Objects Data Model Layout Model Triggers
Calling the Report Host (bind) variable Parameter Form This will appear automatically when a host (bind) variable appears in the query (data model)
Anatomy of a Master-Detail Report Group header (master) Detail lines Group footer
Master-Detail Report One-to-many relationship Master Manufacturers Have Detail Products
Master-Detail Report Data Model First Query Host (bind) variable Create and test the query in SQL Plus without the host variable then paste it into the data model.
Master-Detail Report Data Model Data Link Second Query
Create the Initial Report Layout Designate fields and values Master-detail report Wizard used in a different report
Data Model Queries Master group Detail group Data link
Layout Model Editor Repeating Frame Frames cannot overlap! Body