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

Group by 'Company Name' field where name is same throught

Status
Not open for further replies.

crystalreport85

Programmer
Sep 27, 2010
51
CA
I am new to crystal report.we are using crystal report 8.5. Report is need to be grouped my field 'company name'.My problem is company name is not consistent.For ex 'xyx.ltd.'in one place and 'xyx.LTD. in another.'Because of this inconsistency it is forming two different grouping. How to solve this problem. Thank you for the help.
 
Make the names all upper case or lower case in a formula:

ucase({table.companyname})

Or use lcase(). Insert a group on the formula. You can still use the field itself in the body of the report if you wish to maintain the case shown in the database for display purposes.

-LB
 
Thank you so much for the reply. Actually it is not the case problem--my example is wrong i think. The problem is one company name with dot like 'LTD.' and other is without like 'LTD'. Like this there are inconsistancy thought out .Is there anyway in CR to fix this problem.
Thank you
 
You need to first determine all the types of variation that are causing the multiple groups. You can do the following to remove periods, but I'm guessing there may be other issues, too:

replace({table.name},".","")

Group on this formula.

If you have some sort of company ID field, it would be better to group on this. You could then display (one version of) the name field in the group header instead of the ID, if you wished.

-LB
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top