Tezcatlipoca
Registered User.
- Local time
- Today, 19:00
- Joined
- Mar 13, 2003
- Messages
- 246
Hi all,
I'm a relative newbie to Crystal, but seem to be making headway into building my own reports. I have run across a snag though, and would appreciate any advice on how to overcome it.
I have written a report that lists a group of people from a table in my SQL database, in the following format:
IDNumber Company LinkedName
Now everything works perfectly, except the LinkedName. Let me explain further:
I have two pertinent tables in my SQL database. Contacts holds all the names and companies, listed by ID number. My report lists these out as I intended, and works perfectly.
There is a second table called Links. Links contains two columns, LinkFrom and LinkTo, both of which list ID numbers which relate to the column in the Contacts table.
So, for example, let's say I have Tezcatlipoca Ltd in Contacts and the ID is 12. The Links table has record ID 12 (in the LinkFrom column) linked to ID 374 (in the LinkTo column). Back in the Contacts table, ID 374 is my sister company, SmokingMirror Co.
Now what I want is for my report to show all the companies, listed by ID, and the name of the company they are linked to via the Links table.
By simply adding the field {Links.LinkTo} in my report I can get the companies to list, and I can get the correct ID number for the linked company, thus:
IDNumber Company LinkedName
12 Tezcatlipoca 374
What I want, is that LinkedName field to show the relevant name, not the linked record number.
Can anybody help?
I'm a relative newbie to Crystal, but seem to be making headway into building my own reports. I have run across a snag though, and would appreciate any advice on how to overcome it.
I have written a report that lists a group of people from a table in my SQL database, in the following format:
IDNumber Company LinkedName
Now everything works perfectly, except the LinkedName. Let me explain further:
I have two pertinent tables in my SQL database. Contacts holds all the names and companies, listed by ID number. My report lists these out as I intended, and works perfectly.
There is a second table called Links. Links contains two columns, LinkFrom and LinkTo, both of which list ID numbers which relate to the column in the Contacts table.
So, for example, let's say I have Tezcatlipoca Ltd in Contacts and the ID is 12. The Links table has record ID 12 (in the LinkFrom column) linked to ID 374 (in the LinkTo column). Back in the Contacts table, ID 374 is my sister company, SmokingMirror Co.
Now what I want is for my report to show all the companies, listed by ID, and the name of the company they are linked to via the Links table.
By simply adding the field {Links.LinkTo} in my report I can get the companies to list, and I can get the correct ID number for the linked company, thus:
IDNumber Company LinkedName
12 Tezcatlipoca 374
What I want, is that LinkedName field to show the relevant name, not the linked record number.
Can anybody help?