For generating Crystal Reports from C# , we need to connect a database and some tables with data. In the following section you can see how to create a sample Database and Tables and the data for running of the following Crystal Reports - C# Tutorial . All examples in the CSharp Crystal Reports Tutorial is based on the following database .
First we have to create a database named it as "crystaldb"
Create DataBase "crystaldb"
In the crystaldb database , create three tables
OrderMaster , OrderDetails , Product .
The Table Structure follows :
OrderMaster
OrderMaster_id
OrderMaster_date
OrderMaster_customer
OrderMaster_createduser
OrderDetails
OrderDetails_id
OrderDetails_masterid
OrderDetails_productid
OrderDetails_qty
Product
Product_id
Product_name
Product_price
The following picture shows the relation of tables in crystaldb database :
From the following pictures you can see some data in the table for C# - Crystal Reports tutorial