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!

Table Join Query 1

Status
Not open for further replies.

TimboA

MIS
Jul 12, 2001
38
GB
I have a Crystal Report which is produced using Customer data from 2 tables. I need to add in a further field (email address) which comes from a 3rd table, joining it to table 1. However, the 3rd table contains multiple records for each record in table 1 (Primary email address, secondary email address and website).

I've tried adding just the primary email address field thru a subreport of table 3, but I need to open the report via a third party software product which doesn't seem to support subreports (I get "error #599: Cannot open SQL server.").

Can anyone suggest how I can report just the primary email address from table 3 alongside the existing data from tables 1 & 2 ???

Thanks.
 
Scrap the subreport and just drag in the data object you want. At this point you would have 3 records per customer ID (primary email, 2ndary email and when you want one. To get to this, conditionally suppress the entire section if table3 field is not Primary email address.

DISCLAIMER: If you are doing any subtotalling or grand totalling, supressing the detail records will not keep them from evaluating and your report will display those suppressed values in the results. If this is the case you can get around this by using either running totals or variables.

Please let me know if you have any questions or if you need help with a workaround to my disclaimer. Software Support for Sage Mas90, Macola, Crystal Reports, Goldmine and MS Office
 
Scrap the subreport and just drag in the data object you want. At this point you would have 3 records per customer ID (primary email, 2ndary email and internet address) when you want one. To get to this, conditionally suppress the entire section if table3 field is not Primary email address.

DISCLAIMER: If you are doing any subtotalling or grand totalling, supressing the detail records will not keep them from evaluating and your report will display those suppressed values in the results. If this is the case you can get around this by using either running totals or variables.

Please let me know if you have any questions or if you need help with a workaround to my disclaimer. Software Support for Sage Mas90, Macola, Crystal Reports, Goldmine and MS Office
 
dgillz,

many thanks for your suggestion, I've got it working for those records that have an entry in table 3, however I've got a few records which I need to report that don't have anything in table 3 (i.e. no email addresses or websites data present). I'm struggling on the syntax for keeping only those records that are primary emails as well as those that have nothing.

Can you help me further ?
 
Put if IsNull({fieldname)) in your record selection Software Support for Sage Mas90, Macola, Crystal Reports, Goldmine and MS Office
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top