Warning: file_get_contents(/data/phpspider/zhask/data//catemap/5/reporting-services/3.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Reporting services SSRS参数IIF表达_Reporting Services - Fatal编程技术网

Reporting services SSRS参数IIF表达

Reporting services SSRS参数IIF表达,reporting-services,Reporting Services,我有两个参数1称为DataAreaId,由后台数据库(Dynamics AX)设置为一个值。我还有另一个多选参数,叫做公司。现在,我试图根据条件将参数值从DataAreaId传递到Company 如果DataAreaId=“002”参数的默认值必须是select all,否则公司参数必须等于DataAreaId参数。我尝试过这种和其他排列方式,但我没有任何乐趣。我感谢你能给我的任何支持 =iif(Parameters!dataareaid.Value = "002", join(Paramete

我有两个参数1称为
DataAreaId
,由后台数据库(Dynamics AX)设置为一个值。我还有另一个多选参数,叫做
公司
。现在,我试图根据条件将参数值从
DataAreaId
传递到
Company

如果
DataAreaId=“002”
参数的默认值必须是select all,否则公司参数必须等于
DataAreaId
参数。我尝试过这种和其他排列方式,但我没有任何乐趣。我感谢你能给我的任何支持

=iif(Parameters!dataareaid.Value = "002", join(Parameters!company.Value,","),Parameters!dataareaid.Value)
在数据集中执行此操作

if @DataAreaId = '002'
    select xxx from yyy
    --Same query here as you use to populate Company
else
    select xxx from yyy where zzz = @DataAreaId
    --Same query here as you use to populate Company
    --but add a WHERE clause that only gives
    --the row matching DataAreaId

使用此数据集作为公司参数“默认值”的来源。

公司参数的可用值是如何设置的?您确定dataareaid为dataareaid=“002”而不是dataareaid=002吗?