I have this below formula in my main report.
this formula is getting all the county names into a variable called federalcountyname but the thing is the county names are repeating, means they are getting duplicated.
For Ex: they are counties called A,B,C,D ETC.
WHEN I USE THIS FORMULA I AM GETTING SOMETHING LIKE THIS
A,B,C,A,A,D,(HERE THE VALUES ARE REPEATING INSTEAD OF THIS I NEED TO GET UNIQUE VALUES like A,B,C,D)
whileprintingrecords;
Shared stringvar federalcountyname;
IF NOT({REFCOUNTY.REFCOUNTY_NM} LIKE ['D*']) THEN
(
if length(federalcountyname) = 0 then federalcountyname := federalcountyname + (if {PROPOSAL.FUNDTYPE} = 'FED' then GroupName ({@County_Name}))
else if ( federalcountyname <> (if {PROPOSAL.FUNDTYPE} = 'FED' then GroupName ({@County_Name}))) then
federalcountyname := federalcountyname + "," +(if {PROPOSAL.FUNDTYPE} = 'FED' then GroupName ({@County_Name}));
)
This below formula counts the no of counties and adds county or counties at the end depending on the count.
whileprintingrecords;
Shared stringvar federalcountyname;
if length(federalcountyname) <> 0 then
(
if InStr(federalcountyname, ",") = 0 then federalcountyname + " " + "COUNTY"
else federalcountyname + " " + "COUNTIES"
)
Please help me out with the first formula about how to get rid of those duplicates.
Any help is greatly appreciated.
Thanks,
rreddy
this formula is getting all the county names into a variable called federalcountyname but the thing is the county names are repeating, means they are getting duplicated.
For Ex: they are counties called A,B,C,D ETC.
WHEN I USE THIS FORMULA I AM GETTING SOMETHING LIKE THIS
A,B,C,A,A,D,(HERE THE VALUES ARE REPEATING INSTEAD OF THIS I NEED TO GET UNIQUE VALUES like A,B,C,D)
whileprintingrecords;
Shared stringvar federalcountyname;
IF NOT({REFCOUNTY.REFCOUNTY_NM} LIKE ['D*']) THEN
(
if length(federalcountyname) = 0 then federalcountyname := federalcountyname + (if {PROPOSAL.FUNDTYPE} = 'FED' then GroupName ({@County_Name}))
else if ( federalcountyname <> (if {PROPOSAL.FUNDTYPE} = 'FED' then GroupName ({@County_Name}))) then
federalcountyname := federalcountyname + "," +(if {PROPOSAL.FUNDTYPE} = 'FED' then GroupName ({@County_Name}));
)
This below formula counts the no of counties and adds county or counties at the end depending on the count.
whileprintingrecords;
Shared stringvar federalcountyname;
if length(federalcountyname) <> 0 then
(
if InStr(federalcountyname, ",") = 0 then federalcountyname + " " + "COUNTY"
else federalcountyname + " " + "COUNTIES"
)
Please help me out with the first formula about how to get rid of those duplicates.
Any help is greatly appreciated.
Thanks,
rreddy