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

Removing duplicate values in drop down list.

Started by cognos_developer, 01 Jun 2011 09:58:49 AM

Previous topic - Next topic

cognos_developer

Hi friends,

I have data like 2011-5-1
                        2011-5-2
                        2010-4-23
                        2010-4-21
So,when I am populating the values in drop down value prompt in MM format values are repeating and showing as
                  2011-5
                  2011-5
                  2010-4
                  2010-4
I want to eliminate duplicate values and show only unique values.Please suggest me is there a way for this.
Note:-I do not want to use javascript in my Report.

Thanks

MFGF

I suspect the issue is that you are simply using formatting to change the date display, so behind the scenes the values are still different.  You could try using a calculated item to reformat the dates to the form you require - use fully qualified item names from the package to set the timing to before auto grouping/aggregation.

Regards,

MF.
Meep!

PRIT AMRIT

QuoteI have data like 2011-5-1
                        2011-5-2
                        2010-4-23
                        2010-4-21
So,when I am populating the values in drop down value prompt in MM format values are repeating and showing as
                  2011-5
                  2011-5
                  2010-4
                  2010-4
I want to eliminate duplicate values and show only unique values.Please suggest me is there a way for this.
Note:-I do not want to use javascript in my Report.

As MF suggested create another DATA ITEM in your prompt query, with an expression like

[Calculated Date]
---------------------
cast(extract(Year,[Date]),char(4))+'-'+cast(extract(Month,[Date]),char(2))

Select the Value Prompt and define Use Value =[Calculated Date]

Use the same [Calculated Date] in you main query to filter the report

[Calculated Date]=?Parameter?

Hope it helps

Thanks