Reputation: 49
I have a static prompt which is a single select. In that I have two values lets call it A and B. So when I select option 'A' my report pulls all data from the DB which is expected. So when user Select option 'B' the report should pull only the records whose code = 'M'. Here code is a column name in the report.
Note: For option 'A' I don't need to set any prompt in the report because it should pull all records by default.
Upvotes: 1
Views: 865
Reputation: 544
I think I understand, try this:
if the user selects A - the prompt is NULL and the optional filter is ignored if the user selects B - the filter [Some data item] = ?YourParm? will occur
Also, if you prefer to not have header text you can make static values A, B and modify the optional filter to be like this:
Upvotes: 1
Reputation: 3089
Let's assume your parameter name is param and data item is named item.
Filter expression:
if (?param? = 'A')
then ([item])
else ('M')
= [item]
Note: You absolutely need to use a prompt. The result of selecting A should be to not filter.
Upvotes: 1