Cognos Prompt API Usage for Interactive Reports

Requirements:
Prompt page and report are on same page for dynamic refresh
User wants date to be selected for latest month available in Database
 
Solution steps:
  1. Calculated maximum month as latest month for report
  2. Sorted Data item in descending order and applied sorting on prompt ( auto submit = yes)
  3. Use Prompt API for RS to select latest month referring below link
 
http://www-01.ibm.com/support/docview.wss?uid=swg21639520
 
 
Issues Faced:

Page was getting reset to default selection even we select different month.


Solution:
Add line of code in script using below reference:


http://cogblogger.com/2014/10/javascript-running-code-only-once/





Issue Faced:

Initial run of report is not filtering out data based on prompt parameter and showing aggregated value.

Solution:

Use of prompt macro to make default parameter as latest month and made filter "Required" instead of Optional.

[Month Year] = #prompt('p_Month_Year', 'string', '[Max Month Year]')#




 

Popular posts from this blog

Cognos Excel Text Wrapping Issue - Row Merge and Column Merge

Cognos: How to replace an existing report without breaking links?

How to change package for a report in IBM Cognos Analytics (ICA)?