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 subreport


Now we will see another powerful tool in Crystal Reports; that is subreport. Subreport is used to create a report inside another report and link the two reports with a relation or a filter.

  1. Create TableAdapter, which contains the employee orders and all the data in the table Orders. We will rename the adapter to OrdersByEmployeeIdTableAdapter as we see in the following screenshot:

  2. In the main report, in the Details section, right-click and navigate to Insert | Subreport. Drag-and-drop this subreport at the end of the main report (after the Notes field in the Employee Details section). Then we will see the following screenshot:

    As we see, we can choose the subreport from the application reports, export it from hard disk, or create a new report using Report Wizard. We will choose the last option, so click on the Report Wizard... button and complete the wizard as we have learned before. Make sure that you use the OrdersByEmployeeId table as a data source for the subreport...