Sample Database for running Crystal Reports tutorials
In the following section you can see , how to create a sample Database and Tables and data for running Crystal Reports Tutorials . All examples in the VB.NETCrystal Reports Tutorials are based on the following database . First we have to create a database . Give the database name as "crystaldb"
Create a DataBase "crystaldb"
In the crystaldb database , create three tables
OrderMaster , OrderDetails , Product .
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 relations of each table :
SQL command for creation tables are follows :
CREATE TABLE [dbo].[OrderMaster] (
[OrderMaster_id] [int] NOT NULL ,
[OrderMaster_date] [datetime] NULL ,
[OrderMaster_customername] [varchar] (50),
[OrderMaster_createduser] [varchar] (50)
) ON [PRIMARY]
CREATE TABLE [dbo].[OrderDetails] (
[OrderDetails_id] [int] NOT NULL ,
[OrderDetails_masterid] [int] NULL ,
[OrderDetails_productid] [int] NULL ,
[OrderDetails_qty] [int] NULL
) ON [PRIMARY]
CREATE TABLE [dbo].[Product] (
[Product_id] [int] NOT NULL ,
[Product_name] [varchar] (50) ,
[Product_price] [numeric](18, 0) NULL
) ON [PRIMARY]
Enter data to the tables :
Order Master Table Data
Order Details Table Data
Product Table Data