0

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,

Problem

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,

enter image description here

surGe
  • 135
  • 2
  • 11
  • Shouldn't that be -->IIF(IsNothing(Parameters!GetExternal.Value), Globals!ReportServerUrl, Parameters!GetExternal.Value) without quotations around the global parameter? – Ross Bush Jun 24 '16 at 15:53
  • What does the Globals!ReportServerURL return? You can set it to an expression of a textbox to inspect it. – Ross Bush Jun 24 '16 at 15:58
  • @IRB 1. My bad, didn't mean to add those double quotation marks. – surGe Jun 24 '16 at 16:18
  • @IRB 2. Returns the report server url (SSRS Built in field), and not localhost, the actual report server url. – surGe Jun 24 '16 at 16:19

0 Answers0