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

Basic expressions


With expressions, we are talking about the Microsoft SQL Server Reporting Server expressions that we can use from either the Visual Studio Report editor or with the SQL Report Builder tool.

The basic expressions are grouped in the following categories:

  • Constants

  • Built-in fields

  • Parameters

  • Fields

  • Datasets

  • Variables

  • Operators

    • Arithmetic ( ^, *, /, \, Mod, +, -)

    • Comparison ( <, <=, >, >=, =, <>, Like, Is)

    • Concatenation ( &, +)

    • Logical bitwise ( And, Not, Or, AndAlso, OrElse)

    • Bit Shift (<<, >>)

  • Common Functions

    • Text

    • Date and Time

    • Math

    • Inspection

    • Program Flow

    • Aggregate

    • Financial

    • Conversion

    • Miscellaneous

The basic expressions are available in the Expression editor dialog box, as shown in the following screenshot:

Constants

The Constants option will show you all the constants you have defined for your report. Constants are useful if you want to avoid using values in your expressions that would not make sense in a big piece of code. For example, asking if a variable such as status equals zero is not the same as saying the variable status equals active. In that case, creating a constant for the active value would be defined as follows:

Public Const Active As Int32 = 0

You can define constants in the Code section. You can access the Code section by going to the Report | Report Properties menu in Visual Studio.

A custom code for this report is as follows:

Public Const MyConstantStr = "Damian"
Public Const MyConstantInt As Int32 = 1

Notice that these constants might not be displayed in the Constants category, but you can still use them in the Expression editor as follows:

For example, the expression set for ToolTip is as follows:

= Code.MyConstantStr

Variables

You can define global variables in the Variables section, which you can access by going to the Report | Report Properties menu in Visual Studio. Variables can be read only; in that case, they will be similar to constants and they can also contain expressions.

You can then use the variables as follows:

= Variables!myVar.Value