Ashish B Sathish
Ashish B Sathish

Reputation: 121

Cognos Dynamic Filtering

I searched all over the internet but couldnt find an answer. I want to create 1. a radio button with two options A, B (which are supposedly two columns in the database with "date" datatype) and 2. a date prompt Now if the user selects option A with a date range(in the date prompt) the data should be filtered on A if the user selects option B with a date range(in the date prompt) the data should be filtered on B

Upvotes: 0

Views: 617

Answers (2)

Manish Mishra
Manish Mishra

Reputation: 61

If I get this straight: 1. You first want to create a Radio Button:Value Prompt with values from DB 2. Then you want to filter another Prompt based on selection of the Radio button Prompt. (You can do this by what Andrew has suggested)

To create a Radio button prompt, Drag a Value prompt > Select Radio Button Group (under Select UI) > Select Query > Select Use Value and Display Value

My guess is that you are having trouble creating Query which will just give you a single row with two date columns...

Hope that helps....

Upvotes: 0

Andrew
Andrew

Reputation: 8703

Your question is far from clear, but if I understand you want to use the radio button to determine which date column to use in a filter? If so, then something like this should work:

if (?RadioButtonPrompt? = 'A') then ([DateColumnA] = ?DatePrompt?)
else ([DateColumnB] = ?DatePrompt?)

Upvotes: 2

Related Questions