OBIEE Tips #5: Too many values in single select prompt

转载 2012年03月24日 07:51:24

OBIEE’s single select prompt can’t display by default more than 256 values (It displays a “Too Many Values” value at the end of the list when the number of values is greater than 256).

This can be fixed in two ways:

1) edit the instanceconfig.xml file by adding the following line:

1 <Prompts><MaxDropDownValues>MAX_VALUES</MaxDropDownValues></Prompts>

where MAX_VALUES is the number of values the prompt will display.
Take care: a big value could affect the performances.

2) Change the single-select value prompt to the multi-select value prompt. Multi-select value prompt displays all the values without limitation.

By default it displays the first 50 values and a link to show the next 50 and so on.
This value can be modified; just edit the instanceconfig.xml file by adding the following line:

1 <Prompts><MaxScrollValues>SCROLL_VALUES</MaxScrollValues></Prompts>

where SCROLL_VALUES is the values’ range number to show.

3) If you need to use a single select prompt because of business requirements, the best way is to create a first prompt by which you can select a first subset of values and constrained the next one on that.

The example above has been done quickly by changing the “Starts With” prompt formula that generates the range values with the following code:

01 CASE
02 WHEN SUBSTRING("D5 Employee"."E01 Employee Name" FROM 1 FOR 1) = 'A' THEN 'A-F'
03 WHEN SUBSTRING("D5 Employee"."E01 Employee Name" FROM 1 FOR 1) = 'B' THEN 'A-F'
04 WHEN SUBSTRING("D5 Employee"."E01 Employee Name" FROM 1 FOR 1) = 'C' THEN 'A-F'
05 WHEN SUBSTRING("D5 Employee"."E01 Employee Name" FROM 1 FOR 1) = 'D' THEN 'A-F'
06 WHEN SUBSTRING("D5 Employee"."E01 Employee Name" FROM 1 FOR 1) = 'E' THEN 'A-F'
07 WHEN SUBSTRING("D5 Employee"."E01 Employee Name" FROM 1 FOR 1) = 'F' THEN 'A-F'
08
09 WHEN SUBSTRING("D5 Employee"."E01 Employee Name" FROM 1 FOR 1) = 'G' THEN 'G-L'
10 WHEN SUBSTRING("D5 Employee"."E01 Employee Name" FROM 1 FOR 1) = 'H' THEN 'G-L'
11 WHEN SUBSTRING("D5 Employee"."E01 Employee Name" FROM 1 FOR 1) = 'I' THEN 'G-L'
12 WHEN SUBSTRING("D5 Employee"."E01 Employee Name" FROM 1 FOR 1) = 'J' THEN 'G-L'
13 WHEN SUBSTRING("D5 Employee"."E01 Employee Name" FROM 1 FOR 1) = 'K' THEN 'G-L'
14 WHEN SUBSTRING("D5 Employee"."E01 Employee Name" FROM 1 FOR 1) = 'L' THEN 'G-L'
15
16 WHEN SUBSTRING("D5 Employee"."E01 Employee Name" FROM 1 FOR 1) = 'M' THEN 'M-R'
17 WHEN SUBSTRING("D5 Employee"."E01 Employee Name" FROM 1 FOR 1) = 'N' THEN 'M-R'
18 WHEN SUBSTRING("D5 Employee"."E01 Employee Name" FROM 1 FOR 1) = 'O' THEN 'M-R'
19 WHEN SUBSTRING("D5 Employee"."E01 Employee Name" FROM 1 FOR 1) = 'P' THEN 'M-R'
20 WHEN SUBSTRING("D5 Employee"."E01 Employee Name" FROM 1 FOR 1) = 'Q' THEN 'M-R'
21 WHEN SUBSTRING("D5 Employee"."E01 Employee Name" FROM 1 FOR 1) = 'R' THEN 'M-R'
22
23 WHEN SUBSTRING("D5 Employee"."E01 Employee Name" FROM 1 FOR 1) = 'S' THEN 'S-Z'
24 WHEN SUBSTRING("D5 Employee"."E01 Employee Name" FROM 1 FOR 1) = 'T' THEN 'S-Z'
25 WHEN SUBSTRING("D5 Employee"."E01 Employee Name" FROM 1 FOR 1) = 'U' THEN 'S-Z'
26 WHEN SUBSTRING("D5 Employee"."E01 Employee Name" FROM 1 FOR 1) = 'W' THEN 'S-Z'
27 WHEN SUBSTRING("D5 Employee"."E01 Employee Name" FROM 1 FOR 1) = 'X' THEN 'S-Z'
28 WHEN SUBSTRING("D5 Employee"."E01 Employee Name" FROM 1 FOR 1) = 'Y' THEN 'S-Z'
29 WHEN SUBSTRING("D5 Employee"."E01 Employee Name" FROM 1 FOR 1) = 'Z' THEN 'S-Z'
30
31 ELSE 'UNKNOWN'
32
33 END

That should not be done in a production environment; infact it’s better to map the range values in a table and add the appropriate business logic.

ORA-00913: too many values分析

  今天晚上旁边的同事在调试代码时出现了下面的bug: ORA-00913: too many values 。。。。(后面的具体的就不写了)第一次碰到这样的情况,上网一查才知道:原来同事的sql语句...
  • servaywong
  • servaywong
  • 2010年01月15日 12:38
  • 11223

ORA-00913错误:PL/SQL: ORA-00913: too many values

ORA-00913错误 描述:PL/SQL: ORA-00913: too many values 目标:编写一个可以循环插入数据的脚本 操作过程: SQL> desc tcustmer...
  • huangyanlong
  • huangyanlong
  • 2014年06月20日 22:38
  • 3522

ValueError: too many values to unpack (expected 2)

a = {'Time': '2017-09-19', 'News': '楚了何人之手。今日,楚天都市报'} for k,v in a: print('%s %s'%(k,v))返回了下面的错误...
  • m0_37693335
  • m0_37693335
  • 2017年09月20日 12:49
  • 2120

关于解决cv2.findContours返回值too many values to unpack (expected 2)的问题

根据网上的 教程,python opencv的轮廓提取函数会返回两个值,第一个为轮廓的点集,第二个是各层轮廓的索引。但是实际调用时我的程序报错了,错误内容如下 too many values to ...
  • louzhengzhai
  • louzhengzhai
  • 2017年05月29日 17:17
  • 5813

Python too many values to unpack

这种错误是指一个tuple值赋给一个tuple变量时,变量个数不够造成的。如: a, b = (1, 2, 3)...
  • nanyilou_xiaoye
  • nanyilou_xiaoye
  • 2017年12月20日 15:49
  • 378

关于 Python opencv 使用中的 ValueError: too many values to unpack

关于 Python opencv 使用中的 ValueError: too many values to unpack
  • jjddss
  • jjddss
  • 2017年05月24日 11:21
  • 4137

python2.7错误for k,v in dict: ValueError: too many values to unpack

The for statement The for statement is used to iterate over the elements of a sequence (such as a s...
  • chiclewu
  • chiclewu
  • 2016年01月26日 22:08
  • 2892

C语言结构体初始化出现 too many initializer values 问题

前一阵子在写程序的时候发现的一个问题,简化后的代码如下: int a; void fun1() { a=1; } void fun2() { a=2; } void fun3() ...
  • gdczcjf
  • gdczcjf
  • 2012年04月02日 00:44
  • 8084

python错误for k,v in d: ValueError: too many values to unpack

John Fouhy john at fouhy.net Tue May 22 00:50:14 CEST 2007 Previous message: [Tutor] for k,v...
  • rj03hou
  • rj03hou
  • 2010年05月10日 18:52
  • 36095

解决cv2.findContours返回值too many values to unpack (expected 2)的问题

解决cv2.findContours返回值too many values to unpack (expected 2)的问题
  • jacke121
  • jacke121
  • 2017年08月09日 16:14
  • 536
内容举报
返回顶部
收藏助手
不良信息举报
您举报文章:OBIEE Tips #5: Too many values in single select prompt
举报原因:
原因补充:

(最多只允许输入30个字)