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

How to use 2 fields in a formula to Group in CR 9

Status
Not open for further replies.

cretanion

Technical User
Jan 28, 2002
53
US
I am using Crystal 8.5 and 9.

I use a formula written in 8.5 to group the fields together in a report

if {Clients.ClientText06} = "" then {Clients.Country} else {Clients.ClientText06}

My report comes out like below which is great

Company Allocation First Name Last Name
110 Fred Smith
110 Steve Smith
110 Jeff Smith

Note:
"Company" - {Clients.Country}
"Allocation" - {Clients.ClientText06}


I have other companies and allocation like 120, 130 ect.. that after each I create a New Page.

If I use the same formula in Ver. 9, the 2 fields "Company" and "Allocation" stay separated. How do you in Version 9 get these 2 fields to group together.
I have the formula in Group Expert Screen, but for some reason it is not bringing up the "Company" -{Clients.Country} field if "Allocation" - {Clients.ClientText06} is = to "".

Both fields are strings and have text and numerical values in them. Thanks for any suggestion...

 
I'd guess that you have the convert null values to default on in CR 8.5, at any rate, it sounds like a Null concern.

Try:

if isnull({Clients.ClientText06}) or {Clients.ClientText06} = "" then {Clients.Country} else {Clients.ClientText06}

-k
 
It worked and you are right about the null field. thank you for your help
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top