Avatar of robinh583
robinh583Flag for United States of America asked on

Reset Record Number

I have alternating colored rows in a bunch of reports, using the formula "If remainder(recordnumber, 2) = 0 then crwhite else rgb(). Some of the reports however have groups, I would like to be able to reset the recordnumber whenever a new group starts. I saw the suggestion about running totals for resting recordnumbers, but i dont know how to actually implement that.
Crystal Reports

Avatar of undefined
Last Comment

8/22/2022 - Mon
Mike McCracken

Here is how to use the running total

In the field explorer right click RUNNING TOTAL
Click NEW
Give it a name - MyRecordCount
Pick a field
Select the type COUNT
Evaluate - For each record
Reset on group change

Use the running total field instead of recordnumber

    If remainder({#MyRecordCount} 2) = 0 then crwhite else rgb()


Log in or sign up to see answer
Become an EE member today7-DAY FREE TRIAL
Members can start a 7-Day Free trial then enjoy unlimited access to the platform
Sign up - Free for 7 days
Learn why we charge membership fees
We get it - no one likes a content blocker. Take one extra minute and find out why we block content.
See how we're fighting big data
Not exactly the question you had in mind?
Sign up for an EE membership and get your own personalized solution. With an EE membership, you can ask unlimited troubleshooting, research, or opinion questions.
ask a question

My pleasure to help you
Your help has saved me hundreds of hours of internet surfing.