text: In this article I’ll show you how to make and use a report using Crystal Reports in ASP.NET using C#.
  We will first download SAP Crystal Reports from the source and install it on our system, then using some simple code we will proceed.Initial chamberFirst we need to download the SAP Crystal Reports for respective IDE’s of Visual Studio as in the following:
  Step 1
  Open Your Visual Studio 2010 and create an Empty Website, provide a suitable name (crystalrpt_demo). Step 2
  In Solution Explorer you get your empty website and then add a Web Form and SQL Server Database and Dataset as in the following:For Web Formcrystalrpt_demo (your empty website) then right-click then select Add New Item -> Web Form. Name it crystalrpt_demo.aspx. For SQL Server Databasecrystalrpt_demo (your empty website) then right-click then right-click then seelctAdd New Item -> SQL Server Database. (Add the database inside the App_Data_folder).For DataSetcrystalrpt_demo (your empty website) then right-click then right-click then seelct Add New Item -> DataSet (add the DataSet inside the App_Code_folder).Database chamberStep 3
  In Server Explorer, click on your database (Database.mdf) then select Tables -> Add New Table then make the table like this:
  Double-click on the dataset that is resides under the App_code_Folder, see the following Image.When you double-click the dataset you get the blank area, there you need to do something like the following.Right-click on the blank area then seelct Add -> Datatable.Change the name of the table from Datatable1 to Newtbl_data. There you must add 3 columns for ID, Name and City as we did in tbl_data, so add the three columns. You will get something as in the following image.You must then go to crystalrpt_demo then right-click then select Add New Item -> Find Crystal Report.rpt file. When you add this new Crystal Report Gallery opened there you need to do as in the following image.You will have something like this: When your Crystal Reports report is opened as in the preceding image, you will find in the left or right dock Field Explorer is opened.Right-click on Field Explorer then select Database Expert -> Create New Connection. You will need to find the table that we made in the Dataset, Newtbl_data. Once you have your table, add that table to the right side pane using the “ >>” button then press OK as in the following image.You will get you Newtbl_data in Field Explorer like this.Here you must add these ID, Name and City from Database Fields to the Crystal Reports report, Section 3 Page Details. You can drag these fields to the Crystal Report Page Details.Design chamberStep 4
  Now open your crystalrpt_demo.aspx file, where we create our design for Crystal Reports. We will add a Crystal Reports Viewer here.Go to the toolbox and find Reporting then Drag and Drop a Crystal Reports Viewer.crystalrpt_demo.aspx
  Code chamberStep 5
  Open your crystalrpt_demo.aspx.cs and write some code so that the application works.crystalrpt_demo.aspx.csAdd some namespaces to the crystalrpt_demo.aspx.cs page as in the following:
  View All
  View All