BIEE12_根据显示指标展示不同报表

Posted 奔跑的金鱼

tags:

篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了BIEE12_根据显示指标展示不同报表相关的知识,希望对你有一定的参考价值。

报表开发过程中,我们经常会需要根据所选择的不同指标,展示不同的报表!例如:

image

显示指标有:金额与合同数,可以根据显示指标选择的内容进行相应报表数据展示

一、环境准备

create table crm_info(
crm_name varchar(100) ,
crm_no varchar(40) not null primary key ,
crm_type varchar(8),
crm_lvl varchar(8),
crm_status varchar(8),
crm_indu varchar(8),
crm_sex varchar(8),
crm_birthdate Date,
crm_dept varchar(8),
crm_country varchar(8),
crm_email varchar(20));

insert into crm_info  values(\'牧云笙\',\'crm001\',\'uvip\',\'A\',\'01\',\'A\',\'01\',to_date(\'1987-10-02\',\'yyyy-mm-dd\'),\'A01\',\'CN\',\'crm001@163.com\');
insert into crm_info  values(\'苏语凝\',\'crm002\',\'vip\',\'B\',\'01\',\'S\',\'02\',to_date(\'1986-1-2\',\'yyyy-mm-dd\'),\'A04\',\'USA\',\'crm002@163.com\');
insert into crm_info  values(\'南枯月漓\',\'crm003\',\'vip\',\'D\',\'01\',\'D\',\'02\',to_date(\'1973-02-02\',\'yyyy-mm-dd\'),\'A03\',\'UK\',\'crm003@163.com\');
insert into crm_info  values(\'赫兰铁朵\',\'crm004\',\'uvip\',\'B\',\'01\',\'M\',\'01\',to_date(\'1999-12-01\',\'yyyy-mm-dd\'),\'A02\',\'USA\',\'crm004@163.com\');
insert into crm_info  values(\'牧云寒\',\'crm005\',\'vip\',\'D\',\'01\',\'T\',\'02\',to_date(\'1965-01-01\',\'yyyy-mm-dd\'),\'A01\',\'USA\',\'crm005@163.com\');
insert into crm_info  values(\'硕风和叶\',\'crm006\',\'uvip\',\'D\',\'02\',\'U\',\'01\',to_date(\'1996-01-23\',\'yyyy-mm-dd\'),\'A01\',\'CN\',\'crm006@163.com\');
insert into crm_info  values(\'盼兮\',\'crm007\',\'uvip\',\'C\',\'01\',\'B\',\'02\',to_date(\'1998-01-01\',\'yyyy-mm-dd\'),\'A03\',\'CN\',\'crm007@163.com\');
insert into crm_info  values(\'穆如寒江\',\'crm008\',\'vip\',\'D\',\'02\',\'S\',\'01\',to_date(\'1976-12-4\',\'yyyy-mm-dd\'),\'A02\',\'CN\',\'crm008@163.com\');
insert into crm_info  values(\'兰钰儿\',\'crm009\',\'vip\',\'A\',\'01\',\'S\',\'02\',to_date(\'1986-4-6\',\'yyyy-mm-dd\'),\'A03\',\'UK\',\'crm009@163.com\');
insert into crm_info  values(\'牧云陆\',\'crm010\',\'vip\',\'B\',\'01\',\'L\',\'01\',to_date(\'1988-4-5\',\'yyyy-mm-dd\'),\'A01\',\'CN\',\'crm010@163.com\');
commit;

create table contract_info(
contract_no varchar(40) not null primary key,
crm_no varchar(40),
contract_amt decimal(18,2),
start_date varchar(8),
end_date varchar(8),
register_date varchar(8));

INSERT INTO contract_Info values(\'contract01\',\'crm002\',\'1230000\',\'20170203\',\'20180203\',\'20170203\');
INSERT INTO contract_Info values(\'contract02\',\'crm003\',\'200000000\',\'20160209\',\'20170209\',\'20160209\');
INSERT INTO contract_Info values(\'contract03\',\'crm004\',\'200000000\',\'20150609\',\'20160609\',\'20150609\');
INSERT INTO contract_Info values(\'contract04\',\'crm005\',\'23000000\',\'20170203\',\'20180203\',\'20170203\');
INSERT INTO contract_Info values(\'contract05\',\'crm006\',\'1000000\',\'20160506\',\'20170506\',\'20160506\');
INSERT INTO contract_Info values(\'contract06\',\'crm007\',\'100000000\',\'20180101\',\'20190101\',\'20180101\');
INSERT INTO contract_Info values(\'contract07\',\'crm002\',\'2000000\',\'20170202\',\'20180202\',\'20170202\');
INSERT INTO contract_Info values(\'contract08\',\'crm003\',\'200000000\',\'20170405\',\'20180405\',\'20170405\');
INSERT INTO contract_Info values(\'contract09\',\'crm004\',\'500000\',\'20110101\',\'20170101\',\'20110101\');
INSERT INTO contract_Info values(\'contract10\',\'crm005\',\'633333\',\'20120223\',\'20180223\',\'20120223\');
INSERT INTO contract_Info values(\'contract11\',\'crm006\',\'45000000\',\'20160101\',\'20180101\',\'20160101\');

create table mapping(
Type VARCHAR(20),
Key varchar(4),
Value varchar(100));

INSERT INTO mapping VALUES(\'crm_lvl\',\'vip\',\'vip客户\');
INSERT INTO mapping VALUES(\'crm_lvl\',\'uvip\',\'非vip客户\');
INSERT INTO mapping VALUES(\'crm_type\',\'A\',\'优秀\');
INSERT INTO mapping VALUES(\'crm_type\',\'B\',\'良好\');
INSERT INTO mapping VALUES(\'crm_type\',\'C\',\'中等\');
INSERT INTO mapping VALUES(\'crm_type\',\'D\',\'一般\');
INSERT INTO mapping VALUES(\'crm_status\',\'01\',\'存续客户\');
INSERT INTO mapping VALUES(\'crm_status\',\'02\',\'流失客户\');
INSERT INTO mapping VALUES(\'crm_indu\',\'A\',\'农、牧、林、渔业\');
INSERT INTO mapping VALUES(\'crm_indu\',\'B\',\'采矿和采石\');
INSERT INTO mapping VALUES(\'crm_indu\',\'C\',\'制造业\');
INSERT INTO mapping VALUES(\'crm_indu\',\'D\',\'电、煤气、蒸汽和空调供应\');
INSERT INTO mapping VALUES(\'crm_indu\',\'E\',\'供水;污水处理、废物管理和补救\');
INSERT INTO mapping VALUES(\'crm_indu\',\'F\',\'建筑业\');
INSERT INTO mapping VALUES(\'crm_indu\',\'G\',\'批发和零售业;汽车和摩托车修理\');
INSERT INTO mapping VALUES(\'crm_indu\',\'H\',\'运输与存储\');
INSERT INTO mapping VALUES(\'crm_indu\',\'I\',\'食宿服务\');
INSERT INTO mapping VALUES(\'crm_indu\',\'J\',\'信息和通信\');
INSERT INTO mapping VALUES(\'crm_indu\',\'K\',\'金融和保险\');
INSERT INTO mapping VALUES(\'crm_indu\',\'L\',\'房地产\');
INSERT INTO mapping VALUES(\'crm_indu\',\'M\',\'专业、科学和技术\');
INSERT INTO mapping VALUES(\'crm_indu\',\'N\',\'行政和辅助\');
INSERT INTO mapping VALUES(\'crm_indu\',\'O\',\'公共管理与国防;强制性社会保障\');
INSERT INTO mapping VALUES(\'crm_indu\',\'P\',\'教育\');
INSERT INTO mapping VALUES(\'crm_indu\',\'Q\',\'人体健康和社会工作\');
INSERT INTO mapping VALUES(\'crm_indu\',\'R\',\'艺术、娱乐和文娱\');
INSERT INTO mapping VALUES(\'crm_indu\',\'S\',\'其他服务\');
INSERT INTO mapping VALUES(\'crm_indu\',\'T\',\'家庭作为雇主的;家庭自用、未加区分的物品生产和服务\');
INSERT INTO mapping VALUES(\'crm_indu\',\'U\',\'国际组织和机构\');
INSERT INTO mapping VALUES(\'crm_sex\',\'01\',\'\');
INSERT INTO mapping VALUES(\'crm_sex\',\'02\',\'\');
INSERT INTO mapping VALUES(\'crm_dept\',\'A01\',\'财务部\');
INSERT INTO mapping VALUES(\'crm_dept\',\'A02\',\'人事部\');
INSERT INTO mapping VALUES(\'crm_dept\',\'A03\',\'采购部\');
INSERT INTO mapping VALUES(\'crm_dept\',\'A04\',\'市场部\');
INSERT INTO mapping VALUES(\'crm_country\',\'CN\',\'中国\');
INSERT INTO mapping VALUES(\'crm_country\',\'USA\',\'美国\');
INSERT INTO mapping VALUES(\'crm_country\',\'UK\',\'英国\');

commit;

------建立维度视图
CREATE OR REPLACE VIEW V_DIM_CRM_LVL
AS SELECT KEY,VALUE FROM mapping WHERE Type=\'crm_lvl\';

CREATE OR REPLACE VIEW V_DIM_CRM_TYPE
AS SELECT KEY,VALUE FROM mapping WHERE Type=\'crm_type\';

<

以上是关于BIEE12_根据显示指标展示不同报表的主要内容,如果未能解决你的问题,请参考以下文章

BIEE17_仪表盘提示中值按顺序显示

BIEE16_饼图应用

BIEE使用技巧

BIEE分析的解析机制

BIEE11_BIEE图形报表在谷歌浏览器64.0.3282.140中访问图例乱码解决

Oracle Sales Cloud:报告和分析(BIEE)小细节2——利用变量和过滤器传参(例如,根据提示展示不同部门的数据)