Technical Questions
 Crystal Reports Forum : Crystal Reports 9 through 2022 : Technical Questions
Message Icon Topic: Suppress Duplicate Entries but not all Post Reply Post New Topic
Author Message
dallasf
Newbie
Newbie
Avatar

Joined: 11 Apr 2013
Online Status: Offline
Posts: 26
Quote dallasf Replybullet Topic: Suppress Duplicate Entries but not all
     Posted: 04 Mar 2014 at 3:34pm
Hi,

I have built a report that works correctly in an early version of our software, however due to a bug it has stopped it working correctly.

The problem is, duplicate rows are appearing in our software, but crystal developer edition does not show these duplicates. This is because of an internal filter parameter issue.

Without going into the details of the bug. I need to rectify this within the report.

So, I found some interesting hints on this forum, where by if I suppress the details of the row under section expert with the below formula, it works great.

{RoleQualifications.Qualification_ID}=previous({RoleQualifications.Qualification_ID})

However, within the details row there are two other columns that should appear with RoleQualifications.Qualification_ID, which are RoleQualifications.category and RoleQualifications.importance.

Here is the problem. The qualification name can be the same, but you may have a different category and/or importance level for that qualification name.

For example.

Qual    Category    Importance
Excel   Formulas    High
Excel   Formulas    High
Excel   Formulas    Low
Excel   Formulas    Low
Excel   Data        Low
Excel   Data        Low
Excel   Data        Medium
Excel   Data        Medium

The current formula will remove all the entries except for the first. I need it to only remove the duplicate.

Qual    Category    Importance
Excel   Formulas    High
Excel   Formulas    Low
Excel   Data        Low
Excel   Data        Medium


I assume this could be possible through an IF statement? I'm not quite sure.

Any ideas?

Thanks for your help.




Edited by dallasf - 04 Mar 2014 at 3:49pm
IP IP Logged
DBlank
Moderator
Moderator


Joined: 19 Dec 2008
Online Status: Offline
Posts: 9053
Quote DBlank Replybullet Posted: 05 Mar 2014 at 2:07am
concatenate the fields together and use that result in your previous() suppression formula
{formulaField}=previous({formulaField})
 
IP IP Logged
dallasf
Newbie
Newbie
Avatar

Joined: 11 Apr 2013
Online Status: Offline
Posts: 26
Quote dallasf Replybullet Posted: 05 Mar 2014 at 11:18am
Thanks for the response.

I tried that and it didn't give me the results I was looking for. I can see in theory how you should work, but for some reason it didn't split them as three but split them as two.
IP IP Logged
DBlank
Moderator
Moderator


Joined: 19 Dec 2008
Online Status: Offline
Posts: 9053
Quote DBlank Replybullet Posted: 05 Mar 2014 at 11:23am
did you include the RoleQualifications.Qualification_ID in the concatenated formula field?
IP IP Logged
dallasf
Newbie
Newbie
Avatar

Joined: 11 Apr 2013
Online Status: Offline
Posts: 26
Quote dallasf Replybullet Posted: 05 Mar 2014 at 5:15pm
Yes I believe so.

I did a concatenate of the three fields required. Then I added that concatenate to the report. Then under section expert I did {concatenateField}=previous({concatenateField})
IP IP Logged
DBlank
Moderator
Moderator


Joined: 19 Dec 2008
Online Status: Offline
Posts: 9053
Quote DBlank Replybullet Posted: 06 Mar 2014 at 3:43am
your concatenateField should look something like
 
totext(RoleQualifications.Qualification_ID,0,"") + RoleQualifications.Qual + RoleQualifications.Category + RoleQualifications.Importance
 
is that correct?
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