on 07-13-2017 5:49 PM - last edited on 02-03-2024 11:40 PM by postmig_api_4
Hi
I am working on a crystal report and have a requirement to remove the duplicate(partial/like) match entries from a multiple list parameter.
So I have a multi value parameter which might contain below value
Accounts
ABC-12345-000
XYZ-56982-111
ABC-98090-222
UXY-12334-333
What I required to send a message to a user if there are partial duplicate before first '-' like in this case, there are two ABC entries users choose, and I need to display a message to a user to pick just one entry, lfrom similar account like below:
ABC-12345-000 OR ABC-98090-222
XYZ-56982-111
UXY-12334-333
Thanks, Saif
Create a formula
@Start
Left(yourfield, 3)
Group on this formula and suppress details and group header line and add the fields you want to display to Group footer
Add this formula to Group Header
@Reset
Whileprintingrecords;
Global stringvar accounts:=' '
Global numbervar n :=1;
Add this formula to details
@Eval
whileprintingrecords;
Global stringvar accounts;
Global numbervar n;
If n = 1 then Accounts:= Yourfield
If count(yourfield, @Start) >1 then Accounts:= Accounts &' OR ' & Yourfield;
Accounts;
In Group footer place this formula
@Display
Whileprintingrecords;
Global stringvar accounts;
Ian
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
88 | |
10 | |
10 | |
9 | |
6 | |
6 | |
6 | |
5 | |
4 | |
3 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.