?
Solved

crystal report - how to display data from two tables

Posted on 2010-01-09
2
Medium Priority
?
376 Views
Last Modified: 2012-05-08
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
0
Comment
Question by:Carlo45
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
2 Comments
 
LVL 77

Accepted Solution

by:
peter57r earned 2000 total points
ID: 26272522
Make sure you have added both tables to the report and that they are linked on car_id.
Then you use the car_name field in your report, not the car_id.
0
 

Author Comment

by:Carlo45
ID: 26272578
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 :)
0

Featured Post

Optimize your web performance

What's in the eBook?
- Full list of reasons for poor performance
- Ultimate measures to speed things up
- Primary web monitoring types
- KPIs you should be monitoring in order to increase your ROI

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Does the idea of dealing with bits scare or confuse you? Does it seem like a waste of time in an age where we all have terabytes of storage? If so, you're missing out on one of the core tools in every professional programmer's toolbox. Learn how to …
When table data gets too large to manage or queries take too long to execute the solution is often to buy bigger hardware or assign more CPUs and memory resources to the machine to solve the problem. However, the best, cheapest and most effective so…
In this video, Percona Solution Engineer Dimitri Vanoverbeke discusses why you want to use at least three nodes in a database cluster. To discuss how Percona Consulting can help with your design and architecture needs for your database and infras…
In this video, Percona Solutions Engineer Barrett Chambers discusses some of the basic syntax differences between MySQL and MongoDB. To learn more check out our webinar on MongoDB administration for MySQL DBA: https://www.percona.com/resources/we…

770 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question