# Record Number Groupwise

Hi,

I have three grouping in crystal report. I need to set the record number as follows

1.Level One

1.1 LevelOne Sub level One

1.1.1 AAAAA

1.1.2 XXXXXX

1.2 LevelOne Sub level Two

1.2.1 BBBBB

1.2.2 CCCCC

1.2.3 DDDDD

2. LevelTwo

2.1 LevelTwo Sub level One

2.1.1 ZZZZ

2.2 LevelTwoSub level Two

How can i achieve this in report.

Thank you

Vibin

10|10000 characters needed characters exceeded

### Related questions

Former Member
Posted on Dec 09, 2013 at 02:38 PM

You just need to increment the number variables at the required group headers and use them under their sub groups.

Then reset variables used in the subgroups in the outer-main group footers.

for e.g the formula to be placed in group header of group # 1 will be:

numbervar x:=x+1;

then, in group header of group # 2, it will be

numbervar x;

numbervar y:= y+1

totext(x,0,"") + '.'+ totext(y,0,"")

and, in the group # 3, it will be

numbervar x;

numbervar y;

numbervar z:=z+1;

totext(x,0,"") + '.' +totext(y,0,"") + '.' + totext(z,0,"")

Now, you'd also need to reset variables y and z at group footer # 1 and 2 respectively.

numbervar y:=0 //place in group footer # 1 section

numbervar z:=0 //place in group footer # 2 section

Prathamesh