Chinaunix首页 | 论坛 | 博客
  • 博客访问: 7305949
  • 博文数量: 444
  • 博客积分: 10593
  • 博客等级: 上将
  • 技术积分: 3852
  • 用 户 组: 普通用户
  • 注册时间: 2006-05-09 15:26
文章分类

全部博文(444)

文章存档

2014年(1)

2013年(10)

2012年(18)

2011年(35)

2010年(125)

2009年(108)

2008年(52)

2007年(72)

2006年(23)

分类: 系统运维

2009-06-10 09:00:25

Problem(Abstract)
This document describes how to add a link to a Cognos 8 BI Report Studio report which provides the same functionality as the Previous Report button on the toolbar. Clicking the link in a report to which you've just done a drill through will return you to the parent report. This technique can be useful if the Report Viewer toolbar has been customized, or for improved visibility to discourage end-users from clicking their browser's back button (which can be problematic in some circumstances due to page caching).
 
 
Resolving the problem
Note: This technique uses JavaScript against underlying report objects in a 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.

Description:

This document describes how to add a link to a Cognos 8 BI Report Studio report which provides the same functionality as the Previous Report button on the toolbar. Clicking the link in a report to which you've just done a drill through will return you to the parent report. This technique can be useful if the Report Viewer toolbar has been customized, or for improved visibility to discourage end-users from clicking their browser's back button (which can be problematic in some circumstances due to page caching).

Please note that this is not considered official functionality and Cognos may change the way the Previous Report mechanism works in future versions of the product. This technique was tested in Cognos 8 BI Maintenance Release 2 and Cognos 8.3 BI but there is no guarantee that it will continue to work in versions after Cognos 8.3.

Solution:

Put HTML items around the item in your report which you want to turn into a hyperlink (most likely a Text Item or Image), and use the html tags to execute the below JavaScript command. It's advisable to use the onClick property to hide the command from end-users, but it can also be put in the HREF property. In the document attachments there is a Cognos 8 MR2 and a Cognos 8.3 report specification built against GO Sales and Retailers (Cognos 8.2) and Go Sales(Query) package (Cognos 8.3) which demonstrates this technique; simply create a parent report against the applicable package with the Product Line field, and set up a drill through which passes Product Line to the provided report. After drilling through, clicking the link at the top of the report will return you to the parent.

JavaScript Solution for Cognos 8.2


JavaScript Solution for Cognos 8.3 and beyond



Steps:

1. Identify the item in your report you wish to turn into a hyperlink.

2. From the Toolbox, drag an HTML Item both to the left and to the right of the object you identified in step 1.

3. Double-click the left HTML item, and give it the appropriate JavaScript expression (defined above). Double-click the right HTML item, and give it the expression

Keywords:

return, back, first, link, button, icon javaScript

阅读(2851) | 评论(0) | 转发(0) |
给主人留下些什么吧!~~