Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Displaying data from an un-linked database table

Status
Not open for further replies.

StevenK

Programmer
Jan 5, 2001
1,294
GB
I am working with Crystal Reports 8.0 and have successfully created a report against tables in a SQL Server 7.0 database. I have a couple of tables linked through a common field and the data shows in the report accordingly. I have an additional table (for example a COMPANYDETAILS table) from which I want to display some data (the COMPANYNAME field). When I add this table to the report and do not set a link between this table and those already in the report (no field to link the data to/from) I get a warning that the fact that I am not linking the tables is not generally supported. If I then add the 'COMPANYDETAILS.COMPANYNAME' field to the report (in Page Header or Report Header sections) - the data is not showing on the report (probably due to the lack of the data links ?).
How can I show this information from this additional table as required ?
Any help would be appreciated.
Thanks in advance.
Steve
 
I'm glad you asked this question. My report needs to come from many tables that are not linked and cannot be linked. It is an inventory report with each "type" item in it's own table for each of three company divisions. I await an answer.

Pat Rains
 
try using a subreport to display the co. name.
you may need to pass a parameter to the subreport from the main report telling the subreport which co. name you want displayed.
hope this helps
mbpiper
 
If you don't have a common field between the 2 Company tables, such as Company Id, then how do you know which Company name to display? If tables are related to each other, then they should have a common field.

Selecting data from unrelated tables gets you a Cartesian Product, joining every record in Table A with every record in Table B, etc. Brian J. Alves
Terrier Consulting, Inc.
Email: brian.alves@worldnet.att.net
VB / Crystal / SQLServer
 
There is only one entry in the COMPANYDETAILS table according to the database we are connected to - so this is not an issue. I have resorted to the subreport idea but we have noticed that we have a rectangle around the subreport in the report. Can this be turned off ?
Steve
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top