Book Image

Reporting with Visual Studio and Crystal Reports

By : Mahmoud Elkoush
Book Image

Reporting with Visual Studio and Crystal Reports

By: Mahmoud Elkoush

Overview of this book

<p>Reports are documents that present focused, salient content to a specific audience. Crystal Reports is a business intelligence application that will help you design and generate reports from a wide range of data sources. It helps you summarize a good deal of information in a visually appealing manner.</p> <p>"Reporting with Visual Studio and Crystal Reports" is a practical, hands-on guide that will provide you with a number of clear, step-by-step exercises, and help you take advantage of the real power of Crystal Reports. This book will not only help you create effective reports, but also teach you how to create a reporting application.</p> <p>"Reporting with Visual Studio and Crystal Reports" will guide you through the installation of Crystal Reports and Visual Studio. As you progress from one chapter to the next, you will gradually build a reporting application. You will also learn how to select the right data, and enhance your report by grouping and sorting data. This book will also help you create chart reports to improve your report design. With this book, you will learn how to create a complete reporting application and a wide variety of reports.</p>
Table of Contents (14 chapters)
Reporting with Visual Studio and Crystal Reports
Credits
About the Author
About the Reviewers
www.PacktPub.com
Preface
Index

Working with formula fields


In this section we will see how to use formula fields and how they are useful and powerful for improving our reports.

  1. From Field Explorer, right-click on Formula Fields and select New. Type in the formula name fmu_FullName and click on the OK button. We will see this in the following screenshot:

    This formula field will display the employee's full name in the same format that we created before using SQL query. Here we use the concatenate operator (+) to concatenate the title with the first and last name of the employee.

  2. Create another formula field and name it fmu_ReportsTo. You will see the formula code in the following screenshot:

  3. Drag-and-drop the two formula fields to the report as we did previously.

  4. Add a parameter field to the report and name it EmpId. We will use this parameter to filter the employees by ID as we see in the following screenshot:

  5. Open MainForm from Solution Explorer. Double-click on the btnEmpById button to move to the click event code and write...