SSRS 数据集 - 在预期条件的上下文中指定的非布尔类型的表达式,靠近“,”

SSRS Dataset - An expression of non-boolean type specified in a context where a condition is expected, near ','

我正在尝试制作报告,但我在 @myTab 参数中遇到问题,我需要多个 selection 才能 select 多个或所有元素,并且能够知道它属于哪个国家,当我 select 多个元素时出现问题,这是我忽略的查询

select [CompanyName],[ContactName],[Country] from [Customers] 
    
       where [Customers].ContactName in (@myTab) and [Customers].Country=@pais or 
    
       [Customers].Country=@pais and @myTab is null

这是因为@myTab is null 条件(我们不能直接用“is null”检查multi-valued参数),尝试删除它并再次验证。 还有一件事是,请确定“和”和“或”条件 - 使用适当的括号以避免数据问题