In my parameter selection I have to create 2 parameters which can have 'All' values or either one of selected values.How can this be accomplished ? What code should be done in select expert
Are the parameters multiple value parameters? If so:
(
If not ("All" in {?Param1}) then
{Table.Field1} in {?Param1}
Else If "All" in {?Param1} then
True
)
and
(
If not ("All" in {?Param2}) then
{Table.Field2} in {?Param2}
Else If "All" in {?Param2} then
True
)
If they aren't multiple value params:
(
If {?Param1} <> "All" then
{Table.Field1} = {?Param1}
Else If {?Param1} = "All" then
True
)
and
(
If {?Param2} <> "All" then
{Table.Field2} = {?Param2}
Else If {?Param2} = "All" then
True
)
If your parameters are single value parameters, then you could maybe get away with something simpler, but you should check 'Show SQL Query' often to see if you're getting SQL pass-through:
({Table.Field1} = {?Param1} or {?Param1} = "All")
and
({Table.Field2} = {?Param2} or {?Param2} = "All")
and
({Table.Field3} = {?Param3} or {?Param3} = "All")
and
..........
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.