A simple report

Crystal Reports has become a very versatile application for generating reports, particularly if you use Visual Studio. This video will guide you through generating a report using this tool. It is possible configure complete report using wizards. But I recommend you to avoid it.

Steps to create a simple report:

  • Click File > New project
  • Select Windows under visual C#
  • Select Windows application template
  • Right click on project in solution explorer. Select Add > New Item
  • Select Crystal reports in Add New Items dialog box. Name it and Click Add. Now visual studio automatically adds all required references and pops up a dialog Crystal reports gallery.
  • Retain default selection and click OK. Let us avoid using report creation wizard. So click Cancel button in Standard report creation wizard.
  • Now you are back into Visual studio designer with a blank report.
  • Now open Field Explorer. Right click on Database Fields and select Database Expert.
  • Please note Database Expert is same as Standard report creation wizard. I am using Microsoft Access database "Employee" for this sample. To create a new connection Expand Create New Connection > Access/Excel (DAO).
  • Click ... button in the dialog box. Now navigate to the Access file location and select it. Click Open.
  • Click OK in Access/Excel (DAO) dialog box.
  • Now observe the new connection created under Access/Excel (DAO) with tables listed under it.
  • Now click on any table node and press > to select a single table.
    • Hold Ctrl button, click on any table node and press > to select multiple table.
    • Press >> to select all tables.
  • Click OK. Now you are again back into Visual studio designer.
  • Expand Database Fields and also node listed under it.
  • Click on any field and drag it to details section of report.
  • Now open a windows form. Now open Toolbar > expand Crystal reports tab > select CrystalReportViewer > drag and drop it into windows form.
  • Open Properties of CrystalReportViewer object. Set ReportSource property to the crystal report we designed above.
  • Now build and run the application.
Download video: Part 1 and Part 2