Pro SQL Server 2012 Reporting Services

(sharon) #1

CHAPTER 2  REPORT AUTHORING: DESIGNING EFFICIENT QUERIES


Assuming you are familiar with the database, begin the query design process in SSMS, either
graphically or by coding the query with the generic query designer. Both methods are available within
SSMS.

 Note We’ll cover setting up the data source connection required for building an SSRS report in Chapter 3. For
now, you’ll connect directly to the data with the available query design tools within SSMS. It is important to
mention that though you are designing the query within SSMS, similar tools are available within the BIDS
environment so that you can create your queries at the same time you create your report. We chose SSMS in this
case because it contains lists of database objects that you may need to reference as you begin to develop the
query.

We’ll show you how to design the query with the graphical tool to demonstrate how the underlying
SQL code is created. You can access the graphical query designer by right-clicking anywhere in the new
query window within SSMS and selecting Design Query in Editor (see Figure 2-2).

Figure 2-2. Accessing the query design tool in SSMS

After you open the query designer, you can perform tasks such as adding and joining additional
tables and sorting, grouping, and selecting criteria using the task panes (see Figure 2-3).
Free download pdf