The Arkenstone
The Arkenstone

Reputation: 3

Crystal reports -Custom grouping


I have a table called Employee(EmployeeNo,name,Address).Employee number is integer. Employee numbers prefix is changes according to employees working location. for example

EmployeeNumber - Location
12323 - London prefix "1" says that employee location is in London
24343 - Newyork prefix "2" says that employee location is in Newyork
38989 - Moscow prefix "3" says that employee location is in Moscow.

Now my problem is I don't have separate field to group employee by there location in crystal reports. so I have to get each employee's location using his employee number and group it according to that.

example
London
12323 Thomas sx
13434 Ray xx
14343 Frank uy

NewYork
24545 Alan oo
26656 Robin op
29098 Hayden lp

Moskow
35424 gustov lo
38967 Levshev ol

any idea is appreciated..

Upvotes: 0

Views: 829

Answers (1)

Siva
Siva

Reputation: 9101

Here compulsory scenario should be "Prefix" should be first letter of the location

Use the below code in a formula

Left (<database field>,1 )

Now use the formula to group.

You should be able to group according to lcoation

Upvotes: 1

Related Questions