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

combining groups with left(string)

Status
Not open for further replies.

dfwcharles

Technical User
Apr 10, 2002
36
US
Hello,
I have an inventory report with account numbers as follows:
410003,413001,413002,413003,413004,416001,416002,416003, etc... I want to group the report using only the frist four characters of the account number, ie 4100,4130,4160. I used this forumla to create the group names,"left ({item.accountnum},4)". The problem is everytime the last two digits of the account number change, I get a new group.
Heres an example:

acct# total orginal values examples (not in report)
4100 870.13 (orginal acct# 410001)
4100 534.60 (orginal acct# 410002)
4130 697.17 (orginal acct# 413001)
4130 660.52 (orginal acct# 413002)
4130 15.96 (orginal acct# 413003)
4160 787.91 (orginal acct# 416001)
4160 638.53 (orginal acct# 416002)
4160 429.13 (orginal acct# 416003)
4160 811.79 (orginal acct# 416004)

My ultimate goal is to combine the total column figures for each acct# . My report should look something like this:
acct# total
4100 1404.73
4130 1373.66
4160 2667.30


Thanks in advance
Charles
 
Ypu are 99.9% of the way home. You need to group on the formula field, not the database field. Software Training and Support for Macola, Crystal Reports and Goldmine
714-348-0964
dgilsdorf@mchsi.com
 
Thanks dgillz, I tried that, and it work perfectly!

Thanks
Charles
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top