Book Image

Microsoft Dynamics CRM 2011 Reporting

By : Damian Hernan Sinay
Book Image

Microsoft Dynamics CRM 2011 Reporting

By: Damian Hernan Sinay

Overview of this book

All of the data entered into a CRM means nothing if it is unable to report the important information to our managers and executives in such a way that they can easily and quickly get the results they need. A better reporting system would enable them to make the necessary improvements to the processes that any business needs in a dynamic business world.For users and developers wishing to take advantage of using the report capabilities of Dynamics CRM, this is the book for you. Microsoft Dynamics CRM 2011 Reporting is a practical and excellent reference guide that provides you with a number of different options you can use to create and empower the Reporting capabilities of Dynamics CRM. This will give you a good grounding in using the reports in your Dynamics CRM 2011 implementations. This book looks at all the different options we can use to create reports in Dynamics CRM 2011, starting with SQL Reporting Services and custom reports, created in either CRM Report Wizard, SQL Report Builder, or Visual Studio. It will also show other options we can use such as dashboards, charts, and different ways to optimize and automate reports.We will also learn how to build our own reports either using the different wizards for basic reports or using Visual Studio for more complex reports. We will explore the options mobile CRM users have who want to run and see reports on these mobile devices.
Table of Contents (18 chapters)
Microsoft Dynamics CRM 2011 Reporting
Credits
About the Author
About the Reviewers
www.PacktPub.com
Preface
Index

SQL advanced


We are now going to see some advanced functions of the SQL language, which we might need to use on complex queries or reports. Creating or dropping temporary or static tables, using and executing stored procedures, managing cursors, and working with transactions are some of the advanced SQL queries we will look at in the following sections.

CREATE TABLE

There might be cases when you might want to create temporary tables; they are especially useful when using cursors.

The command to create a table is as follows:

CREATE TABLE tablename (
Fieldname type,
Fieldname type)

For example, the following code will create a customer's table with two fields:

CREATE TABLE customers(
  name varchar(100),
  age int
)

To create temporary tables, we usually add a # character to the name of the table; for example:

CREATE TABLE #customers(
  name varchar(100),
  age int
)

DROP TABLE

After you are done with the temporary table you created, it is a good practice to remove the table from the system. The command...