SSRS open URL in new window Javascript function not working with dynamic URL string -


i using javascript:void(window.open('" & url & "','_blank')) open url in new window. i've used many times , works except when url string built using dynamic parameter values.

what works :

the url trying open on ssrs action below:

ssrsserveraddress/headcount.rdl&pbusinessunit=" & fields!businessunit.value & "&pcalendar=" & **code.urlencode**("[monthly calendar].[monthly calendar].[month].&[" & fields!monthyear.value &"])

the ssrs action (go url) expression works when using above url. uses custom code.urlencode (see description below) , passes calendar parameter correctly.

what not work:

the problem need url open in new window. here's javascript action using:

javascript:void(window.open('"ssrsserveraddress/headcount.rdl&pbusinessunit=" & fields!businessunit.value & "&pcalendar=" & code.urlencode("[monthly calendar].[monthly calendar].[month].&[" & fields!monthyear.value &"]") & "','_blank'))

i following error when using javascript function above:

the item 'ssrsserveraddress/headcount.rdl,[january 2016]' cannot found

additional information:

interestingly, if don't call code.urlencode function javascript function above works properly.

so works:

javascript:void(window.open('"ssrsserveraddress/headcount.rdl&pbusinessunit=" & fields!businessunit.value & "','_blank'))

code.urlencode function custom code within report. goal of function parse special characters ( %, [, etc) , convert them unicode value instead ssrs url access works.

public function urlencode (byval inurl string) string dim outurl string outurl = system.web.httputility.urlencode(inurl).tostring return outurl end function 

i'm stuck , out of ideas of how fix issue... appreciated!!


Popular posts from this blog

php - How should I create my API for mobile applications (Needs Authentication) -

5 Reasons to Blog Anonymously (and 5 Reasons Not To)

Google AdWords and AdSense - A Dynamic Small Business Marketing Duo