Wednesday, March 28, 2012

Grouping on first 2 characters of a number

Well, here I am again needing help. :(

My report shows a long list of numbers and I want to separate them into groups based only on the first two characters of each number. For example:

3102
3106
3103

3201
3203
3204

3506
3504
3508
3509

How do I tell Crystal to look at only the first 2 characters and sort accordingly, keeping all the "31" "32" and "35" together? My report is based on a stored procedure so I cannot change the number into a string.

Thank you!!!make a formula in crystal report with Left(cstr(Number field) ,2) and in groupby instead of number use this formula|||Thank you so much! That was it!!!

No comments:

Post a Comment