Want to protect your cyber security and still get fast solutions? Ask a secure question today.Go Premium

x
?
Solved

crystal report - how to display data from two tables

Posted on 2010-01-09
2
Medium Priority
?
384 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
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

Free Tool: Subnet Calculator

The subnet calculator helps you design networks by taking an IP address and network mask and returning information such as network, broadcast address, and host range.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

By, Vadim Tkachenko. In this article we’ll look at ClickHouse on its one year anniversary.
In this blog post, we’ll look at how using thread_statistics can cause high memory usage.
In this video, Percona Solution Engineer Rick Golba discuss how (and why) you implement high availability in a database environment. To discuss how Percona Consulting can help with your design and architecture needs for your database and infrastr…
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…
Suggested Courses

564 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