Friday, October 24, 2014

How to design Cognos interactive reports 06 - Make filters flexible with search prompt

    1. Context

Sometimes, the dimension is too big to be selected. The filter solution is to use search prompt instead. We can use conditional block, value prompt is used for normal small dataset, while Search Prompt is used for big dataset. Both prompt can be coexist, depends on what query item business users to choose. The idea is to apply condition block for specifying filter values. This document will demonstrate the idea to use prompt token to generate filter with search prompt. Please see attached report specification for review (version 10.2 with sample Package GoSales)

    1. Sample

When company is selected, then search prompt will be populated. This idea will be very good for performance as system don’t need to retrieve all data for company. However, simple list box is used for other selections, such as product line.
    1. Prompt

      1. First value prompt

      1. Conditional block

      1. Second list box or search prompt

Whether it is list box or search prompt, the query is same. This filter #prompt ('pFilter1_Column','token')#  makes it possible to have values depending on the selection of value prompt. Please also note that cascade source is specified for list box.
    1. Query

The key to make filters flexible is to apply prompt token
#Prompt('pFilter1_Column', 'token')# in (?pFilter1_Values?)

    1. Layout

Note to make Search Prompt size changeable:

 <div id="selectSearchX">

  var e=document.getElementById('selectSearchX');

No comments:

Post a Comment