Print Page | Close Window

Incrementing a Number on a Change of Group

Printed From: Crystal Reports Book
Category: Crystal Reports 9 through 2020
Forum Name: Report Design
Forum Discription: The best way to design a report and problems you have encountered
URL: http://www.crystalreportsbook.com/forum/forum_posts.asp?TID=22874
Printed Date: 30 Apr 2024 at 8:02pm


Topic: Incrementing a Number on a Change of Group
Posted By: jsh8286
Subject: Incrementing a Number on a Change of Group
Date Posted: 09 Jun 2020 at 5:22am
We have a report where we have generated a "fake" number detail field formula to return a value of '1'(this is a number).

The report is grouped by invoice description for an invoice.

So at the moment the '1' previously mentioned appears as '1' obviously in each group for every detail line.

What we want is for this number to increment by '1' for each group listed.

So for the first group each detail line would return:
1
2 group 2
3 group 3
4 group 4
5 and so on

Hope this makes sense.

Thanks in advance for any info posted.



Replies:
Posted By: kevlray
Date Posted: 10 Jun 2020 at 5:16am
Does the built in Special Field Group Number work for you?


Posted By: jsh8286
Date Posted: 10 Jun 2020 at 7:26am
Sorry don't know what you mean. Could you expand?

Thanks for your input.


Posted By: DBlank
Date Posted: 10 Jun 2020 at 10:28am
In Field Explorer, look at the 'Special Fields' section and select the field called 'Group Number' This is available if you have created a group in your report. If you have could. If you use that special field in your report canvas it will display the number you described. If that does not work you can create a Running Total and use it.


Posted By: jsh8286
Date Posted: 11 Jun 2020 at 6:22am
OMG do I feel like an idiot (nothing new

Thanks DBlank. Never used that field before never even dawwned on me to look.

Works perfect!

Thanks again.



Print Page | Close Window