Link to home
Start Free TrialLog in
Avatar of hscdsb
hscdsb

asked on

Crystal Reports 10, same table referenced multiple times in one report

I am new to DB reporting and am using Crystal 10.  My current report is two pages and reqiures the info of
the main person in the report and then the information of other related people, ie parents and siblings.  The problem is
that all this information is in the same table the "person" table.  I have linking gone from the persons table to another table which then links back to person table to find the related person via the person_id (key to person table and secondary key in many other tables).

Forexample.  I lookup john and drag his name from the field explorer to the report canvas.  But I also need to the name of his sibling which also resides in the person table.  I have all the tables linked but I need to know how to get all this information in one row.  I hope this makes sense any help would be appreciated.
Avatar of Spykair
Spykair
Flag of South Africa image

You can use a subreport to have your 2nd table as a datasource. Link the subreport on the main person. You can then have all the data on one line in the subreport.

Hth,
Spykair
Avatar of hscdsb
hscdsb

ASKER

I have been reading about subreports, I am not sure I understand what you mean at the momement.  Basically I need to get all my result information into one row instead of several rows that I have now.  

For example, I join in the telecom table because I need phone numbers, but there are multiple records in there for a single person so now my result set has multiple rows in it for each person, which is not what I want, I want a field for each resulting phone number in one row so I can each to the same page on the report.  Also I need to add the information about related people but that information is in the same table as the person who the report is focused on . How do I put the same fields from the same table, but on different rows in the same report.

ASKER CERTIFIED SOLUTION
Avatar of djehmli
djehmli

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 hscdsb

ASKER

I have been experimenting with adding tables with aliases and messing with linking.  My situation is a bit more complex that your example but you got me started in the right direction and I was able to solve the issue using your explanation and a combination of views which I created on the DB server.  Thanks so much for your answer you got me past a major block.