Cognos 下拉列表名称显示

------需求:

改变下拉列表中的名称显示。

------解决方案:

增加以下javascript到report studio


if (fW)

{

fW._oLstChoicesPromptName.options[0].text = '写入你想显示的名称';
fW._oLstChoicesPromptName.focus();
fW._oLstChoicesPromptName.blur();
}
}

setTimeout("setDefaultValue()", 10);

[@more@]

------完整英文版解决方案:

Title:
Javascript: Changing the First Line of a Value Prompt or DropDownList prompt.

Document#:
1013968.7

Updated:
Dec 04, 2008

Applies To:
Cognos 8 BI Report Studio 8.1 | Cognos 8 BI Report Studio 8.2 | Cognos 8 BI Report Studio 8.3 | Cognos ReportNet 1.1 | Cognos ReportNet 1.1MR1 | Cognos ReportNet 1.1MR2 | Cognos ReportNet 1.1MR3


SRs:
46


Collection:
KB



--------------------------------------------------------------------------------


Note: This technique uses JavaScript against underlying report objects and methods in an IBM IBM Cognos 8 BI report. For this reason, there is no guarantee that reports created using this technique will migrate or upgrade successfully to future versions without requiring modifications. Any such modifications are the responsibility of the report designer.


Multimedia:

There is a video for versions prior to IBM Cognos 8.3 on this topic in the Multimedia Knowledge Base.

Description:

If you use a value prompt in your report, the label for the first line in the drop down list is the name of the Query item which is used to populate the prompt. How can this label be changed?

Solution:

Add an HTML item to the bottom of the report page. Add the following JavaScript code block(s) to the HTMLItem to change the first line of the drop down list.

Steps:

1. Go to the page that contains the value prompt and select the value prompt.

2. Specify a unique reference ID, such as UID for the last property in the list.

Note: In IBM Cognos 8, UID is now referenced as PromptName, replace PromptName with your refererence in the code fragments.




3. Add an HTML item to the bottom of the page, or right after the Prompt Control.

4. Insert the following JavaScript code into the HTML item:



For IBM Cognos 8.1 and 8.2 use this code fragment :







For IBM Cognos 8.3 use this code fragment :









Keywords:



JavaScript ReportNet CRN C8

来自 “ ITPUB博客 ” ,链接:http://blog.itpub.net/8345941/viewspace-1056023/,如需转载,请注明出处,否则将追究法律责任。

转载于:http://blog.itpub.net/8345941/viewspace-1056023/

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值