Report Design
 Crystal Reports Forum : Crystal Reports 9 through 2022 : Report Design
Message Icon Topic: comparison reports Post Reply Post New Topic
Author Message
soulsniper
Newbie
Newbie


Joined: 24 May 2011
Online Status: Offline
Posts: 19
Quote soulsniper Replybullet Topic: comparison reports
     Posted: 24 May 2011 at 5:14am
Hi there,
 
I have to create a report that has two tables. These two tables are basically the same but there may be fields that one or the other doesn't have.
 
How do i create a report that only lists the fields that aren't matching(existing in both).
 
I tried linking the two tables, but it only gives me the fields that match.. I think.
 
-With two subreports-
I was thinking of creating two global variables, one for each table and creating a custom funtion to check which ones don't match...but this seems complicated
 
I could really use some help! Thank you.
IP IP Logged
sharona
Senior Member
Senior Member
Avatar

Joined: 16 Oct 2008
Location: United States
Online Status: Offline
Posts: 255
Quote sharona Replybullet Posted: 24 May 2011 at 8:22am

you should join with a left outer join to get the values from the tables.

do you have alot of values that dont match or just something specific
sharona
IP IP Logged
soulsniper
Newbie
Newbie


Joined: 24 May 2011
Online Status: Offline
Posts: 19
Quote soulsniper Replybullet Posted: 24 May 2011 at 9:24am
yeah my boss just told me that when i posted this.
it works now! thanks alot. you guys are legit! haha
IP IP Logged
sharona
Senior Member
Senior Member
Avatar

Joined: 16 Oct 2008
Location: United States
Online Status: Offline
Posts: 255
Quote sharona Replybullet Posted: 25 May 2011 at 3:11am
we all learned from others....
sharona
IP IP Logged
sharona
Senior Member
Senior Member
Avatar

Joined: 16 Oct 2008
Location: United States
Online Status: Offline
Posts: 255
Quote sharona Replybullet Posted: 25 May 2011 at 3:12am

a.      Inner—The result set includes all the records in which the linked field value in both tables is an exact match. The Inner join is the standard type of join for most reports, and it is also commonly known as the Equal join.

 

b.     Left Outer—The result set includes all the records in which the linked field value in both tables is an exact match. It also includes a row for every record in the primary (left) table for which the linked field value has no match in the secondary (lookup) table. For example, if you would like your report to display all customers and the orders they have each placed—including the customers who have not placed any orders at all—you can use a Left Outer join between the Customer and Orders tables. As a result, you would see a row for every customer who has not placed any orders.

 

c.      Not Equal—The result set includes all records in which the linked field value in the primary table is not equal to the linked field value in the secondary (lookup) table. For example, if you needed to report on all orders that were not shipped on the same date that they were ordered, you could use the Not Equal join type to join the Order Date field in Orders table with the Ship Date field in the Order Details table.

 

d.     Full Outer—The result set includes all records in both of the linked tables—all records in which the linked field value in both tables is an exact match, in addition to a row for every record in the primary (left) table for which the linked field value has no match in the secondary (lookup) table, and a row for every record in the secondary (lookup, or right) table for which the linked field value has no match in the primary table. The Full Outer join is a bi-directional outer join, which essentially combines the characteristics of both the Left Outer and Right Outer joins into a single join type.

sharona
IP IP Logged
Printable version Printable version

Forum Jump
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot delete your posts in this forum
You cannot edit your posts in this forum
You cannot create polls in this forum
You cannot vote in polls in this forum