Book Image

SQL Server 2016 Reporting Services Cookbook

By : Dinesh Priyankara, Robert Cain
Book Image

SQL Server 2016 Reporting Services Cookbook

By: Dinesh Priyankara, Robert Cain

Overview of this book

Microsoft SQL Server 2016 Reporting Services comes with many new features. It offers different types of reporting such as Production, Ad-hoc, Dashboard, Mash-up, and Analytical. SQL Server 2016 also has a surfeit of new features including Mobile Reporting, and Power BI integration. This book contains recipes that explore the new and advanced features added to SQL Server 2016. The first few chapters cover recipes on configuring components and how to explore these new features. You’ll learn to build your own reporting solution with data tools and report builder, along with learning techniques to create visually appealing reports. This book also has recipes for enhanced mobile reporting solutions, accessing these solutions effectively, and delivering interactive business intelligence solutions. Towards the end of the book, you’ll get to grips with running reporting services in SharePoint integrated mode and be able to administer, monitor, and secure your reporting solution. This book covers about the new offerings of Microsoft SQL Server 2016 Reporting Services in comprehensive detail and uses examples of real-world problem-solving business scenarios.
Table of Contents (18 chapters)
SQL Server 2016 Reporting Services Cookbook
Credits
About the Authors
About the Reviewers
www.Packtpub.com
Preface

Configuring Reporting Services URLs


As you saw in the Installing Reporting Services with default configurations recipe in this chapter, once the installation is done, one way of verifying that the installation is successfully completed is by accessing one of the URLs that are configured automatically during the setup. If the installation is done with install only mode, then the URLs have to be configured using Reporting Services Configuration Manager, because only the install and configure option creates URLs for Reporting Services during the installation.

Installation with the default configuration reserves two URLs for Reporting Services, one for the Web Service application, and another for the Web Portal application. These URLs are defined as URL reservations in HTTP.SYS, which is an operating system component that listens to network requests and handles them. Even though it is possible to create and configure these URLs using different tools, it is recommended to use only Reporting Services Configuration Manager for creating and configuration. URL reservations are automatically created when you configure URLs using Reporting Services Configuration Manager.

URL reservations in HTTP.SYS define which URLs are configured for accessing Reporting Services applications. You can configure one or more URLs for accessing the Report Server Web Service and one or more URLs for accessing the report Web Portal. Although multiple URLs can be configured for web service and web portal, all URLs have to be connected to the web service virtual directory and the web portal virtual directory respectively. It is not possible to have multiple virtual directories.

Note

Note that Internet Information Services (IIS) is no longer used by Reporting Services to manage applications, and it is not required. All requests are completely handled by HTTP.SYS.

Getting ready

If you need to create or configure URLs using Reporting Services Configuration Manager, you need to understand how default URLs are created during the installation. This table explains how URLs are set by default:

Application

Instance type

Default URL

Reservation in HTTP.SYS

Web service

Default instance

http://<servername} reportserver<="" p="">

http://<servername}:80 reportserver<="" p="">

Web service

Named instance

http://<servername} reportserver_<instancename}<="" p="">

http://<servername}:80 reportserver_<instancename}<="" p="">

Web Portal

Default instance

http://<servername} reports<="" p="">

http://<servername}:80 reports<="" p="">

Web Portal

Named instance

http://<servername} reports_<instancename}<="" p="">

http://<servername}:80 reports_<instancename}<="" p="">

You can see this in the rsreportserver.config file located in the <installationpath}\Microsoft SQL Server\<instancename}\Reporting Services\ReportServer folder:

Figure 1.13

As mentioned before, you should not use any other tool to create or configure URLs, including the rsreportserver.config file.

In order to create or configure them, you need to make sure that you are a member of local administrator group of the server. In addition to that, if IIS is running in the same server, make sure that there are no virtual directories already configured with the names you have planned for Reporting Services virtual directories for applications.

How to do it...

Reporting Services Configuration Manager has two pages for managing URLs, one for web service applications, and another for web portal applications. It is shown in the following screenshot:

Figure 1.14

If you need to configure the Web Service URL, select the page and make the necessary changes:

  1. If you need to configure the Web Portal URL, you can select it to view and configure it. The preceding screenshot shows the settings related to the Web Service URL. As you see, the URL is formed by combining the machine name and virtual directory name.

  2. If you need to change the name of the virtual directory, you can simply change the text in the Virtual Directory input box. Remember that the name of the virtual directory is case sensitive, and only one virtual directory is allowed for the web service application.

  3. If you want to configure multiple URLs for the web service application, you can click on Advanced... and add more URLs.

  4. When you click on Advanced..., it opens a window that can be used to add both HTTP and HTTPS URLs. For testing purposes, let's allow users to connect with the web service using another port. Follow these steps to configure a URL with another port:

    1. Click on the Advanced... button to open the Advanced Multiple Web Site Configuration window.

    2. Click on Add in the HTTP section to add a new report server HTTP URL.

    3. Set the TCP Port as you want and click on OK to save it. Click on OK again to save the settings:

    Figure 1.15

  5. Once the settings are saved, you should see two URLs appearing: one with port 80, which is the default, and another with port 50000. When you set a port, make sure that it is not reserved by another application:

    Figure 1.16

  6. You can click on either URL to open the web service application. The configuration of Web Portal URL is the same as the Web Service URL. The Web portal URL page also has the Advanced... button for configuring additional URLs. Let's see how we can change the name of the virtual directory for web portal.

  7. For the Web Portal URL, the default virtual directory name is formed as Reports_<instancename>. As you can see in the following image, in our testing machine, it has been set as Reports_SQL2016_M and the URL has been formed as http://DINESH-LAP01:80/Reports_SQL2016_M:

    Figure 1.17

  8. Let's change the name of the virtual directory to ProductionReports, as shown next. Once changed, the Apply button must be clicked on to save the changes. Note that you need to make sure that there is no virtual directory in IIS with the same name, if IIS is installed in the same server:

    Figure 1.18

    You can click on the new URL and see whether it opens web portal or not.

How it works...

As we discussed before, Reporting Services Configuration Manager creates URL reservations in HTTP.SYS when changes are applied. If you open the rsreportserver.config file, you will see how changes are applied to the file.

As we set an additional port to the web service application, we can set additional IP addresses or hostnames for forming new URLs. One advantage with additional URLs is that you can provide different URLs for different audiences, as shown here:

  • For internal (or Intranet) users: http://server/reports

  • For external (or Internet) users: http://www.company.com/reports

Figure 1.19

Note

If you have multiple instances installed on the same machine, you need to have a proper naming convention to avoid conflicts with URL reservations.

There's more...

When accessing either web service or web portal in the local server, you can use localhost instead of an IP address or server name. You can simply call applications using http://localhost/reportserver and http://localhost/reports . The http://localhost URL is interpreted as http://127.0.0.1 . However, if you have configured URLs to the computer name or a single IP address, this will not work unless you have added an additional reservation for 127.0.0.1.