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.
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.
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.
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
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
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.
Hth,
Spykair