Link to home
Start Free TrialLog in
Avatar of Carlo45
Carlo45Flag for Croatia

asked on

crystal report - how to display data from two tables

Hi all,

My question i about crystal reports.
In my ms 2008 sql database i have two tables like this :

table one
_______________________________________
driver_id           driver_name          car_id


table two
_______________________________________
car_id               car_name


When i populate datagrid in win form i get result :
Datagrid
DID          Driver name          Car
_______________________________________
1              Name 1                 Car Name 3
2              Name 2                 Car Name 1
3              Name 3                 Car Name 2

But on report result is  :

DID          Driver name          Car
_______________________________________
1              Name 1                 car_id 3
2              Name 2                 car_id 1
3              Name 3                 car_id 2
                                           (This column displays id's and i wont to show car names)

How can i display car names instead of car_id's. Tables are linked
(table_one.car_id (int) < - > table_two.car_id (int) ) in sql database and on crystal report.
Can someone please explain me how to do that on this dummy table.

Best regards,
Carlo
ASKER CERTIFIED SOLUTION
Avatar of peter57r
peter57r
Flag of United Kingdom of Great Britain and Northern Ireland image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of Carlo45

ASKER

Thank you so much ! So simple ! I have try this before but i forgot to use table_two.TableAdatper.Fill on my "show report form".

thank you once again :)