Reputation: 69
Please guide how to do this requirement.
I Have a report having 2 command level parameters a and b. If they select any of the one parameter then other one should be disabled/should not ask any value to enter /should not take any value . Please suggest how to do
Upvotes: 0
Views: 1345
Reputation: 1346
This should be a feature of the user interface. You can implement it if you write your own software. The only viewer , which MIGHT be able to do this is R-Tag (www.r-tag.com). But even it will need to do some workaround ( if can do it at all). This behavior is very unique. Why would you need to have it ?
Upvotes: 0
Reputation: 26262
Command don't support optional parameters. Moreover, you can't disable or hide a parameter based on another parameter's value.
Your best option is to create a parameter that has a default value that will be 'ignored' by the query.
For example, given this Access command:
SELECT *
FROM customer
WHERE region='{?Region}'
with this parameter:
you will note that the parameter's Optional Prompt
setting is false
(and not editable):
Instead, you will need to a default, something like 'ALL' (or -1, in the case of a numeric value):
Modify the command accordingly:
SELECT *
FROM customer
WHERE ( '{?Region}'='ALL' OR region='{?Region}' )
Upvotes: 1