0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 5 years have passed since last update.

Cognos Analytics プロンプトエリアの表示・非表示を切り替えるJavaScript

Posted at

概要

Cognos Analyticsで、プロンプトエリアの表示・非表示を切り替えるJavaScriptのサンプルの実装手順です。
プロンプトって、レポートによっては大量になり、巨大なエリアを必要としますので、この表示・非表示も非常に要望の多い要件ですね。
000.PNG

以下の記事が元です。
是非ご活用頂ければと思います。
How to use a custom control with JavaScript to hide and show a filter panel in IBM #Cognos Analytics 11.0.7
https://www.ibm.com/communities/analytics/cognos-analytics-blog/how-to-use-a-custom-control-with-javascript-to-hide-and-show-a-filter-panel-in-ibm-cognos-analytics-11-0-7/

実装手順

実装のための、元ネタとなるJavaScriptソースは、Cognos Analyticsをインストールすると、以下のフォルダに配置される「HideShowFilterPanel.js」となります。
005.PNG

レポートを新規に作成し、表を、1列3行幅100%で作成します。
001.PNG

表の1番上のセルに「ブロック」を置きます。
002.PNG

ブロックのプロパティで、以下を指定します。
003.PNG

Padding: 20px 20px 20px 20px
Size & overflow: Width: 100%
Name: FilterPanel

表の2番目のセルに「Custom Control」を置きます。
004.PNG

Custom Controlのプロパティで、「モジュール・パス」に以下を指定します。
/bi/samples/js/HideShowFilterPanel.js

さらにプロパティの「設定」で以下を指定します。

{
"Control name": "FilterPanel",
"Orientation": "top",
"Padding": "0px 30px 0px 30px",
"Foreground color": "#003868",
"Hover foreground color": "#EAEAEA",
"Background color": "#EAEAEA",
"Hover background color": "#38A8C8",
"Border color": "#B1B6BA",
"Hover border color": "#EAEAEA",
"Font size": "10px"
}

Custom Controlを含む2番目のセルのプロパティで、以下を指定します。

Padding: Top 0px Bottom 1px
Background color: #003868
Horizontal alignment: Center

以上で、プロンプトエリアを表示・非表示するための基本構造は完成です。

是非ご活用下さい。

0
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?