Technical Questions
 Crystal Reports Forum : Crystal Reports 9 through 2022 : Technical Questions
Message Icon Topic: Formula to trim First 4 digits of Cellular phones Post Reply Post New Topic
Author Message
CrystalMacky
Newbie
Newbie
Avatar

Joined: 31 Jul 2012
Location: Philippines
Online Status: Offline
Posts: 2
Quote CrystalMacky Replybullet Topic: Formula to trim First 4 digits of Cellular phones
     Posted: 31 Jul 2012 at 7:26pm
Hi

Kindly help me out on formula in trimming digits.. i think its trim left?? the scenario is i want to see the output that will count how many in the database is using Globe lines, smart lines or sun cellular networks

ex..
0917-8097652 (the first 4 digit is 0917) which is from Globe

Globe networks
0905,
0906,
0915,
0916,
0917,
0925,
0926,
0927,
0935,
0936,
0937,
0996,
0997

smart networks
0907,
0908,
0909,
0910,
0918,
0919,
0920,
0921,
0928,
0929,
0930,
0938,
0939,
0947,
0948,
0949,
0989,
0999

and sun cellular networks
0922,
0923,
0932,
0933,
0942

output must be like this....

ex.

Globe network users               15,482
Smart network users               13,892
Sun Cellular users                 8,405
No Mobile Numbers                    892
Others                               210

Thanks... im using crystal report 9

Edited by CrystalMacky - 31 Jul 2012 at 7:29pm
Crystalized!
IP IP Logged
DBlank
Moderator
Moderator


Joined: 19 Dec 2008
Online Status: Offline
Posts: 9053
Quote DBlank Replybullet Posted: 01 Aug 2012 at 3:30am
1 way is to use use 4 running totals with evalaution formulas
 
example of a RT...
name=globe_count
field to summarize=customer_id (or something like it)
type=distinctcount
evalaute = use a formula
  left(table.phonenumber) in ['0905', '0906', '0915',etc.]
reset=never


Edited by DBlank - 01 Aug 2012 at 3:31am
IP IP Logged
CrystalMacky
Newbie
Newbie
Avatar

Joined: 31 Jul 2012
Location: Philippines
Online Status: Offline
Posts: 2
Quote CrystalMacky Replybullet Posted: 05 Aug 2012 at 4:39pm
Originally posted by DBlank

1 way is to use use 4 running totals with evalaution formulas
 

example of a RT...

name=globe_count

field to summarize=customer_id (or something like it)

type=distinctcount

evalaute = use a formula

  left(table.phonenumber) in ['0905', '0906', '0915',etc.] reset=never


thanks sir DBLANK
Crystalized!
IP IP Logged
Printable version Printable version

Forum Jump
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot delete your posts in this forum
You cannot edit your posts in this forum
You cannot create polls in this forum
You cannot vote in polls in this forum