280 likes | 468 Views
Week 8 March 22. Creating a Matrix and Drill-down/Roll-up Report. Create the SQL. Tables. SQL. Create the Data Model. Report Wizard. . Select Matrix. Report Wizard. . Report Wizard. . Rows. Report Wizard. . Columns. Report Wizard. . Report Wizard. . Report Wizard. .
E N D
Week 8March 22 Creating a Matrix and Drill-down/Roll-up Report
Create the SQL Tables SQL
Report Wizard Select Matrix
Report Wizard Rows
Report Wizard Columns
Report Wizard Change to small column width
Initial Report Layout Column totals Redundant
Report Layout Eliminate
Layout Model Remove
Layout Model Push button Separate frames
Push Button Property Palette Leave at least a space
Programming the Drill-Down/Roll-Up Report Master Report (Annual) Data Model 1 Parameter-list1 Parameters names cannot be the same! Drill-down Report (Quarters) Data Model 2 Parameter-list2 Drill-down Report (Months) Data Model 2
p_class_description p_year From previous report
Transfer values from parameters and columns to local variables Transfer values from parameters and columns to local variables Parameter names should be different from those defined for this report Warning! Following this code verbatim will be a detriment to your grade
p_year p_class_description p_quarter3 From previous report
Creating a Lexical Reference Variable • Create a lexical reference variable under User Parameters of the Data Model (in the Object Navigator) Select Create
Create a User Parameter Select the new parameter, right-mouse click and select Property Palette
Change the Properties Change the name Change the data type to character Assign an initial value (optional)
Warning! Add after creating the initial data and layout models Enlargement select manufacturer_name, to_char(sales_month_98,'fmmm') Sequence, to_char(sales_month_98,'Mon') Month, &p_revenue3, &p_volume3 from sales_97_98 s, manufacturers m where s.manufacturer_code = m.manufacturer_code and m.manufacturer_code = upper(:p_manufacturer_code3) and to_char(sales_month_98,'q') = :p_quarter3 and s.product_class_code = upper(:p_product_class_code3) group by manufacturer_name, to_char(sales_month_98,'fmmm'), to_char(sales_month_98,'Mon') order by to_char(sales_month_98,'fmmm'); Lexical reference variables Otherwise, ORDER BY ignored
During Runtime... Host variable Lexical reference variables (default values) Host variable