Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Suppressing Field

Status
Not open for further replies.

hbarbs

Instructor
Mar 20, 2006
19
0
0
US
I am using Crystal 8.5 with Raiser's Edge. I have two groups: City and Org Name. Is there a way to put both fields in one text box, but only show the city the first time. For example, I have the City of Abilene with 5 orgs in that city. Now, it is showing up

Abilene, Org X
Abilene, Org Y
Abilene, Org Z

Is there a way for it to be

Abilene, Org X
Org Y
Org Z
Fort Davis, Org X
Org Y

I tried suppressing the city if duplicated, but that doesn't work because they are in the same text box. The other thing I tried was to keep the City and Org in different group sections and underlay the following section for city...but the printer needs the output in Excel with City and Org in one cell and when exported it puts them into two cells.

Any help would be great!
 
Assuming you are grouping by the city. I THINK this should work

Create a formula to concatenate the 2 fields...

if onfirstrecord = True then
{table.city} + " " + {table.org}
else {table.org}

place this in the details section....


-- Jason
"It's Just Ones and Zeros
 
Thanks for your quick reply. I created the formula

if onfirstrecord = True then
{CnAdrPrf.CnAdrPrf_City} + "," + {@Alias - Initial Caps}
else {@Alias - Initial Caps}

and put it in the details section, but it only worked for the first city & org group. Then for all the rest of the cities, it just shows the org name with no city. Not sure why?
 
doh! that's what I get for being too quick to respond.

I am not sure of any other way around this, but I am guessing there is.

anyway....this should work...

create a running total (type of summary = count, evaluate = for each record, reset count on change of group/CITY)

then your forumla would be

if {#runningtotal} = 1 then {table.city} + " " + {table.org}
else {table.org}

-- Jason
"It's Just Ones and Zeros
 
Thank You!!! That worked like a charm!
 
One more question...is there a way to add 2 spaces before the {table.org} after the else statement? Not sure how to add that to the forumla. Sorry...I am new to all this.

So it would show up

City, Org 1
Org2
Org3
City, Org 1
Org 2

Thanks a bunch!
 
if {#runningtotal} = 1 then {table.city} + " " + {table.org}
else " " + {table.org}

i put 4 spaces in there you can put as many as you like (btwn the ")

-- Jason
"It's Just Ones and Zeros
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top