SQL Server Reporting Services – Globals!ReportServerURL returning http://localhost

Background

We will like a bit more flexibility in our Reporting Services Dashboard.

As such to avoid hardcoding links to child reports, we are trying to programmatically inquire for the current Report Server URL.

 

Global Variable

As always in the Microsoft world, there is a way to do so:

We simply access one of the Global Variables.  The name of the Global variable, in this case, is Globals!ReportServerUrl

 

Use Case Scenario

So in our Text box / Action, we specify :

  1. Enables an action :- Go To URL
  2. URL :- ( And here is the code we have for our URL ):

 

Here is the code :

="javascript:void(window.open('" + Globals!ReportServerUrl + Microsoft.VisualBasic.Strings.ltrim(Fields!url.Value) + "','_blank'))"

 

Error Message

No earth shattering error message, but no go!

The child reports  do not come up as the system prefixes them with http://localhost and not the actual SQL Instance URL.

 

Resolution

Access the instance instance specific rsreportserver.config file.

The relative folder path and file name is ReportingServices\Reportserver\rsreportserver.config

Original

Here is the original entry

<UI>
<ReportServerUrl>
</ReportServerUrl>
</UI>

Corrected:

And, here is the revised:

<UI>
<ReportServerUrl>
http://rsreportserver:8080/ReportServer/
</ReportServerUrl>
</UI>

Explanation:

So our problem is that somehow our ReportServerURL was empty, and the system was defaulting to localhost.

 

Other Interesting parameters

You also should keep an eye on a couple of other set of URLs.

Those are:

  1. URLReservations\Application\ReportServerWebService\URL
  2. URLReservations\Application\ReportServerManager\URL

 

URLReservations

Leave a Reply

Please log in using one of these methods to post your comment:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s