Exercise: Subreport of actors by film

This exercise is provided to allow potential course delegates to choose the correct Wise Owl Microsoft training course, and may not be reproduced in whole or in part in any format without the prior written consent of Wise Owl.

The answer to the exercise will be included and explained if you attend the Wise Owl course listed below!

Category ==> SSRS Reporting Services  (53 exercises)
Topic ==> Subreports  (1 exercise)
Level ==> Average difficulty
Course ==> Reporting Services
Before you can do this exercise, you'll need to download and unzip this file (if you have any problems doing this, click here for help).

You need a minimum screen resolution of about 700 pixels width to see our exercises. This is because they contain diagrams and tables which would not be viewable easily on a mobile phone or small laptop. Please use a larger tablet, notebook or desktop computer, or change your screen resolution settings.

This exercise involves creating a report and subreport.  First, create the report which will become the subreport, and within this create a dataset listing out all the actors for a particular film (you'll need the tblActor and tblCast tables to do this).  Note that this you should apply a filter such that the CastFilmId column should equal @FilmId (a parameter which you'll set in the main report).

Now create the layout of this subreport:

SQL Server Reporting Services 2008 R2 exercise - Subreports (image 1)

The subreport lists out the name and date of birth of actors

Save this report as Film cast sub, then create another report which will be the main report.  Within this, create a dataset to list out all those films which have at least one actor (for this dataset, you will need to include the tblFilm and tblCast tables).

SQL Server Reporting Services 2008 R2 exercise - Subreports (image 2)

Create a grouping query, with the number of cast rows to be at least 1

Now create a rectangle, and within this create a table (and within this a subreport).  This is what your report/subreport combination should look like in layout view and preview:

SQL Server Reporting Services 2008 R2 exercise - Subreports (image 3)

The films are listed in alphabetical order

Save this report as Film Cast Main, and close it down.

This page has 0 threads Add post