IIF ISNOTHING表达

时间:2016-06-24 15:13:17

标签: sql reporting-services business-intelligence ssrs-2012

我通过JavaScript函数在报告服务的单独窗口中启动子报告,如下所示,

=iif(Fields!PERIOD.Value <= Cint(right(Parameters!YEARPERIOD.Value, 2)), 
"javascript:void(window.open('" 
     & Globals!ReportServerURL
     & "?" 
     & Left(Globals!ReportFolder, InStr(Globals!ReportFolder, "/Standard Reports")) 
     & "Sub Reports/Trend Breakdown" 
     & "&ServerName=" 
     & REPLACE(Parameters!ServerName.value,"\","\\") 
     & "&CATALOG=" 
     & Parameters!CATALOG.Value 
     & "&NOMINAL=" 
     & Fields!NOMINAL.Value 
     & "&COMPANYCODE=" 
     & JOIN(Parameters!COMPANYCODE.Value, ",") 
     & "&YEARCODE=" 
     & LEFT(Parameters!YEARPERIOD.Value, 7) 
     & "&LOCATION=" 
     & Fields!LOCATION.Value 
     & "&KEYLISTGROUPING=" 
     & Fields!KEYLISTGROUPING.Value 
     & "&ANALYSISCODE=" 
     & Fields!ANALYSISCODE.Value 
     & "&BUDGET=" 
     & Fields!BUDGET.Value 
     & "&PERIOD=" 
     & Fields!PERIOD.Value 
     & "&ParentReport=3
     &ADD_PERIODS=" 
     & JOIN(Parameters!ADD_PERIODS.Value, ",") 
     & "','_blank','width=950,height=460,top=300'))", "")

现在我试图将& Globals!ReportServerURL更改为以下内容 & IIF(IsNothing(Parameters!GetExternal.Value), "Globals!ReportServerUrl", Parameters!GetExternal.Value)

如果GetExternal参数中有值,则基本上替换子报表链接中的ReportServerURL。

但它没有正确更新子报告中的报告服务器网址,而是将参数中的值附加到子报告链接的以下部分,请参阅红色框,

Problem

我有问题是如何让它将参数值附加到链接的以下部分?请参见红色突出显示的部分

enter image description here

0 个答案:

没有答案