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

Too many records after joining tables

Status
Not open for further replies.

knzy

Programmer
Jan 25, 2002
63
0
0
CA
Hi! All,

I need to link 3 tables, let's say T1, T2 & T3.

T1 is the primary table, and it is one-to-more relationship between T1&T2 and T1&T3. If for each record of T1,I have 2 records in T2, 2 inT3, I will get totally 4 records in CR. This will cause performance problem becuase all 2 tables are huge in the product envrionment.

I know I can write a SQL query and use this query as the database. But besides that, can I do anything else to solve this problem within CR?

Thanks a lot
Knzy
 
There are two solutions to this problem. The first you've already identified as to create view which is a UNION join between T2 and T3 and then link that to T1

the second solution is to create a report using T1 and T2 and then do T3 in a subreport in a goup footer. Editor and Publisher of Crystal Clear
 
Hi! There,

I would like to use solution 2 - do T3 in a subreport in a group footer.

The problem is that I need to suppress the whole group if the subreport gets nothing qualified. Then I have to run the subreport twice: one in the group header to decide if the group need to be suppressed; one in the group footer to show content from subreport.

Please note that the content from subreport can be more than one record and we don't know how many there will be.

Any ideas on this?

Thanks!
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top