COGNOiSe.com - The IBM Cognos Community

IBM Cognos 10 Platform => Cognos 10 BI => Report Studio => Topic started by: vincydza@gmail.com on 03 Nov 2014 09:01:39 AM

Title: Make any one of the two parameters mandatory.
Post by: vincydza@gmail.com on 03 Nov 2014 09:01:39 AM
Hi,

My report in report studio is having the following two filter parameters.

[Transaction date] between ?From Date? AND ?To Date?
[Shop order No] IN (?Shop Order No?)

How can I make any one of the two parameters mandatory.

Vince
Title: Re: Make any one of the two parameters mandatory.
Post by: sunny bachan prasad on 03 Nov 2014 10:48:11 AM
Can you please explain in detail what you really want.
Title: Re: Make any one of the two parameters mandatory.
Post by: vincydza@gmail.com on 03 Nov 2014 01:56:10 PM
The behaviour of the parameter screen should be like if the user has entered values for  transaction dates then shop order number filter criteria should not be mandatory or if the user enters value for  Shop order number then Transaction date filter criteria should not be mandatory.

At any point in time any one of the two filter criteria must be mandatory.

How can this be achieved?

Regards

Vince



Title: Re: Make any one of the two parameters mandatory.
Post by: vincydza@gmail.com on 04 Nov 2014 09:29:31 AM
Is there a solution to this request.

Vince
Title: Re: Make any one of the two parameters mandatory.
Post by: BigChris on 04 Nov 2014 10:03:49 AM
I would imagine that to do that you'd need to do something in Javascript. I don't know of anythinfg in native Cognos that would do that for you. You can obviously combine the two parameters in your filter using something along the lines of:

(?parameter1? is not missing and [Shop Order] = ?parameter1?) or (?parameter2? is not missing and [Transaction Date] = ?parameter2?)