If you are unable to create a new account, please email support@bspsoftware.com

 

News:

MetaManager - Administrative Tools for IBM Cognos
Pricing starting at $2,100
Download Now    Learn More

Main Menu

Dynamically change every month in dropdown value prompt.

Started by satya0320, 03 Nov 2011 09:26:09 AM

Previous topic - Next topic

satya0320

Hi All,

How to dynamically change of month in dropdown list in value prompt using java script in report studio?


Venkat B.

blom0344

"Change of month"
In what way?  Based on which logic?
Can you be more specific?

satya0320

Use Value    Display Value
-------------   -----------------
1                   Jan
2                   Feb
'' ''                 '' ''
12                 Dec             

These like in value prompt, but every current month willbe show that month only in value prompt.

blom0344

Don't need any java code for that.

Define a prompt query with 3 dataitems:

1. extract(month,current_date)   -->  use value

2. case extract(month,current_date)
    when 1 then 'Jan'
    when 2 then 'Feb'
    ......
    when 12 then 'Dec'
    else null end                        -->  display value

3. maximum([any other dataitem from model])

This should yield one (1) record for populating the valueprompt