Technical Questions
 Crystal Reports Forum : Crystal Reports 9 through 2022 : Technical Questions
Message Icon Topic: Compare two Select Ex results for missing results? Post Reply Post New Topic
Author Message
epperj
Newbie
Newbie


Joined: 10 Jan 2011
Online Status: Offline
Posts: 3
Quote epperj Replybullet Topic: Compare two Select Ex results for missing results?
     Posted: 10 Jan 2011 at 2:02pm
Is it possible to compare two different Select Expert results to find how many fields match and don't match?

For example: I run a Select Expert query that returns 500 records with the field "Name" (List A). I then change the Select Expert values to generate a new list 450 records (List B).

(I'm assuming the number of tables and fields within the search are irrelevant, as long as I use the proper search parameters to get the desired results between the tables)

Is it possible to run a 3rd Select Expert query that compares List A with 500 records to list B with 450 records and creates a new list of the 50 Names who are on List A but not B (and again for any who appear on B but not A)?

 I am unable to save data to the database, so I can only use Crystal Reports to create and store the data from the lists to be reused again within Crystal Reports. Therefore would I need to use more than one report to create the lists and then join them in a 3rd report?

Thanks for your helps!

IP IP Logged
lockwelle
Moderator
Moderator


Joined: 21 Dec 2007
Online Status: Offline
Posts: 4374
Quote lockwelle Replybullet Posted: 11 Jan 2011 at 4:50am

I don't think that you can, as I don't know of a way to access the fieldname's and retrieve them.

If you could, what I would do is create 2 subreports, 1 with each selection. Place all of the fieldnames into a delimited string in each of the subreports, have the subreports pass the values back to the main report via shared variables, finally, take 1 of the string and compare against the other, creating a new delimited string, finally display the final string
 
Again, I don't know how to cycle through the fields and get their names
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