O'Reilly logo

SQL Server 2016 Reporting Services Cookbook by Robert C. Cain, Dinesh Priyankara

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Creating reports with dynamic datasets

As powerful as the SQL language is, sometimes it is not enough. You need to create complex logic in order to generate the SQL used in your dataset. For example, you have two tables with similar columns. You want to let the user select which table to use as the data source at runtime. We'll do just that with this recipe.

Getting ready

This recipe builds on top of the previous one, Creating reports with cascading parameters. If you've not done so, please create the report following that recipe. If it has been created, open it to begin working.

How to do it...

  1. Add a new parameter. Use ReportSource (no spaces) as the name and Report Source (with a space) as the prompt.
  2. On the Available Values page, select the Specify ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required