Search code examples
vb.netcrystal-reportsreport

How Can I generate a crystal reports using 3 tables?


I have 3 tables:

Store (Store_Id, Store_Name, Store_Location)

Bike(Store_Id, Bike_Id,Bike_Model, Bike_Price)

Parts(Store_Id, Bike_Id, Part_Id, Part_Description, Part_Price)

The Store is related to the Bike using Store_Id, the Bike parts is related to the Bike using bike_id. Each bike is assembled with different parts.

I want to create report that displays all the stores, bikes, and the all the bike parts used on a bike that has "Pink streamers in the description.

I honestly don't know where to start.

Please take in consideration that this database can contains thousands of bikes.


Solution

  • As others have said, this is a very basic question and reading some of the basics can give you the help you need.

    To answer the question: in the Database Expert you will see your 3 tables. Link them together by dragging and dropping the related fields on each other. ie. link Store.Store_ID --> Bike.Store_ID --> and Bike.Bike_ID --> Parts.Bike_ID.

    In the record selection formula set the description value: {parts.part_description} = "Pink Streamers".

    This will give you all stores and the bikes in those stores that have "Pink Streamers"