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 1 year has passed since last update.

Cognos Analytics 11.2.4 JavaScript サンプル

Posted at

概要

こちらの記事で紹介していたCognos AnalyticsのJavaScriptサンプルの11.2.4版のアップデートです。
Cognos Analytics 11.0.10 JavaScript サンプル
https://qiita.com/shinyama/items/4092fed788fdee363367

必要に迫られた時に「こんなサンプル有ったな~」と思いだせると強いので、チラ見して記憶の隅にとどめておいてください。

導入方法は11.2.4ではJavaScriptのサンプルレポートは、基本のサンプルの中のTeam content > Samples > JavaScript にあります。
サーバー上に配置されているJavaScriptファイルは「C:\Program Files\IBM\cognos\analytics\webcontent\bi\samples\js」にありますが、これを「C:\Program Files\IBM\cognos\analytics\webcontent\samples\javascript」に移動しないと動作しませんのでご注意ください。

Auto refresh
指定した時間が経つと自動的にレポートがリフレッシュされます。

レポート実行状態
image.png

15秒経つと自動的にレポートが再実行されます
image.png

Basic button control
「Golf Equipment Inc」など、水色枠のエリアをクリックするとそれに応じてリストが絞り込まれます。
image.png

Cascading prompts with multi-select
※レポート内のクエリーアイテムの紐づけを修正しないと動作しません
Countryのプロンプトを選択した瞬間に、選択に応じたCityの値が表示されていきます。複数選択可能
image.png

Staff nameまで選択すると「Update」ボタンが使用可能になります。
image.png

Cascading prompts with single-select
※レポート内のクエリーアイテムの紐づけを修正しないと動作しません
Product Lineのプロンプトを選択した瞬間に、選択に応じたProduct Typeの値が表示されていきます。単数選択
image.png

Clear prompt selections
プロンプトを選択した状態で
image.png

「Clear」ボタンを選択すると、選択が全て解除されます。
image.png

Collapse regions and subsections
省略・展開を水色のプロンプトエリアだけでなく
image.png

個々のプロンプトも省略・展開できます。
image.png

Date prompt presets
「Yesterday」を選択すると昨日の日付がFromに反映され
image.png

「Previous Month」を選択すると、先月がFrom & To に反映されます。
image.png

Display all prompt values ignoring user selections
「Get All Prompt Values」をクリックすると、プロンプトで何が選択されているかに関わらず、プロンプトの値の一覧が表示される。
image.png

Display user selected prompt values
プロンプトで選択した値が表示される。
image.png

HTML submit and cancel buttons
「Submit」や「Cancel」ボタンを自作したい時の参考に。「Cancel」とはレポートを抜けてポータルに戻る動作です。
image.png

Indexed prompt
Indexに表示されているアルファベットを選択すると、その文字から始まる値のみProduct typeのプロンプトに表示される。
image.png

Info icon
i に〇のアイコンにマウスを置くとポップアップ風に説明や画像が表示されます。
image.png

Limit numeric prompt selection by database value
テキストプロンプトに入力した値が実際にテーブルに無い値だと「Run Report」が選択できない。
image.png

実際にテーブルに有る値だと選択可能になる。
image.png

Limit time between two dates
Fromの日付が一週間前だとFinish可能。
image.png

10日以上の期間差が出るとアラートが表示されFinish不可。
image.png

Limit user selecton to two items
3個以上選択して「Finish」すると、エラーメッセージがポップアップ表示される。
image.png

Personal default prompt selections - set selections
プロンプトを選択して「Save Prompt Values」で選択した値をクッキーに保存できる。
image.png

Personal default prompt selections - use selections
先ほどクッキーに保存した値を呼び出せる。
image.png

Validate prompt values when button pushed
選んではいけない組み合わせでプロンプトを選んでSubmitすると、エラーのポップアップが表示される。
image.png

Validate type-in postal code value
何文字目が数字かアルファベットかチェックして、ルールに違反しているとFinishできない。例では最終桁が数字である必要がある。
image.png

Validate type-in product line code
プロンプト入力のチェック。数値の範囲でチェックされる。
image.png

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?