Technical Questions
 Crystal Reports Forum : Crystal Reports 9 through 2022 : Technical Questions
Message Icon Topic: Trying to show if field is duplicated Post Reply Post New Topic
Author Message
shabbaranks
Groupie
Groupie


Joined: 06 Oct 2013
Location: United Kingdom
Online Status: Offline
Posts: 66
Quote shabbaranks Replybullet Topic: Trying to show if field is duplicated
     Posted: 30 Sep 2015 at 1:21am
Hi,

I currently have a report which groups on PO numbers. Within the group you can potentially have multiple dates. What I would like to do is create a separate field which looks at the date field of the grouped PO and if the PO contains dates which aren't the same then add a flag field to show this.

Can anyone help me please?

Thanks as always
IP IP Logged
shabbaranks
Groupie
Groupie


Joined: 06 Oct 2013
Location: United Kingdom
Online Status: Offline
Posts: 66
Quote shabbaranks Replybullet Posted: 30 Sep 2015 at 3:38am
Managed to crack this one with adding a formula into the section expert. One thing I am struggling with now is - how do I supress single value results? So a PO with a date value doesn't show only ones with 2 entries or more?

Thanks
IP IP Logged
kevlray
Admin Group
Admin Group
Avatar

Joined: 29 Oct 2009
Online Status: Offline
Posts: 1587
Quote kevlray Replybullet Posted: 30 Sep 2015 at 4:01am
You probably would have to group on the date and move the fields to the GF and  suppress when a counter is equal to 1 (suppress details all together).
IP IP Logged
shabbaranks
Groupie
Groupie


Joined: 06 Oct 2013
Location: United Kingdom
Online Status: Offline
Posts: 66
Quote shabbaranks Replybullet Posted: 30 Sep 2015 at 4:26am
Do you mean using the insert summary to count or is there another way? Thanks for the quick response :)
IP IP Logged
kevlray
Admin Group
Admin Group
Avatar

Joined: 29 Oct 2009
Online Status: Offline
Posts: 1587
Quote kevlray Replybullet Posted: 30 Sep 2015 at 10:09am
Using a running total and suppress the GF based on that running total (i.e., {#some running total} = 1  ).  As far as the criteria for the running total, I am not totally sure based on what information you have provided so far.
IP IP Logged
shabbaranks
Groupie
Groupie


Joined: 06 Oct 2013
Location: United Kingdom
Online Status: Offline
Posts: 66
Quote shabbaranks Replybullet Posted: 01 Oct 2015 at 4:15am
On a slight side note - when building reports. Is it good practice to have multiple relationships? Im new to Crystal reports and Ive always just based it on a single like for like relationship.

Thanks
IP IP Logged
kevlray
Admin Group
Admin Group
Avatar

Joined: 29 Oct 2009
Online Status: Offline
Posts: 1587
Quote kevlray Replybullet Posted: 01 Oct 2015 at 6:19am
Relationships are based on the table structures.  In most cases there is only one relationship.  If you are getting duplicated data, you may need to have second (third, fourth, etc.) relationship (if possible).  If you are using a command or stored procedure, there are other 'tricks' to minimize the amount of data that will be returned to a report.
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