Skip to content

Reporting Services

In this lab, we will work with Microsoft SQL Server Reporting Services, a tool we have not seen before. We will start working together, then some of the exercises will be individual work. You shall submit the solution to all exercises.

Pre-requisites and preparation

Required tools to complete the tasks:

Materials for preparing for this laboratory:

Initial steps

Keep in mind that you are expected to follow the submission process.

Create and check out your Git repository

  1. Create your git repository using the invitation link in Moodle. Each lab has a different URL; make sure to use the right one!

  2. Wait for the repository creation to complete, then check out the repository.

    If you are not asked for credentials to log in to GitHub in university computer laboratories when checking out the repository, the operation may fail. This is likely due to the machine using someone else's GitHub credentials. Delete these credentials first (see here), then retry the checkout.

  3. Create a new branch with the name solution and work on this branch.

  4. Open the checked-out folder and type your Neptun code into the neptun.txt file. There should be a single line with the 6 characters of your Neptun code and nothing else in this file.

Create the Adventure Works 2014 database

We will work with the Adventure Works sample database. This database contains the operational information of a fictional retail company. Instead of understanding the database contents, we will use a few predefined queries that list product purchases.

  1. Download adventure-works-2014-oltp-script.zip and extract it to folder C:\work\Adventure Works 2014 OLTP Script (create the folder if it does not exist yet).

    The folder name should be as above; otherwise, you need to change the path in the sql script:

    -- NOTE: Change this path if you copied the script source to another path
    :setvar SqlSamplesSourceDataPath "C:\work\Adventure Works 2014 OLTP Script\"
    

    If you need to edit the path, make sure to keep the trailing slash!

  2. Connect to Microsoft SQL Server using SQL Server Management Studio. Use the following connection details.

    • Server name: (localdb)\mssqllocaldb when using LocalDB, or localhost\sqlexpress when using SQL Express
    • Authentication: Windows authentication
  3. Use File / Open / File... to open instawdb.sql from the folder created above. Do not execute it yet! First, you should turn on SQLCMD mode: in the Query menu click SQLCMD Mode; then click Execute.

    SQLCMD mode

  4. Verify whether the database and its contents are created. Select Databases in the Object explorer on the left and click Refresh. The AdventureWorks2014 database shall appear with a number of tables inside.

    AdventureWorks database tables.

  5. Open a new SQL Query window on this database (right-click the database and choose New query), and execute the following script with your own Neptun code substituted:

    update Production.Product set Name='NEPTUN'+Name
    

    Check the contents of the table Production.Product and verify if it has your Neptun code in the product names: right-click the table and choose Select top 1000 rows.

    IMPORTANT

    Your Neptun code must be listed in the names. You will need to create screenshots in the following exercises, and your Neptun code must appear on these images.

Back to top