I'm launching a sub-report to a separate window in reporting services by a JavaScript function as seen below,
=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'))", "")
Now i'm trying to change the & Globals!ReportServerURL
to the following
& IIF(IsNothing(Parameters!GetExternal.Value), "Globals!ReportServerUrl", Parameters!GetExternal.Value)
Essentially replace the ReportServerURL in the sub-report link if there is a value in the GetExternal parameter.
But it isn't updating the report server url in the sub-report correctly, but instead appending the value from the parameter to the following part of the sub-report link, see the red box,
Question i have is how can i make it append the parameter value to the following part of the link? See the red highlighted section,