本实验需要使用FOD Schema,请参考《发布与运行 Oracle Fusion Order Demo》。
1. 通过SQL语句创建VO
其中,SQL语句内容如下:查看美国各个州的各类电子产品的销售情况。
SELECT category_translations.category_name as "Category",
products_base.product_name as "Product",
addresses.state_province as "State",
sum(order_items.quantity * order_items.unit_price) as "Sales"
FROM products_base, product_categories_base, category_translations, orders, order_items, addresses
WHERE products_base.product_id = order_items.product_id AND
products_base.category_id = product_categories_base.category_id AND
product_categories_base.category_id = category_translations.category_id AND
orders.ship_to_address_id = addresses.address_id AND
orders.order_id = order_items.order_id AND
addresses.country_id = 'US'
GROUP BY category_translations.category_name, products_base.product_name, addresses.state_province
ORDER BY category_translations.category_name, products_base.product_name
2. 拖放VO,选择Table-->ADF Pivot Table
Pivot Table 具体设置如下:
3. 运行页面
(1)默认效果:
(2)拖动行头Product到列头State下:
(3)再拖动列头State到行头Category下:
Project 下载:ADF_PivotTable.7z
没有评论:
发表评论