Incremental Counter - Odd and Even

Good morning,

I have a report with 4 groups, two are suppressed and the other two are visible.  Of these two groups, Let's Call them A and B - I want to see if I can do the following:

Group A - The user will enter an odd number, say 5 and then the records in group A will increase in odd values from 5; 5, 7, 9, 11 etc.

Group B - The user will enter an even number, say 6 and then the records in group B will increase in even values from 6; 6, 8, 10, 12 etc.

Does anyone have any ideas on how to do this?

Thank you in advance,
Who is Participating?
mlmccConnect With a Mentor Commented:
Are you trying to simply number the records in the group or is there some kind of selection process going on?

You mention 4 groups as if they are different things.  Do you mean you are grouping by say STATE for addresses  and you want California and New York numbered and you have Texas and Florida suppressed? or do you have multiple groupings like State then City?

In the former you could create 2 formulas  to do the counting using variables
In the report header add a formula
Global NumberVar OddCount := {?YourParam}) - 2;
Global NumberVar EvenCount := {?YourParam} - 1;

Open in new window

To display the counts
Global NumberVar OddCount ;
OddCount := OddCount + 2;

Open in new window

Similarly for EvenCount
Global NumberVar EvenCount ;
EvenCount := EvenCount + 2;

Open in new window

rporter45Author Commented:
This is fantastic - works perfectly thank you!

Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.