0

I am currently converting an inventory report from a web application into an SSRS report. I am trying to get the same functionality, but I am having trouble setting the default value of a boolean parameter based on the value of a previously selected parameter. The boolean parameter allows the user to search inventory for on hand product, true, or all product, false, if they are searching for back ordered products I want it to default, otherwise true. I am using an expression to determine with value to default to.

=iif(Parameters!Type.Value="Back Order",false,true)

When I run the report it has both true and false grayed out and neither is selected. I am trying to avoid using a multi-select drop down, but I fear I may need to to get the functionality I want.

Thanks

Jim
  • 58
  • 1
  • 5

2 Answers2

0

Did You try put false and true under " (backquote).
Are you sure that value of Type parameter is "Black Order" , maybe this is display member (label) and value is different.
Try setting some stupid condition in IIF to see do you get results as needed =iif(1=1,true,false)

adopilot
  • 4,340
  • 12
  • 65
  • 92
  • I have tried iif(1=1,true,false), it appears that it's not possible with an iif(). I was just hoping there was some other way that I was unaware of. I am checking for the correct value, and I tried true and false in quotes as well. – Jim Aug 30 '12 at 17:21
0

Try this as another way:

=Switch(Parameters!Type.Value = "Back Order", True, Parameters!Type.Value <> "Back Order", False)




  • I notice in your IIf() statement that you are attempting to assign the boolean False to the True output argument of the function, and vice versa, so you could also try...

    • =IIf(Parameters!Type.Value <> "Back Order", True, False)

    • Putting True and False in quotes will make the VB processing think they are of data-type String, so don't try that.

BenMorel
  • 34,448
  • 50
  • 182
  • 322
Adrian Torrie
  • 2,795
  • 3
  • 40
  • 61