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 derfloh on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Multiple table report

Status
Not open for further replies.

bob12321

Programmer
Joined
Feb 25, 2004
Messages
1
Location
CA
Hi,

I have two different tables that I am attempting to create a report with. The first table contains information on a client and include different fields including client number, name, address, phone, etc. My next table, fieldinfo, contains the following fields: client number, fieldname, memo, ranking. The purpose of this table is to describe the individual fields of the first table (its a long and confusing story). Anyways, I have two separate select statement in my report. The first: "Select * from client where custNum = 101" and the next: "select * from fieldinfo where custNum = 101" The first statement will return one row, with the customer information, the next statement will return multiple rows (1 row for every field in the first table).

What i need to do (for example) is display the customers name, and then display the memo info underneath. The problem occurs in that I need to some how use the information returned by the second select statement as some sort of record set, so i can walk through each of the values, selecting the one that I need for the individual fields returned by the first select.

This is driving me nuts, and any help/suggestions would be greatly appreciated!

Thanks for your help.
Ryan
 
You shouldn'[t have 2 selects in your report, and some technical information would be useful:

Crystal version
Database
Connectivity
Example data
Expecte output

You've also given no indication of how you created these different select statements.

I would suggest that you just add the 2 tables into the report and join them.

-k
 
Crystal Reports will not handle 2 different select statements as for as i know,

To achive this u can join the tables and create a single select statement and by using the drill down report u can give the report, so that it will display the customer names in the first place and when u click on the customer name it drills down to give the details of that customer.

i am not sure whether ur requirement is like this, if so then give a try

Balaji
stanchart


 
Balaji: It is possible to have 2 Select statements in Crystal, even in CR 8.5, but I wouldn't suggest doing so in almost every case.

-k
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top