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 Westi on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Crystal Reports Grouping Problems

Status
Not open for further replies.

mark1110

Programmer
Apr 20, 2005
85
US
Hi,

I am using Crystal Reports 8.5 and need to write a report that is grouped a certain way. I need it grouped by last name, city, and zip code with a subtotal after the city. The problem I am having is that if the city is Chicago, I need to have the zip code group every record except zip code 60201 as one zip code and all records with 60201 as another grouping. I tried using a formula like:

IF zipcode = "60201" THEN
"A"
ELSE
"B"

but that didn't work. I put that as group footer #3. I tried moving it to group footer #2 and group footer #1 but that only made it worse.

Does anyone have any ideas as to how to do this?

Thanks,

Mark
 
Try a formula like this for a zip code group:

if {table.city} = "Chicago" then
(
if {table.zip} = "60201" then
"60201" else
"Not 60201"
) else
{table.zip}

-LB
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top